Bug 1413240 - Build webext langpack for mobile/android. r=gandalf
This cargo cults a few things from browser/ and works when following
the instructions from
https://bugzilla.mozilla.org/show_bug.cgi?id=1413240#c0.
MozReview-Commit-ID: ciA7nfc8BR
--- a/mobile/android/build.mk
+++ b/mobile/android/build.mk
@@ -51,18 +51,17 @@ deb: package
upload::
@$(MAKE) -C mobile/android/installer upload
wget-en-US:
@$(MAKE) -C mobile/android/locales $@
# make -j1 because dependencies in l10n build targets don't work
# with parallel builds
-# Not exposing langpack-% because that doesn't work on Android
-merge-% installers-% chrome-%:
+merge-% installers-% langpack-% chrome-%:
$(MAKE) -j1 -C mobile/android/locales $@
ifdef ENABLE_TESTS
# Implemented in testing/testsuite-targets.mk
mochitest-browser-chrome:
$(RUN_MOCHITEST) --flavor=browser
$(CHECK_TEST_ERROR)
--- a/mobile/android/locales/Makefile.in
+++ b/mobile/android/locales/Makefile.in
@@ -13,16 +13,22 @@ SUBMAKEFILES += \
L10N_PREF_JS_EXPORTS = $(firstword $(wildcard $(LOCALE_SRCDIR)/mobile-l10n.js) \
$(srcdir)/en-US/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
include $(topsrcdir)/config/rules.mk
+# Required for l10n.mk - defines a list of app sub dirs that should
+# be included in langpack xpis.
+DIST_SUBDIRS = $(DIST_SUBDIR)
+
+MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org
+
include $(topsrcdir)/toolkit/locales/l10n.mk
# need to kill stage for repacks for now due to the library moves
# in PACKAGE and UNPACKAGE
# also clean up potential left-overs of multi-locale builds, notably
# values-*/strings.xml and raw-*/suggestedsites.json.
# Those would be in the way of a single locale build, which this
# target is for
@@ -51,23 +57,26 @@ chrome-%: IS_LANGUAGE_REPACK=1
chrome-%:
$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
@$(MAKE) -C $(DEPTH)/mobile/locales chrome-$*
@$(MAKE) chrome AB_CD=$*
ifeq ($(OS_TARGET),Android)
@$(MAKE) -C $(DEPTH)/mobile/android/base/locales chrome-$*
endif
+langpack: langpack-$(AB_CD)
+
# This is a generic target that will make a langpack and repack tarball
# builds. It is called from the tinderbox scripts. Alter it with caution.
installers-%: IS_LANGUAGE_REPACK=1
installers-%:
@$(MAKE) clobber-stage
@$(MAKE) libs-$*
+ @$(MAKE) package-langpack-$*
@$(MAKE) repackage-zip-$*
@echo 'repackaging done'
# When we unpack fennec on MacOS X the platform.ini and application.ini are in slightly
# different locations that on all other platforms
ifeq (Darwin, $(OS_ARCH))
GECKO_PLATFORM_INI_PATH='$(STAGEDIST)/platform.ini'
FENNEC_APPLICATION_INI_PATH='$(STAGEDIST)/application.ini'