Bug 1309304 - Move search python files to a central location. r?glandium draft
authorMichael Kaply <mozilla@kaply.com>
Thu, 20 Oct 2016 11:25:29 -0500
changeset 429324 00441a6c5218f5ef7d96410b28c7f34af57b5697
parent 427583 25f254fd1948b8472b338059284d12c0b324d951
child 534953 351a05ab3c21e98a2153372bc8348d3bca669c67
push id33546
push usermozilla@kaply.com
push dateTue, 25 Oct 2016 18:36:12 +0000
reviewersglandium
bugs1309304
milestone52.0a1
Bug 1309304 - Move search python files to a central location. r?glandium MozReview-Commit-ID: DEqQfJ8lHxA
browser/locales/Makefile.in
browser/locales/searchjson.py
browser/locales/searchplugins.py
python/mozbuild/mozbuild/action/generate_searchjson.py
python/mozbuild/mozbuild/action/output_searchplugins_list.py
--- 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