bug 1370506, factor merge-% into l10n.mk, pass --l10n-base, r?glandium
This is a bustage fix for Fennec Nightlies, which don't set the base
dir in the mozconfig, but take it from the environment.
With this fix, it works both ways.
MozReview-Commit-ID: 2erzhowoKZm
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -173,21 +173,16 @@ endif
ident:
@printf 'fx_revision '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
$(STAGEDIST)/application.ini App SourceStamp
@printf 'buildid '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
$(STAGEDIST)/application.ini App BuildID
-merge-%: IS_LANGUAGE_REPACK=1
-merge-%: $(L10NSRCDIR)
- $(RM) -rf $(REAL_LOCALE_MERGEDIR)
- $(topsrcdir)/mach compare-locales --merge-dir $(REAL_LOCALE_MERGEDIR) $*
-
# test target, depends on make package
# try to repack x-test, with just toolkit/defines.inc being there
l10n-check:: INNER_UNMAKE_PACKAGE=true
l10n-check::
$(RM) -rf x-test
$(NSINSTALL) -D x-test/toolkit
echo '#define MOZ_LANG_TITLE Just testing' > x-test/toolkit/defines.inc
@# ZIP_IN='$(ZIP_IN)' will pass down the *current* value of ZIP_IN, and
--- a/mobile/android/locales/Makefile.in
+++ b/mobile/android/locales/Makefile.in
@@ -66,13 +66,8 @@ endif
ident:
@printf 'gecko_revision '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(GECKO_PLATFORM_INI_PATH) Build SourceStamp
@printf 'fennec_revision '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(FENNEC_APPLICATION_INI_PATH) App SourceStamp
@printf 'buildid '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(FENNEC_APPLICATION_INI_PATH) App BuildID
-
-merge-%: IS_LANGUAGE_REPACK=1
-merge-%: $(L10NSRCDIR)
- $(RM) -rf $(REAL_LOCALE_MERGEDIR)
- $(topsrcdir)/mach compare-locales --merge-dir $(REAL_LOCALE_MERGEDIR) $*
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -178,16 +178,21 @@ TK_DEFINES = $(firstword \
$(MOZILLA_DIR)/toolkit/locales/en-US/defines.inc)
# Dealing with app sub dirs: If DIST_SUBDIRS is defined it contains a
# listing of app sub-dirs we should include in langpack xpis. If not,
# check DIST_SUBDIR, and if that isn't present, just package the default
# chrome directory.
PKG_ZIP_DIRS = chrome $(or $(DIST_SUBDIRS),$(DIST_SUBDIR))
+merge-%: IS_LANGUAGE_REPACK=1
+merge-%: $(L10NSRCDIR)
+ $(RM) -rf $(REAL_LOCALE_MERGEDIR)
+ $(MOZILLA_DIR)/mach compare-locales --l10n-base $(L10NBASEDIR) --merge-dir $(REAL_LOCALE_MERGEDIR) $*
+
langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%: IS_LANGUAGE_REPACK=1
langpack-%: IS_LANGPACK=1
langpack-%: merge-% libs-%
@echo 'Making langpack $(LANGPACK_FILE)'
$(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)