browser/locales/Makefile.in

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial