Skip to content

Commit

Permalink
Bug 817170: Run multilocale-clean before multilocale (and include sha…
Browse files Browse the repository at this point in the history
…red/). r=vingtetun a=bb+
  • Loading branch information
stasm committed Dec 6, 2012
1 parent f4e4888 commit 217c3a5
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Makefile
Expand Up @@ -51,9 +51,6 @@ ADB_REMOUNT?=0

GAIA_ALL_APP_SRCDIRS=$(GAIA_APP_SRCDIRS)

GAIA_LOCALES_PATH?=locales
LOCALES_FILE?=shared/resources/languages.json

ifeq ($(MAKECMDGOALS), demo)
GAIA_DOMAIN=thisdomaindoesnotexist.org
GAIA_APP_SRCDIRS=apps showcase_apps
Expand All @@ -76,6 +73,10 @@ ifneq ($(GAIA_OUTOFTREE_APP_SRCDIRS),)
GAIA_APP_SRCDIRS += outoftree_apps
endif

GAIA_LOCALES_PATH?=locales
LOCALES_FILE?=shared/resources/languages.json
GAIA_LOCALE_SRCDIRS=shared $(GAIA_APP_SRCDIRS)

###############################################################################
# The above rules generate the profile/ folder and all its content. #
# The profile folder content depends on different rules: #
Expand Down Expand Up @@ -169,13 +170,14 @@ LANG=POSIX # Avoiding sort order differences between OSes
.PHONY: multilocale
multilocale:
ifneq ($(LOCALE_BASEDIR),)
$(MAKE) multilocale-clean
@echo "Enable locales specified in $(LOCALES_FILE)..."
@targets=""; \
for appdir in $(GAIA_APP_SRCDIRS); do \
for appdir in $(GAIA_LOCALE_SRCDIRS); do \
targets="$$targets --target $$appdir"; \
done; \
python $(CURDIR)/build/multilocale.py \
--config $(CURDIR)/$(LOCALES_FILE) \
--config $(LOCALES_FILE) \
--source $(LOCALE_BASEDIR) \
$$targets;
@echo "Done"
Expand All @@ -189,14 +191,14 @@ multilocale-clean:
@echo "Cleaning l10n bits..."
ifeq ($(wildcard .hg),.hg)
@hg update --clean
@hg status -n | xargs rm -rf
@hg status -n $(GAIA_LOCALE_SRCDIRS) | grep '\.properties' | xargs rm -rf
else
@git ls-files --other --exclude-standard $(GAIA_APP_SRCDIRS) | grep '\.properties' | xargs rm -f
@git ls-files --modified $(GAIA_APP_SRCDIRS) | grep '\.properties' | xargs git checkout --
@git ls-files --other --exclude-standard $(GAIA_LOCALE_SRCDIRS) | grep '\.properties' | xargs rm -f
@git ls-files --modified $(GAIA_LOCALE_SRCDIRS) | grep '\.properties' | xargs git checkout --
ifneq ($(DEBUG),1)
@# Leave these files modified in DEBUG profiles
@git ls-files --modified $(GAIA_APP_SRCDIRS) | grep 'manifest.webapp' | xargs git checkout --
@git ls-files --modified $(GAIA_APP_SRCDIRS) | grep '\.ini' | xargs git checkout --
@git ls-files --modified $(GAIA_LOCALE_SRCDIRS) | grep 'manifest.webapp' | xargs git checkout --
@git ls-files --modified $(GAIA_LOCALE_SRCDIRS) | grep '\.ini' | xargs git checkout --
@git checkout -- shared/resources/languages.json
@echo "Done"
endif
Expand Down Expand Up @@ -241,9 +243,6 @@ offline-cache: webapp-manifests install-xulrunner-sdk

# Create webapps
offline: webapp-manifests webapp-zip
ifneq ($(LOCALE_BASEDIR),)
$(MAKE) multilocale-clean
endif


# The install-xulrunner target arranges to get xulrunner downloaded and sets up
Expand Down

0 comments on commit 217c3a5

Please sign in to comment.