Bug 1424171: Allow controlling the base a relative directories used for looking up localized files; r=ted

MozReview-Commit-ID: J0A2iD5PkD6

--HG--
extra : rebase_source : fe7a2d5e2f486b28902048155718ed8859b06099
extra : source : fca9f7cf6bdbb24f558a9c24973e65bf5681eb09
This commit is contained in:
Tom Prince 2017-12-11 10:02:49 -07:00
Родитель 10adc74e4b
Коммит 46e782b6d5
1 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -167,8 +167,9 @@ endif
endif # MOZ_PROFILE_USE
endif # NO_PROFILE_GUIDED_OPTIMIZE
LOCALE_TOPDIR ?= $(topsrcdir)
MAKE_JARS_FLAGS = \
-t $(topsrcdir) \
-t $(LOCALE_TOPDIR) \
-f $(MOZ_JAR_MAKER_FILE_FORMAT) \
$(NULL)
@ -354,14 +355,18 @@ ifndef L10NBASEDIR
L10NBASEDIR = $(error L10NBASEDIR not defined by configure)
endif
EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(or $(realpath $(L10NBASEDIR)),$(abspath $(L10NBASEDIR)))/$(AB_CD)/$(subst /locales,,$(1)))
EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(LOCALE_TOPDIR)/$(1)/en-US,$(or $(realpath $(L10NBASEDIR)),$(abspath $(L10NBASEDIR)))/$(AB_CD)/$(subst /locales,,$(1)))
ifdef relativesrcdir
LOCALE_SRCDIR ?= $(call EXPAND_LOCALE_SRCDIR,$(relativesrcdir))
LOCALE_RELATIVEDIR ?= $(relativesrcdir)
endif
ifdef LOCALE_RELATIVEDIR
LOCALE_SRCDIR ?= $(call EXPAND_LOCALE_SRCDIR,$(LOCALE_RELATIVEDIR))
endif
ifdef relativesrcdir
MAKE_JARS_FLAGS += --relativesrcdir=$(relativesrcdir)
MAKE_JARS_FLAGS += --relativesrcdir=$(LOCALE_RELATIVEDIR)
ifneq (en-US,$(AB_CD))
ifdef IS_LANGUAGE_REPACK
MAKE_JARS_FLAGS += --locale-mergedir=$(REAL_LOCALE_MERGEDIR)
@ -378,7 +383,7 @@ endif # ! relativesrcdir
ifdef IS_LANGUAGE_REPACK
MERGE_FILE = $(firstword \
$(wildcard $(REAL_LOCALE_MERGEDIR)/$(subst /locales,,$(relativesrcdir))/$(1)) \
$(wildcard $(REAL_LOCALE_MERGEDIR)/$(subst /locales,,$(LOCALE_RELATIVEDIR))/$(1)) \
$(wildcard $(LOCALE_SRCDIR)/$(1)) \
$(srcdir)/en-US/$(1) )
else