Bumping manifests a=b2g-bump
[gecko.git] / browser / locales / Makefile.in
blobb17287682c4d4d366d02945ff65e1c5e1d3c021a
1 # vim:set ts=8 sw=8 sts=8 noet:
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 include $(topsrcdir)/config/config.mk
8 vpath %.xml @srcdir@/en-US/searchplugins
9 vpath %.xml $(LOCALE_SRCDIR)/searchplugins
11 ifdef LOCALE_MERGEDIR
12 vpath crashreporter%.ini $(LOCALE_MERGEDIR)/browser/crashreporter
13 endif
14 vpath crashreporter%.ini $(LOCALE_SRCDIR)/crashreporter
15 ifdef LOCALE_MERGEDIR
16 vpath crashreporter%.ini @srcdir@/en-US/crashreporter
17 endif
18 ifdef LOCALE_MERGEDIR
19 vpath book%.inc $(LOCALE_MERGEDIR)/browser/profile
20 endif
21 vpath book%.inc $(LOCALE_SRCDIR)/profile
22 ifdef LOCALE_MERGEDIR
23 vpath book%.inc @srcdir@/en-US/profile
24 endif
27 SUBMAKEFILES += \
28 $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
29 $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
30 $(NULL)
32 # This makefile uses variable overrides from the libs-% target to
33 # build non-default locales to non-default dist/ locations. Be aware!
35 PWD := $(CURDIR)
37 # These are defaulted to be compatible with the files the wget-en-US target
38 # pulls. You may override them if you provide your own files. You _must_
39 # override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
40 # work in that case.
41 ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
42 WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
43 RETRIEVE_WINDOWS_INSTALLER = 1
45 MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org
47 PREF_JS_EXPORTS = $(call MERGE_FILE,firefox-l10n.js)
49 ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
50 MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
51 MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
52 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
53 MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
54 endif
56 ifeq (WINNT,$(OS_ARCH))
57 UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
58 $(NSINSTALL) -D $(STAGEDIST)/uninstall; \
59 cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
60 $(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \
61 cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \
62 $(NULL)
64 STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST)/$(PKG_INST_PATH)'; \
65 $(RM) '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
66 cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
67 chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
68 $(NULL)
69 endif
71 ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
72 SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
73 else
74 SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg
75 endif
76 SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
77 SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES))
78 PP_TARGETS += SEARCHPLUGINS
80 # Required for l10n.mk - defines a list of app sub dirs that should
81 # be included in langpack xpis.
82 ifdef MOZ_METRO
83 # metro build, include both app folders
84 DIST_SUBDIRS = browser metro
85 else
86 DIST_SUBDIRS = $(DIST_SUBDIR)
87 endif
89 include $(topsrcdir)/config/rules.mk
91 include $(topsrcdir)/toolkit/locales/l10n.mk
93 $(STAGEDIST): $(DIST)/branding
95 $(DIST)/branding:
96 $(NSINSTALL) -D $@
98 PROFILE_FILES = \
99 localstore.rdf \
100 mimeTypes.rdf \
101 $(NULL)
103 PROFILE_CHROME = userChrome-example.css userContent-example.css
105 NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
107 %/defaults/profile/bookmarks.html: bookmarks.inc generic/profile/bookmarks.html.in
108 $(call py_action,preprocessor, \
109 -I $< \
110 -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
111 $(srcdir)/generic/profile/bookmarks.html.in \
112 -o $@)
114 libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
116 libs:: $(addprefix generic/profile/,$(PROFILE_FILES))
117 $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
119 libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
120 $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
122 # metro build calls back here for search engine plugins
123 searchplugins: $(addprefix $(FINAL_TARGET)/searchplugins/,$(SEARCHPLUGINS))
124 .PHONY: searchplugins
126 libs-%:
127 $(NSINSTALL) -D $(DIST)/install
128 @$(MAKE) -C ../../toolkit/locales libs-$*
129 @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
130 ifdef MOZ_WEBAPP_RUNTIME
131 @$(MAKE) -C ../../webapprt/locales AB_CD=$* XPI_NAME=locale-$*
132 endif
133 @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
134 @$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$*
135 @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
136 ifdef MOZ_METRO
137 @$(MAKE) -C ../metro/locales AB_CD=$* XPI_NAME=locale-$*
138 endif
139 @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
141 repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
142 repackage-win32-installer: $(call ESCAPE_WILDCARD,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
143 @echo 'Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT).'
144 $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
145 $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
146 $(MAKE) repackage-zip \
147 AB_CD=$(AB_CD) \
148 MOZ_PKG_FORMAT=SFX7Z \
149 ZIP_IN='$(WIN32_INSTALLER_IN)' \
150 ZIP_OUT='$(WIN32_INSTALLER_OUT)' \
151 SFX_HEADER='$(PWD)/../installer/windows/l10ngen/7zSD.sfx \
152 $(topsrcdir)/browser/installer/windows/app.tag'
154 ifeq (WINNT,$(OS_ARCH))
155 repackage-win32-installer-%: $(STAGEDIST)
156 @$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)'
158 repackage-zip-%: repackage-win32-installer-%
159 else
160 repackage-win32-installer-%: ;
161 endif
164 clobber-zip:
165 $(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
166 $(STAGEDIST)/chrome/$(AB_CD).manifest \
167 $(STAGEDIST)/webapprt/chrome/$(AB_CD).jar \
168 $(STAGEDIST)/webapprt/chrome/$(AB_CD).manifest \
169 $(STAGEDIST)/$(PREF_DIR)/firefox-l10n.js
170 $(RM) -rf $(STAGEDIST)/searchplugins \
171 $(STAGEDIST)/dictionaries \
172 $(STAGEDIST)/hyphenation \
173 $(STAGEDIST)/defaults/profile \
174 $(STAGEDIST)/chrome/$(AB_CD) \
175 $(STAGEDIST)/webapprt/chrome/$(AB_CD)
178 langpack: langpack-$(AB_CD)
180 # This is a generic target that will make a langpack, repack ZIP (+tarball)
181 # builds, and repack an installer if applicable. It is called from the
182 # tinderbox scripts. Alter it with caution.
184 installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-%
185 @echo 'repackaging done'
187 ifdef MOZ_UPDATER
188 # Note that we want updater.ini to be in the top directory, not the browser/
189 # subdirectory, because that's where the updater is installed and runs.
190 libs:: $(call MERGE_FILE,updater/updater.ini) $(call mkdir_deps,$(DIST)/bin)
191 ifeq ($(OS_ARCH),WINNT)
192 cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
193 sed -e 's/^InfoText=/Info=/' -e 's/^TitleText=/Title=/' | \
194 sed -e 's/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/' > \
195 $(FINAL_TARGET)/../updater.ini
196 else
197 cat $< | \
198 sed -e 's/^InfoText=/Info=/' -e 's/^TitleText=/Title=/' | \
199 sed -e 's/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/' > \
200 $(FINAL_TARGET)/../updater.ini
201 endif
202 endif
204 ifdef MOZ_CRASHREPORTER
205 libs:: crashreporter-override.ini
206 $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
207 endif
209 ident:
210 @printf 'fx_revision '
211 @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
212 $(STAGEDIST)/application.ini App SourceStamp
213 @printf 'buildid '
214 @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
215 $(STAGEDIST)/application.ini App BuildID
217 merge-%:
218 ifdef LOCALE_MERGEDIR
219 $(RM) -rf $(LOCALE_MERGEDIR)
220 MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $*
221 endif
222 @echo
224 # test target, depends on make package
225 # try to repack x-test, with just toolkit/defines.inc being there
226 l10n-check:: INNER_UNMAKE_PACKAGE=true
227 l10n-check::
228 $(RM) -rf x-test
229 $(NSINSTALL) -D x-test/toolkit
230 echo '#define MOZ_LANG_TITLE Just testing' > x-test/toolkit/defines.inc
231 $(MAKE) installers-x-test L10NBASEDIR='$(PWD)' LOCALE_MERGEDIR='$(PWD)/mergedir'
232 $(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/unpack.py $(DIST)/l10n-stage/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)
233 cd $(DIST)/l10n-stage && test $$(cat $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/update.locale) = x-test