2012-05-21 04:12:37 -07:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2013-02-25 12:47:23 -08:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2010-12-15 12:10:08 -08:00
|
|
|
# overwrite mobile-l10n.js with a matchOS=true one for multi-locale builds
|
|
|
|
ifeq ($(AB_CD),multi)
|
|
|
|
PREF_JS_EXPORTS = $(srcdir)/mobile-l10n.js
|
|
|
|
endif
|
2010-10-19 15:28:10 -07:00
|
|
|
|
2010-12-15 12:10:08 -08:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2008-07-25 16:07:50 -07:00
|
|
|
|
2010-12-15 12:10:08 -08:00
|
|
|
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
2010-10-19 15:28:10 -07:00
|
|
|
|
2010-12-15 12:10:08 -08:00
|
|
|
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
|
|
|
|
|
|
|
DEFINES += \
|
2014-09-04 20:11:09 -07:00
|
|
|
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-DPREF_DIR=$(PREF_DIR) \
|
|
|
|
-DJAREXT= \
|
|
|
|
-DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) \
|
|
|
|
-DANDROID_CPU_ARCH=$(ANDROID_CPU_ARCH) \
|
|
|
|
$(NULL)
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2014-08-01 13:23:48 -07:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DMOZ_DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2011-01-07 07:30:58 -08:00
|
|
|
ifdef MOZ_PKG_MANIFEST_P
|
|
|
|
MOZ_PKG_MANIFEST = package-manifest
|
2010-12-15 12:10:19 -08:00
|
|
|
endif
|
|
|
|
|
2013-01-23 02:23:15 -08:00
|
|
|
MOZ_PACKAGER_MINIFY=1
|
2011-01-07 07:30:58 -08:00
|
|
|
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
2010-12-15 12:10:19 -08:00
|
|
|
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
|
|
|
BINPATH = $(_BINPATH)
|
|
|
|
DEFINES += -DAPPNAME=$(_APPNAME)
|
|
|
|
else
|
|
|
|
# Every other platform just winds up in dist/bin
|
|
|
|
BINPATH = bin
|
|
|
|
endif
|
|
|
|
DEFINES += -DBINPATH=$(BINPATH)
|
|
|
|
|
2012-09-17 20:07:23 -07:00
|
|
|
ifdef ENABLE_MARIONETTE
|
|
|
|
DEFINES += -DENABLE_MARIONETTE=1
|
|
|
|
endif
|
|
|
|
|
2010-12-15 12:10:08 -08:00
|
|
|
ifdef MOZ_PKG_MANIFEST_P
|
2014-05-07 20:21:22 -07:00
|
|
|
# When MOZ_CHROME_MULTILOCALE is defined, we write multilocale.json like:
|
|
|
|
# {"locales": ["en-US", "de", "ar", ...]}
|
|
|
|
|
|
|
|
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS) FORCE
|
2013-11-08 17:35:44 -08:00
|
|
|
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
2010-12-15 12:10:19 -08:00
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
2013-12-02 13:34:21 -08:00
|
|
|
printf '\n[multilocale]\n' >> $@
|
2014-05-07 20:21:22 -07:00
|
|
|
printf '@BINPATH@/res/multilocale.json\n' >> $@
|
2010-12-16 11:53:32 -08:00
|
|
|
for LOCALE in en-US $(MOZ_CHROME_MULTILOCALE) ;\
|
2010-12-15 12:10:19 -08:00
|
|
|
do \
|
2013-12-03 14:28:03 -08:00
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
|
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \
|
2010-12-15 12:10:19 -08:00
|
|
|
done
|
2014-05-07 20:21:22 -07:00
|
|
|
COMMA=,
|
|
|
|
echo '{"locales": [$(foreach l,$(MOZ_CHROME_MULTILOCALE),"$(l)"$(COMMA)) "en-US"]}' \
|
|
|
|
> $(FINAL_TARGET)/res/multilocale.json
|
2010-12-15 12:10:08 -08:00
|
|
|
endif
|
2010-10-19 20:33:01 -07:00
|
|
|
|
2010-12-15 12:10:19 -08:00
|
|
|
GARBAGE += $(MOZ_PKG_MANIFEST)
|
2008-04-18 06:41:49 -07:00
|
|
|
endif
|