Bug 1309304 - Move search python files to a central location. r?glandium
MozReview-Commit-ID: DEqQfJ8lHxA
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -56,17 +56,17 @@ UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(ST
STUB_HOOK = $(NSINSTALL) -D '$(ABS_DIST)/$(PKG_INST_PATH)'; \
$(RM) '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
cp ../installer/windows/l10ngen/stub.exe '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
chmod 0755 '$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
$(NULL)
endif
-SEARCHPLUGINS_FILENAMES := $(shell $(PYTHON) $(srcdir)/searchplugins.py $(srcdir)/search/list.json $(AB_CD))
+SEARCHPLUGINS_FILENAMES := $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD)))
SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD)
SEARCHPLUGINS_TARGET := libs searchplugins
SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(warning Missing searchplugin: $(plugin))))
# Some locale-specific search plugins may have preprocessor directives, but the
# default en-US ones do not.
SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings
PP_TARGETS += SEARCHPLUGINS
@@ -79,17 +79,17 @@ libs:: searchplugins
# be included in langpack xpis.
DIST_SUBDIRS = $(DIST_SUBDIR)
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/locales/l10n.mk
$(list-json): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
- $(shell $(PYTHON) $(srcdir)/searchjson.py $(srcdir)/search/list.json $(AB_CD) $(list-json))
+ $(call py_action,generate_searchjson,$(srcdir)/search/list.json $(AB_CD) $(list-json))
searchplugins:: $(list-json)
$(STAGEDIST): $(DIST)/branding
$(DIST)/branding:
$(NSINSTALL) -D $@
DEFINES += -DBOOKMARKS_INCLUDE_DIR=$(dir $(call MERGE_FILE,profile/bookmarks.inc))
rename from browser/locales/searchjson.py
rename to python/mozbuild/mozbuild/action/generate_searchjson.py
rename from browser/locales/searchplugins.py
rename to python/mozbuild/mozbuild/action/output_searchplugins_list.py