browser/locales/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/locales/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,233 @@
     1.4 +# vim:set ts=8 sw=8 sts=8 noet:
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +include $(topsrcdir)/config/config.mk
    1.10 +
    1.11 +vpath %.xml @srcdir@/en-US/searchplugins
    1.12 +vpath %.xml $(LOCALE_SRCDIR)/searchplugins
    1.13 +
    1.14 +ifdef LOCALE_MERGEDIR
    1.15 +vpath crashreporter%.ini $(LOCALE_MERGEDIR)/browser/crashreporter
    1.16 +endif
    1.17 +vpath crashreporter%.ini $(LOCALE_SRCDIR)/crashreporter
    1.18 +ifdef LOCALE_MERGEDIR
    1.19 +vpath crashreporter%.ini @srcdir@/en-US/crashreporter
    1.20 +endif
    1.21 +ifdef LOCALE_MERGEDIR
    1.22 +vpath book%.inc $(LOCALE_MERGEDIR)/browser/profile
    1.23 +endif
    1.24 +vpath book%.inc $(LOCALE_SRCDIR)/profile
    1.25 +ifdef LOCALE_MERGEDIR
    1.26 +vpath book%.inc @srcdir@/en-US/profile
    1.27 +endif
    1.28 +
    1.29 +
    1.30 +SUBMAKEFILES += \
    1.31 +	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
    1.32 +	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
    1.33 +	$(NULL)
    1.34 +
    1.35 +# This makefile uses variable overrides from the libs-% target to
    1.36 +# build non-default locales to non-default dist/ locations. Be aware!
    1.37 +
    1.38 +PWD := $(CURDIR)
    1.39 +
    1.40 +# These are defaulted to be compatible with the files the wget-en-US target
    1.41 +# pulls. You may override them if you provide your own files. You _must_
    1.42 +# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
    1.43 +# work in that case.
    1.44 +ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
    1.45 +WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
    1.46 +RETRIEVE_WINDOWS_INSTALLER = 1
    1.47 +
    1.48 +MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org
    1.49 +
    1.50 +PREF_JS_EXPORTS = $(call MERGE_FILE,firefox-l10n.js)
    1.51 +
    1.52 +ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
    1.53 +MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
    1.54 +MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
    1.55 +MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
    1.56 +MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
    1.57 +endif
    1.58 +
    1.59 +ifeq (WINNT,$(OS_ARCH))
    1.60 +UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
    1.61 +    $(NSINSTALL) -D $(STAGEDIST)/uninstall; \
    1.62 +    cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
    1.63 +    $(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \
    1.64 +    cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \
    1.65 +    $(NULL)
    1.66 +
    1.67 +STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST)/$(PKG_INST_PATH)'; \
    1.68 +    $(RM) '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    1.69 +    cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    1.70 +    chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    1.71 +    $(NULL)
    1.72 +endif
    1.73 +
    1.74 +ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
    1.75 +SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
    1.76 +else
    1.77 +SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
    1.78 +endif
    1.79 +SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
    1.80 +SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES))
    1.81 +PP_TARGETS += SEARCHPLUGINS
    1.82 +
    1.83 +# Required for l10n.mk - defines a list of app sub dirs that should
    1.84 +# be included in langpack xpis.
    1.85 +ifdef MOZ_METRO
    1.86 +# metro build, include both app folders
    1.87 +DIST_SUBDIRS = browser metro
    1.88 +else
    1.89 +DIST_SUBDIRS = $(DIST_SUBDIR)
    1.90 +endif
    1.91 +
    1.92 +include $(topsrcdir)/config/rules.mk
    1.93 +
    1.94 +include $(topsrcdir)/toolkit/locales/l10n.mk
    1.95 +
    1.96 +$(STAGEDIST): $(DIST)/branding
    1.97 +
    1.98 +$(DIST)/branding:
    1.99 +	$(NSINSTALL) -D $@
   1.100 +
   1.101 +PROFILE_FILES = \
   1.102 +	localstore.rdf \
   1.103 +	mimeTypes.rdf \
   1.104 +	$(NULL)
   1.105 +
   1.106 +PROFILE_CHROME = userChrome-example.css userContent-example.css
   1.107 +
   1.108 +NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
   1.109 +
   1.110 +%/defaults/profile/bookmarks.html: bookmarks.inc generic/profile/bookmarks.html.in
   1.111 +	$(call py_action,preprocessor, \
   1.112 +	  -I $< \
   1.113 +	  -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
   1.114 +	  $(srcdir)/generic/profile/bookmarks.html.in \
   1.115 +	  -o $@)
   1.116 +
   1.117 +libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
   1.118 +
   1.119 +libs:: $(addprefix generic/profile/,$(PROFILE_FILES))
   1.120 +	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
   1.121 +
   1.122 +libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
   1.123 +	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
   1.124 +
   1.125 +# metro build calls back here for search engine plugins
   1.126 +searchplugins: $(addprefix $(FINAL_TARGET)/searchplugins/,$(SEARCHPLUGINS))
   1.127 +.PHONY: searchplugins
   1.128 +
   1.129 +libs-%:
   1.130 +	$(NSINSTALL) -D $(DIST)/install
   1.131 +	@$(MAKE) -C ../../toolkit/locales libs-$*
   1.132 +	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
   1.133 +ifdef MOZ_WEBAPP_RUNTIME
   1.134 +	@$(MAKE) -C ../../webapprt/locales AB_CD=$* XPI_NAME=locale-$*
   1.135 +endif
   1.136 +	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
   1.137 +	@$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$*
   1.138 +	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
   1.139 +ifdef MOZ_METRO
   1.140 +	@$(MAKE) -C ../metro/locales AB_CD=$* XPI_NAME=locale-$*
   1.141 +endif
   1.142 +	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
   1.143 +
   1.144 +repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
   1.145 +repackage-win32-installer: $(call ESCAPE_WILDCARD,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
   1.146 +	@echo 'Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT).'
   1.147 +	$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
   1.148 +	$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
   1.149 +	$(MAKE) repackage-zip \
   1.150 +	  AB_CD=$(AB_CD) \
   1.151 +	  MOZ_PKG_FORMAT=SFX7Z \
   1.152 +	  ZIP_IN='$(WIN32_INSTALLER_IN)' \
   1.153 +	  ZIP_OUT='$(WIN32_INSTALLER_OUT)' \
   1.154 +	  SFX_HEADER='$(PWD)/../installer/windows/l10ngen/7zSD.sfx \
   1.155 +	              $(topsrcdir)/browser/installer/windows/app.tag'
   1.156 +
   1.157 +ifeq (WINNT,$(OS_ARCH))
   1.158 +repackage-win32-installer-%: $(STAGEDIST)
   1.159 +	@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)'
   1.160 +
   1.161 +repackage-zip-%: repackage-win32-installer-%
   1.162 +else
   1.163 +repackage-win32-installer-%: ;
   1.164 +endif
   1.165 +
   1.166 +
   1.167 +clobber-zip:
   1.168 +	$(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
   1.169 +	  $(STAGEDIST)/chrome/$(AB_CD).manifest \
   1.170 +	  $(STAGEDIST)/webapprt/chrome/$(AB_CD).jar \
   1.171 +	  $(STAGEDIST)/webapprt/chrome/$(AB_CD).manifest \
   1.172 +	  $(STAGEDIST)/$(PREF_DIR)/firefox-l10n.js
   1.173 +	$(RM) -rf  $(STAGEDIST)/searchplugins \
   1.174 +	  $(STAGEDIST)/dictionaries \
   1.175 +	  $(STAGEDIST)/hyphenation \
   1.176 +	  $(STAGEDIST)/defaults/profile \
   1.177 +	  $(STAGEDIST)/chrome/$(AB_CD) \
   1.178 +	  $(STAGEDIST)/webapprt/chrome/$(AB_CD)
   1.179 +
   1.180 +
   1.181 +langpack: langpack-$(AB_CD)
   1.182 +
   1.183 +# This is a generic target that will make a langpack, repack ZIP (+tarball)
   1.184 +# builds, and repack an installer if applicable. It is called from the
   1.185 +# tinderbox scripts. Alter it with caution.
   1.186 +
   1.187 +installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-%
   1.188 +	@echo 'repackaging done'
   1.189 +
   1.190 +ifdef MOZ_UPDATER
   1.191 +# Note that we want updater.ini to be in the top directory, not the browser/
   1.192 +# subdirectory, because that's where the updater is installed and runs.
   1.193 +libs:: $(call MERGE_FILE,updater/updater.ini) $(call mkdir_deps,$(DIST)/bin)
   1.194 +ifeq ($(OS_ARCH),WINNT)
   1.195 +	cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
   1.196 +	  sed -e 's/^InfoText=/Info=/' -e 's/^TitleText=/Title=/' | \
   1.197 +	  sed -e 's/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/' > \
   1.198 +	  $(FINAL_TARGET)/../updater.ini
   1.199 +else
   1.200 +	cat $< | \
   1.201 +	  sed -e 's/^InfoText=/Info=/' -e 's/^TitleText=/Title=/' | \
   1.202 +	  sed -e 's/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/' > \
   1.203 +	  $(FINAL_TARGET)/../updater.ini
   1.204 +endif
   1.205 +endif
   1.206 +
   1.207 +ifdef MOZ_CRASHREPORTER
   1.208 +libs:: crashreporter-override.ini
   1.209 +	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
   1.210 +endif
   1.211 +
   1.212 +ident:
   1.213 +	@printf 'fx_revision '
   1.214 +	@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
   1.215 +	    $(STAGEDIST)/application.ini App SourceStamp
   1.216 +	@printf 'buildid '
   1.217 +	@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
   1.218 +	    $(STAGEDIST)/application.ini App BuildID
   1.219 +
   1.220 +merge-%:
   1.221 +ifdef LOCALE_MERGEDIR
   1.222 +	$(RM) -rf $(LOCALE_MERGEDIR)
   1.223 +	MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $*
   1.224 +endif
   1.225 +	@echo
   1.226 +
   1.227 +# test target, depends on make package
   1.228 +# try to repack x-test, with just toolkit/defines.inc being there
   1.229 +l10n-check:: INNER_UNMAKE_PACKAGE=true
   1.230 +l10n-check::
   1.231 +	$(RM) -rf x-test
   1.232 +	$(NSINSTALL) -D x-test/toolkit
   1.233 +	echo '#define MOZ_LANG_TITLE Just testing' > x-test/toolkit/defines.inc
   1.234 +	$(MAKE) installers-x-test L10NBASEDIR='$(PWD)' LOCALE_MERGEDIR='$(PWD)/mergedir'
   1.235 +	$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/unpack.py $(DIST)/l10n-stage/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)
   1.236 +	cd $(DIST)/l10n-stage && test $$(cat $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/update.locale) = x-test

mercurial