1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/b2g/locales/Makefile.in Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,154 @@ 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 +SUBMAKEFILES += \ 1.12 + $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \ 1.13 + $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \ 1.14 + $(NULL) 1.15 + 1.16 +# This makefile uses variable overrides from the libs-% target to 1.17 +# build non-default locales to non-default dist/ locations. Be aware! 1.18 + 1.19 +PWD := $(CURDIR) 1.20 + 1.21 +# These are defaulted to be compatible with the files the wget-en-US target 1.22 +# pulls. You may override them if you provide your own files. You _must_ 1.23 +# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not 1.24 +# work in that case. 1.25 +ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE) 1.26 +WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe 1.27 +RETRIEVE_WINDOWS_INSTALLER = 1 1.28 + 1.29 +MOZ_LANGPACK_EID=langpack-$(AB_CD)@b2g.mozilla.org 1.30 + 1.31 +PREF_JS_EXPORTS = $(call MERGE_FILE,b2g-l10n.js) 1.32 + 1.33 +ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT))) 1.34 +MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore 1.35 +MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png 1.36 +MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns 1.37 +MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ ' 1.38 +endif 1.39 + 1.40 +ifeq (WINNT,$(OS_ARCH)) 1.41 +UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \ 1.42 + $(NSINSTALL) -D $(STAGEDIST)/uninstall; \ 1.43 + cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \ 1.44 + $(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \ 1.45 + cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \ 1.46 + $(NULL) 1.47 +endif 1.48 + 1.49 +include $(topsrcdir)/config/rules.mk 1.50 + 1.51 +include $(topsrcdir)/toolkit/locales/l10n.mk 1.52 + 1.53 +$(STAGEDIST): $(DIST)/branding 1.54 + 1.55 +$(DIST)/branding: 1.56 + $(NSINSTALL) -D $@ 1.57 + 1.58 +libs:: 1.59 + @if test -f '$(LOCALE_SRCDIR)/existing-profile-defaults.js'; then \ 1.60 + $(PYTHON) -m mozbuild.action.preprocessor $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \ 1.61 + $(LOCALE_SRCDIR)/existing-profile-defaults.js -o $(FINAL_TARGET)/defaults/existing-profile-defaults.js; \ 1.62 + fi 1.63 + 1.64 +NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD)) 1.65 + 1.66 +libs-%: 1.67 + $(NSINSTALL) -D $(DIST)/install 1.68 + @$(MAKE) -C ../../toolkit/locales libs-$* 1.69 + @$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$* 1.70 + @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) 1.71 + @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* 1.72 + 1.73 +# Tailored target to just add the chrome processing for multi-locale builds 1.74 +chrome-%: 1.75 + @$(MAKE) chrome AB_CD=$* 1.76 + @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales chrome AB_CD=$* 1.77 + 1.78 +repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe 1.79 +repackage-win32-installer: $(call ESCAPE_SPACE,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD) 1.80 + @echo 'Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT).' 1.81 + $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export 1.82 + $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx 1.83 + $(MAKE) repackage-zip \ 1.84 + AB_CD=$(AB_CD) \ 1.85 + MOZ_PKG_FORMAT=SFX7Z \ 1.86 + ZIP_IN='$(WIN32_INSTALLER_IN)' \ 1.87 + ZIP_OUT='$(WIN32_INSTALLER_OUT)' \ 1.88 + SFX_HEADER='$(PWD)/../installer/windows/l10ngen/7zSD.sfx \ 1.89 + $(topsrcdir)/b2g/installer/windows/app.tag' 1.90 + 1.91 +ifeq (WINNT,$(OS_ARCH)) 1.92 +repackage-win32-installer-%: 1.93 + @$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)' 1.94 +else 1.95 +repackage-win32-installer-%: ; 1.96 +endif 1.97 + 1.98 + 1.99 +clobber-zip: 1.100 + $(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \ 1.101 + $(STAGEDIST)/chrome/$(AB_CD).manifest \ 1.102 + $(STAGEDIST)/defaults/pref/b2g-l10n.js 1.103 + $(STAGEDIST)/dictionaries \ 1.104 + $(STAGEDIST)/defaults/profile \ 1.105 + $(STAGEDIST)/chrome/$(AB_CD) 1.106 + 1.107 + 1.108 +langpack: langpack-$(AB_CD) 1.109 + 1.110 +# This is a generic target that will make a langpack, repack ZIP (+tarball) 1.111 +# builds, and repack an installer if applicable. It is called from the 1.112 +# tinderbox scripts. Alter it with caution. 1.113 + 1.114 +installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-% 1.115 + @echo 'repackaging done' 1.116 + 1.117 +# When we unpack b2g on MacOS X the platform.ini and application.ini are in slightly 1.118 +# different locations that on all other platforms 1.119 +ifeq (Darwin, $(OS_ARCH)) 1.120 +ifdef LIBXUL_SDK 1.121 +GECKO_PLATFORM_INI_PATH='$(STAGEDIST)/../Frameworks/XUL.framework/Versions/$(MOZILLA_VERSION)/platform.ini' 1.122 +else 1.123 +GECKO_PLATFORM_INI_PATH='$(STAGEDIST)/platform.ini' 1.124 +endif 1.125 +B2G_APPLICATION_INI_PATH='$(STAGEDIST)/application.ini' 1.126 +else 1.127 +ifdef LIBXUL_SDK 1.128 +GECKO_PLATFORM_INI_PATH='$(STAGEDIST)/xulrunner/platform.ini' 1.129 +else 1.130 +GECKO_PLATFORM_INI_PATH='$(STAGEDIST)/platform.ini' 1.131 +endif 1.132 +B2G_APPLICATION_INI_PATH='$(STAGEDIST)/application.ini' 1.133 +endif 1.134 + 1.135 + 1.136 +ident: 1.137 + @printf 'gecko_revision ' 1.138 + @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(GECKO_PLATFORM_INI_PATH) Build SourceStamp 1.139 + @printf 'b2g_revision ' 1.140 + @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(B2G_APPLICATION_INI_PATH) App SourceStamp 1.141 + @printf 'buildid ' 1.142 + @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(B2G_APPLICATION_INI_PATH) App BuildID 1.143 + 1.144 +merge-%: 1.145 +ifdef LOCALE_MERGEDIR 1.146 + $(RM) -rf $(LOCALE_MERGEDIR) 1.147 + MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $* 1.148 +endif 1.149 + @echo 1.150 + 1.151 +# test target, depends on make package 1.152 +# try to repack x-test, with just toolkit/defines.inc being there 1.153 +l10n-check:: 1.154 + $(RM) -rf x-test 1.155 + $(NSINSTALL) -D x-test/toolkit 1.156 + echo '#define MOZ_LANG_TITLE Just testing' > x-test/toolkit/defines.inc 1.157 + $(MAKE) installers-x-test L10NBASEDIR='$(PWD)' LOCALE_MERGEDIR='$(PWD)/mergedir'