From b5d4216fb3bc196f4edad814243f97c7d30d809e Mon Sep 17 00:00:00 2001 From: Joey Armstrong Date: Fri, 27 Apr 2012 17:00:00 -0400 Subject: [PATCH] bug 748130: Replace FORCE dependencies, repacks are a conditional force. r=ted --- config/config.mk | 4 ++- js/src/config/config.mk | 4 ++- mobile/android/base/locales/Makefile.in | 36 ++++++++++++++++++++----- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/config/config.mk b/config/config.mk index 2d799f41eb2..6a5ba195a17 100644 --- a/config/config.mk +++ b/config/config.mk @@ -713,7 +713,9 @@ endif # WINNT/OS2 AB_CD = $(MOZ_UI_LOCALE) ifndef L10NBASEDIR -L10NBASEDIR = $(error L10NBASEDIR not defined by configure) + L10NBASEDIR = $(error L10NBASEDIR not defined by configure) +else + IS_LANGUAGE_REPACK = 1 endif EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(call core_realpath,$(L10NBASEDIR))/$(AB_CD)/$(subst /locales,,$(1))) diff --git a/js/src/config/config.mk b/js/src/config/config.mk index 2d799f41eb2..6a5ba195a17 100644 --- a/js/src/config/config.mk +++ b/js/src/config/config.mk @@ -713,7 +713,9 @@ endif # WINNT/OS2 AB_CD = $(MOZ_UI_LOCALE) ifndef L10NBASEDIR -L10NBASEDIR = $(error L10NBASEDIR not defined by configure) + L10NBASEDIR = $(error L10NBASEDIR not defined by configure) +else + IS_LANGUAGE_REPACK = 1 endif EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(call core_realpath,$(L10NBASEDIR))/$(AB_CD)/$(subst /locales,,$(1))) diff --git a/mobile/android/base/locales/Makefile.in b/mobile/android/base/locales/Makefile.in index 685174e32f6..94fe6be370c 100644 --- a/mobile/android/base/locales/Makefile.in +++ b/mobile/android/base/locales/Makefile.in @@ -54,14 +54,21 @@ BRANDPATH = $(call core_abspath,$(DEPTH)/dist/bin/chrome/$(AB_CD)/locale/brandin else BRANDPATH = $(call core_abspath,$(DIST)/xpi-stage/$(XPI_NAME)/chrome/$(AB_CD)/locale/branding/brand.dtd) endif +$(warnIfEmpty,AB_CD) # todo: $(errorIfEmpty ) DEFINES += -DAB_CD=$(AB_CD) -libs realchrome:: ../res/values/strings.xml ; +dir-res-values := ../res/values +strings-xml := $(dir-res-values)/strings.xml +strings-xml-in := $(srcdir)/../strings.xml.in + +GARBAGE += $(strings-xml) + +libs realchrome:: $(strings-xml) chrome-%:: AB_CD=$* chrome-%:: - @$(MAKE) ../res/values-$(AB_rCD)/strings.xml AB_CD=$* + @$(MAKE) $(dir-res-values)-$(AB_rCD)/strings.xml AB_CD=$* # setup the path to bookmarks.inc. copied and tweaked version of MERGE_FILE from config/config.mk MOBILE_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/mobile/locales/en-US,$(call core_realpath,$(L10NBASEDIR))/$(AB_CD)/mobile) @@ -75,14 +82,31 @@ else BOOKMARKSPATH = $(call core_abspath,$(MOBILE_LOCALE_SRCDIR)/profile/bookmarks.inc) endif -%/strings.xml: FORCE - $(NSINSTALL) -D $* - $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \ +# Determine the ../res/values[-*]/ path +strings-xml-bypath = $(filter %/strings.xml,$(MAKECMDGOALS)) +ifeq (,$(strip $(strings-xml-bypath))) + strings-xml-bypath = $(strings-xml) +endif +dir-strings-xml = $(patsubst %/,%,$(dir $(strings-xml-bypath))) + +strings-xml-preqs =\ + $(strings-xml-in) \ + $(BRANDPATH) \ + $(STRINGSPATH) \ + $(SYNCSTRINGSPATH) \ + $(BOOKMARKSPATH) \ + $(if $(IS_LANGUAGE_REPACK),FORCE) \ + $(NULL) + +$(dir-strings-xml)/strings.xml: $(strings-xml-preqs) + $(NSINSTALL) -D $(dir-strings-xml) + $(PYTHON) $(topsrcdir)/config/Preprocessor.py \ + $(DEFINES) \ -DBRANDPATH="$(BRANDPATH)" \ -DSTRINGSPATH="$(STRINGSPATH)" \ -DSYNCSTRINGSPATH="$(SYNCSTRINGSPATH)" \ -DBOOKMARKSPATH="$(BOOKMARKSPATH)" \ - $(srcdir)/../strings.xml.in \ + $< \ > $@ include $(topsrcdir)/config/rules.mk