2012-05-21 11:12:37 +00: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 13:41:49 +00:00
|
|
|
|
2013-02-25 20:47:23 +00:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2010-12-15 20:10:08 +00:00
|
|
|
# overwrite mobile-l10n.js with a matchOS=true one for multi-locale builds
|
|
|
|
ifeq ($(AB_CD),multi)
|
2015-02-01 16:41:04 +00:00
|
|
|
L10N_PREF_JS_EXPORTS = $(srcdir)/mobile-l10n.js
|
|
|
|
L10N_PREF_JS_EXPORTS_PATH = $(FINAL_TARGET)/$(PREF_DIR)
|
|
|
|
L10N_PREF_JS_EXPORTS_FLAGS = $(PREF_PPFLAGS) --silence-missing-directive-warnings
|
|
|
|
PP_TARGETS += L10N_PREF_JS_EXPORTS
|
2010-12-15 20:10:08 +00:00
|
|
|
endif
|
2010-10-19 22:28:10 +00:00
|
|
|
|
2010-12-15 20:10:08 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2008-07-25 23:07:50 +00:00
|
|
|
|
2010-12-15 20:10:08 +00:00
|
|
|
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
2010-10-19 22:28:10 +00:00
|
|
|
|
2010-12-15 20:10:08 +00:00
|
|
|
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
|
|
|
|
|
|
|
DEFINES += \
|
2014-09-05 03:11:09 +00: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 13:41:49 +00:00
|
|
|
|
2014-08-01 20:23:48 +00:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DMOZ_DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2011-01-07 15:30:58 +00:00
|
|
|
ifdef MOZ_PKG_MANIFEST_P
|
|
|
|
MOZ_PKG_MANIFEST = package-manifest
|
2010-12-15 20:10:19 +00:00
|
|
|
endif
|
|
|
|
|
2013-01-23 10:23:15 +00:00
|
|
|
MOZ_PACKAGER_MINIFY=1
|
2011-01-07 15:30:58 +00:00
|
|
|
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
2014-10-31 00:02:58 +00:00
|
|
|
# Note that JS_BINARY can be defined in packager.mk, so this test must come
|
|
|
|
# after including that file. MOZ_PACKAGER_MINIFY_JS is used in packager.mk, but
|
|
|
|
# since recipe evaluation is deferred, we can set it here after the inclusion.
|
|
|
|
ifneq (,$(JS_BINARY))
|
2014-11-04 09:11:00 +00:00
|
|
|
ifndef MOZ_DEBUG
|
|
|
|
ifndef NIGHTLY_BUILD
|
2014-10-31 00:02:58 +00:00
|
|
|
MOZ_PACKAGER_MINIFY_JS=1
|
|
|
|
endif
|
2014-11-04 09:11:00 +00:00
|
|
|
endif
|
|
|
|
endif
|
2014-10-31 00:02:58 +00:00
|
|
|
|
2010-12-15 20:10:19 +00: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-18 03:07:23 +00:00
|
|
|
ifdef ENABLE_MARIONETTE
|
|
|
|
DEFINES += -DENABLE_MARIONETTE=1
|
|
|
|
endif
|
|
|
|
|
2010-12-15 20:10:08 +00:00
|
|
|
ifdef MOZ_PKG_MANIFEST_P
|
2014-05-08 03:21:22 +00: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-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
2010-12-15 20:10:19 +00:00
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
2013-12-02 21:34:21 +00:00
|
|
|
printf '\n[multilocale]\n' >> $@
|
2014-05-08 03:21:22 +00:00
|
|
|
printf '@BINPATH@/res/multilocale.json\n' >> $@
|
2010-12-16 19:53:32 +00:00
|
|
|
for LOCALE in en-US $(MOZ_CHROME_MULTILOCALE) ;\
|
2010-12-15 20:10:19 +00:00
|
|
|
do \
|
2013-12-03 22:28:03 +00:00
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
|
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \
|
2010-12-15 20:10:19 +00:00
|
|
|
done
|
2014-05-08 03:21:22 +00:00
|
|
|
COMMA=,
|
|
|
|
echo '{"locales": [$(foreach l,$(MOZ_CHROME_MULTILOCALE),"$(l)"$(COMMA)) "en-US"]}' \
|
|
|
|
> $(FINAL_TARGET)/res/multilocale.json
|
2010-12-15 20:10:08 +00:00
|
|
|
endif
|
2010-10-20 03:33:01 +00:00
|
|
|
|
2010-12-15 20:10:19 +00:00
|
|
|
GARBAGE += $(MOZ_PKG_MANIFEST)
|
2008-04-18 13:41:49 +00:00
|
|
|
endif
|