2012-05-21 15:12:37 +04: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 17:41:49 +04:00
|
|
|
|
2013-02-26 00:47:23 +04:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2010-12-15 23:10:08 +03:00
|
|
|
# overwrite mobile-l10n.js with a matchOS=true one for multi-locale builds
|
|
|
|
ifeq ($(AB_CD),multi)
|
2015-02-01 19:41:04 +03: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 23:10:08 +03:00
|
|
|
endif
|
2010-10-20 02:28:10 +04:00
|
|
|
|
2010-12-15 23:10:08 +03:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2008-07-26 03:07:50 +04:00
|
|
|
|
2010-12-15 23:10:08 +03:00
|
|
|
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
2010-10-20 02:28:10 +04:00
|
|
|
|
2015-07-15 10:31:53 +03:00
|
|
|
MOZ_PKG_MANIFEST = $(srcdir)/package-manifest.in
|
2016-10-31 22:54:42 +03:00
|
|
|
MOZ_PKG_DUPEFLAGS = -f $(srcdir)/allowed-dupes.mn
|
2015-07-15 10:31:53 +03:00
|
|
|
|
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
|
|
|
MOZ_PKG_MANIFEST_DEPS = locale-manifest.in
|
|
|
|
|
|
|
|
DEFINES += -DPKG_LOCALE_MANIFEST=$(CURDIR)/locale-manifest.in
|
|
|
|
endif
|
2010-12-15 23:10:08 +03:00
|
|
|
|
|
|
|
DEFINES += \
|
2014-09-05 07:11:09 +04:00
|
|
|
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-DPREF_DIR=$(PREF_DIR) \
|
|
|
|
-DJAREXT= \
|
|
|
|
-DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) \
|
2015-05-15 00:20:57 +03:00
|
|
|
-DMOZ_CHILD_PROCESS_NAME_PIE=$(MOZ_CHILD_PROCESS_NAME_PIE) \
|
2014-09-05 07:11:09 +04:00
|
|
|
-DANDROID_CPU_ARCH=$(ANDROID_CPU_ARCH) \
|
|
|
|
$(NULL)
|
2008-04-18 17:41:49 +04:00
|
|
|
|
2014-08-02 00:23:48 +04:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DMOZ_DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2016-04-22 23:01:21 +03:00
|
|
|
ifdef MOZ_ANDROID_EXCLUDE_FONTS
|
|
|
|
DEFINES += -DMOZ_ANDROID_EXCLUDE_FONTS=1
|
|
|
|
endif
|
|
|
|
|
2016-04-22 23:01:21 +03:00
|
|
|
ifdef MOZ_ANDROID_GCM
|
|
|
|
DEFINES += -DMOZ_ANDROID_GCM=1
|
|
|
|
endif
|
|
|
|
|
2016-08-18 01:02:31 +03:00
|
|
|
ifdef MOZ_ARTIFACT_BUILDS
|
|
|
|
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
|
|
|
|
endif
|
|
|
|
|
2013-01-23 14:23:15 +04:00
|
|
|
MOZ_PACKAGER_MINIFY=1
|
2011-01-07 18:30:58 +03:00
|
|
|
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
2014-10-31 03:02:58 +03: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 12:11:00 +03:00
|
|
|
ifndef MOZ_DEBUG
|
|
|
|
ifndef NIGHTLY_BUILD
|
2014-10-31 03:02:58 +03:00
|
|
|
MOZ_PACKAGER_MINIFY_JS=1
|
|
|
|
endif
|
2014-11-04 12:11:00 +03:00
|
|
|
endif
|
|
|
|
endif
|
2014-10-31 03:02:58 +03:00
|
|
|
|
2010-12-15 23:10:19 +03: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 07:07:23 +04:00
|
|
|
ifdef ENABLE_MARIONETTE
|
|
|
|
DEFINES += -DENABLE_MARIONETTE=1
|
|
|
|
endif
|
|
|
|
|
2014-05-08 07:21:22 +04:00
|
|
|
|
2010-12-15 23:10:19 +03:00
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
2015-07-15 10:31:53 +03:00
|
|
|
# When MOZ_CHROME_MULTILOCALE is defined, we write multilocale.json like:
|
|
|
|
# {"locales": ["en-US", "de", "ar", ...]}
|
|
|
|
locale-manifest.in: $(GLOBAL_DEPS) FORCE
|
|
|
|
printf '\n[multilocale]\n' > $@
|
2014-05-08 07:21:22 +04:00
|
|
|
printf '@BINPATH@/res/multilocale.json\n' >> $@
|
2010-12-16 22:53:32 +03:00
|
|
|
for LOCALE in en-US $(MOZ_CHROME_MULTILOCALE) ;\
|
2010-12-15 23:10:19 +03:00
|
|
|
do \
|
2013-12-04 02:28:03 +04:00
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
|
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \
|
2010-12-15 23:10:19 +03:00
|
|
|
done
|
2014-05-08 07:21:22 +04:00
|
|
|
COMMA=,
|
|
|
|
echo '{"locales": [$(foreach l,$(MOZ_CHROME_MULTILOCALE),"$(l)"$(COMMA)) "en-US"]}' \
|
|
|
|
> $(FINAL_TARGET)/res/multilocale.json
|
2010-10-20 07:33:01 +04:00
|
|
|
|
2015-07-15 10:31:53 +03:00
|
|
|
GARBAGE += locale-manifest.in
|
2008-04-18 17:41:49 +04:00
|
|
|
endif
|