Bug 937212 - Port part 1 of bug 935305 to comm-central for fix the CLOSED TREE. r=Standard8
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 12 Nov 2013 18:40:12 +0900
changeset 13263 42b421a3887b58db025bf84e951b646573ace947
parent 13262 6bc1f1e35a5626de1db889b0d58b6f9ba5df6c8f
child 13264 eda1ae45ed6f740f4b2331030e31d3e670eb81d9
push id9643
push usermh@glandium.org
push dateTue, 12 Nov 2013 09:40:29 +0000
treeherdercomm-central@42b421a3887b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs937212, 935305
Bug 937212 - Port part 1 of bug 935305 to comm-central for fix the CLOSED TREE. r=Standard8
calendar/base/backend/icaljs/Makefile.in
calendar/base/backend/libical/build/Makefile.in
calendar/lightning/Makefile.in
calendar/lightning/lightning-packager.mk
calendar/locales/Makefile.in
config/rules.mk
mail/app/profile/extensions/Makefile.in
mail/installer/Makefile.in
mail/installer/windows/Makefile.in
mail/themes/Makefile.in
suite/browser/Makefile.in
suite/installer/Makefile.in
suite/installer/windows/Makefile.in
suite/locales/Makefile.in
suite/themes/classic/Makefile.in
--- a/calendar/base/backend/icaljs/Makefile.in
+++ b/calendar/base/backend/icaljs/Makefile.in
@@ -31,16 +31,16 @@ libs:: $(EXTRA_SCRIPTS)
 
 libs:: $(BACKEND_MANIFESTS)
 	$(EXIT_ON_ERROR) \
 	$(NSINSTALL) -D $(FINAL_TARGET)/components; \
 	for i in $^; do \
 	  fname=`basename $$i`; \
 	  dest=$(FINAL_TARGET)/components/$${fname}; \
 	  $(RM) -f $$dest; \
-	  $(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
+	  $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i -o $$dest; \
 	done
 
 # The install target must use SYSINSTALL, which is NSINSTALL in copy mode.
 install:: $(EXTRA_SCRIPTS)
 	$(call install_cmd,$(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/calendar-js)
 
 include $(topsrcdir)/config/rules.mk
--- a/calendar/base/backend/libical/build/Makefile.in
+++ b/calendar/base/backend/libical/build/Makefile.in
@@ -45,10 +45,10 @@ DEFINES += -DSHARED_LIBRARY=$(SHARED_LIB
 
 libs:: $(BACKEND_MANIFESTS)
 	$(EXIT_ON_ERROR) \
 	$(NSINSTALL) -D $(FINAL_TARGET)/components; \
 	for i in $^; do \
 	  fname=`basename $$i`; \
 	  dest=$(FINAL_TARGET)/components/$${fname}; \
 	  $(RM) -f $$dest; \
-	  $(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
+	  $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i -o $$dest; \
 	done
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -120,17 +120,17 @@ libs::
 
 include $(topsrcdir)/config/rules.mk
 include $(srcdir)/lightning-packager.mk
 
 # For Lightning, we also need to preprocess the l10n prefs
 repack-process-extrafiles: lightning-extrafiles
 lightning-extrafiles: LOCALE_BASEDIR=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)
 lightning-extrafiles:
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(LOCALE_BASEDIR)/lightning-l10n.js  > $(DIST)/$(UNIVERSAL_PATH)xpi-stage/$(L10N_XPI_NAME)/$(PREF_DIR)/lightning-l10n.js
+	$(call py_action,preprocessor,$(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(LOCALE_BASEDIR)/lightning-l10n.js  -o $(DIST)/$(UNIVERSAL_PATH)xpi-stage/$(L10N_XPI_NAME)/$(PREF_DIR)/lightning-l10n.js)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 # If the macbundle dist dir was already created, sync lightning here to avoid
 # the need to make -C objdir/mail/app each time
 libs::
 	[ -d $(DIST)/$(MOZ_MACBUNDLE_NAME) ] && rsync -aL $(FINAL_TARGET)/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/extensions/$(XPI_EM_ID) || true
 endif
 
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -147,20 +147,20 @@ libs-%:
 	  XPI_NAME=$(FINAL_XPI_NAME) XPI_PKGNAME=$(FINAL_XPI_PKGNAME) USE_EXTENSION_MANIFEST=1
 	$(MAKE) -C locales tools AB_CD=$* FINAL_TARGET=$(_ABS_DIST)/$(UNIVERSAL_PATH)xpi-stage/$(FINAL_XPI_NAME) \
 	  XPI_NAME=$(FINAL_XPI_NAME) XPI_PKGNAME=$(FINAL_XPI_PKGNAME) USE_EXTENSION_MANIFEST=1
 
 # For localized xpis, the install.rdf need to be reprocessed with some defines
 # from the locale.
 repack-process-extrafiles: LOCALE_BASEDIR=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)
 repack-process-extrafiles:
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py \
+	$(call py_action,preprocessor, \
 	  $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
 	  -I $(LOCALE_BASEDIR)/defines.inc \
-	  $(srcdir)/install.rdf > $(XPI_STAGE_PATH)/$(L10N_XPI_NAME)/install.rdf
+	  $(srcdir)/install.rdf -o $(XPI_STAGE_PATH)/$(L10N_XPI_NAME)/install.rdf)
 
 # When repackaging Lightning from the builder, platform.ini is not yet created.
 # Recreate it from the application.ini bundled with the downloaded xpi.
 $(LIBXUL_DIST)/bin/platform.ini:
 	mkdir -p $(@D)
 	echo "[Build]" >> $(LIBXUL_DIST)/bin/platform.ini
 	echo "Milestone=$(call print_ltnconfig,Gecko,MaxVersion)" >> $(LIBXUL_DIST)/bin/platform.ini
 	echo "SourceStamp=$(call print_ltnconfig,Build,SourceStamp)" >> $(LIBXUL_DIST)/bin/platform.ini
--- a/calendar/locales/Makefile.in
+++ b/calendar/locales/Makefile.in
@@ -187,17 +187,17 @@ repackage-zip-%: $(ZIP_IN) $(STAGEDIST) 
 
 langpack-%: LANGPACK_FILE=$(_ABS_DIST)/install/sunbird-$(MOZ_APP_VERSION).$(AB_CD).langpack.xpi
 langpack-%: AB_CD=$*
 langpack-%: XPI_NAME=locale-$*
 langpack-%: libs-%
 	@echo "Making langpack $(LANGPACK_FILE)"
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C ../timezones/locales libs AB_CD=$* XPI_NAME=calendar-timezones USE_EXTENSION_MANIFEST=1
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) -I$(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) -I$(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf -o $(FINAL_TARGET)/install.rdf)
 	cd $(DIST)/xpi-stage/calendar-timezones/chrome && \
 	  tar $(TAR_CREATE_FLAGS) - * | ( cd $(_ABS_DIST)/xpi-stage/locale-$(AB_CD)/chrome && tar -xf - )
 	cat $(DIST)/xpi-stage/calendar-timezones/chrome.manifest >> $(_ABS_DIST)/xpi-stage/locale-$(AB_CD)/chrome.manifest
 	cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
 	  if test -d dictionaries; then \
 	    $(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest defaults dictionaries -x chrome/$(AB_CD).manifest -x chrome/sunbird-$(AB_CD).manifest -x chrome/calendar-$(AB_CD).manifest; \
 	  else \
 	    $(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest defaults -x chrome/$(AB_CD).manifest -x chrome/sunbird-$(AB_CD).manifest -x chrome/calendar-$(AB_CD).manifest; \
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1517,17 +1517,17 @@ endef
 #   files for the 'libs' target.
 
 # preprocess_file_template defines preprocessing rules.
 # $(call preprocess_file_template, source_file, output_file,
 #                                  makefile_target, extra_flags)
 define preprocess_file_template
 $(2): $(1) $$(GLOBAL_DEPS)
 	$$(RM) "$$@"
-	$$(PYTHON) $$(MOZILLA_DIR)/config/Preprocessor.py $(4) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) "$$<" -o "$$@"
+	$$(call py_action,preprocessor,$(4) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) "$$<" -o "$$@")
 $(3):: $(2)
 endef
 
 $(foreach category,$(PP_TARGETS),						\
   $(foreach file,$($(category)),						\
     $(eval $(call preprocess_file_template,					\
                   $(file),							\
                   $(or $($(category)_PATH),$(CURDIR))/$(notdir $(file:.in=)),	\
--- a/mail/app/profile/extensions/Makefile.in
+++ b/mail/app/profile/extensions/Makefile.in
@@ -26,17 +26,17 @@ endif
 
 DEFINES += \
   -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
   -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION) \
   $(NULL)
 
 define _INSTALL_EXTENSION
 $(NSINSTALL) -D $(dir) && \
-  $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in > $(dir)/install.rdf && \
+  $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in -o $(dir)/install.rdf && \
   cd $(dir) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi install.rdf && \
   cd $(abspath $(srcdir)/$(dir)) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in $(EXTRA_ARGS)
 
 endef # do not remove the blank line!
 
 libs::
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -77,17 +77,17 @@ endif
 ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
 DEFINES += -DMOZ_SHARED_MOZGLUE=1
 endif
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = package-manifest
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 MOZ_PKG_MAC_DSSTORE=branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=branding/background.png
 MOZ_PKG_MAC_ICON=branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
--- a/mail/installer/windows/Makefile.in
+++ b/mail/installer/windows/Makefile.in
@@ -57,37 +57,37 @@ installer::
 	$(MAKE) $(CONFIG_DIR)/setup.exe
 
 # For building the uninstaller during the application build so it can be
 # included for mar file generation.
 uninstaller::
 	$(RM) -r $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
 	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-locale $(MOZILLA_SRCDIR) \
 	  $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) $(CONFIG_DIR)
 
 # For building the maintenanceservice installer
 ifdef MOZ_MAINTENANCE_SERVICE
 maintenanceservice_installer::
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
 	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-locale $(MOZILLA_SRCDIR) \
 	  $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) $(CONFIG_DIR)
 endif
 
 $(CONFIG_DIR)/setup.exe::
 	$(RM) -r $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
 	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-locale $(MOZILLA_SRCDIR) \
 	  $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) $(CONFIG_DIR)
 
 include $(topsrcdir)/config/rules.mk
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/makensis.mk
--- a/mail/themes/Makefile.in
+++ b/mail/themes/Makefile.in
@@ -11,14 +11,12 @@ include $(topsrcdir)/config/config.mk
 
 include $(topsrcdir)/config/rules.mk
 
 CLASSIC_EXTENSION_DIR = {972ce4c6-7e08-4474-a285-3208198ce6fd}
 
 DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)
 
 libs::
-	$(NSINSTALL) -D $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)
-	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf > $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf -o $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf)
 
 install::
-	$(NSINSTALL) -D $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)
-	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf > $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf -o $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf)
--- a/suite/browser/Makefile.in
+++ b/suite/browser/Makefile.in
@@ -29,11 +29,10 @@ ifdef MOZILLA_OFFICIAL
 DEFINES += -DOFFICIAL_BUILD=1
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifndef LIBXUL_SDK
 # channel-prefs.js is handled separate from other prefs due to bug 756325.
 libs:: $(srcdir)/channel-prefs.js
-	$(NSINSTALL) -D $(DIST)/bin/defaults/pref
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(PREF_PPFLAGS) $(ACDEFINES) $^ > $(DIST)/bin/defaults/pref/channel-prefs.js
+	$(call py_action,preprocessor,$(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
 endif
--- a/suite/installer/Makefile.in
+++ b/suite/installer/Makefile.in
@@ -115,17 +115,17 @@ DEFINES += -DWIN_OR_OS2=1
 endif
 
 DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = package-manifest
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
 
 GARBAGE += $(MOZ_PKG_MANIFEST)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 MOZ_PKG_MAC_DSSTORE=branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=branding/background.png
 MOZ_PKG_MAC_ICON=branding/disk.icns
--- a/suite/installer/windows/Makefile.in
+++ b/suite/installer/windows/Makefile.in
@@ -50,28 +50,28 @@ installer::
 	$(MAKE) $(CONFIG_DIR)/setup.exe
 
 # For building the uninstaller during the application build so it can be
 # included for mar file generation.
 uninstaller::
 	$(RM) -r $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
 	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-locale $(MOZILLA_SRCDIR) \
 	  $(call EXPAND_LOCALE_SRCDIR,suite/locales)/installer/windows $(AB_CD) $(CONFIG_DIR)
 
 $(CONFIG_DIR)/setup.exe::
 	$(RM) -r $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --convert-utf8-utf16le $(topsrcdir)/suite/installer/license.txt $(CONFIG_DIR)/license.txt
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
-	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
+	$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
+	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
 	$(PYTHON) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-locale $(MOZILLA_SRCDIR) \
 	  $(call EXPAND_LOCALE_SRCDIR,suite/locales)/installer/windows $(AB_CD) $(CONFIG_DIR)
 
 include $(topsrcdir)/config/rules.mk
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/makensis.mk
--- a/suite/locales/Makefile.in
+++ b/suite/locales/Makefile.in
@@ -84,34 +84,34 @@ BOOKMARKS_INC_FILE = $(call MERGE_FILE,p
 BOOKMARKS_XTRA_FILE = $(call MERGE_FILE,profile/bookmarks.extra)
 
 # the #include in the .in file requires all to be in the same dir, sadly.
 %/defaults/profile/bookmarks.html: $(BOOKMARKS_INC_FILE) $(BOOKMARKS_XTRA_FILE) generic/profile/bookmarks.html.in 
 	$(SYSINSTALL) -D $(dir $@)
 	$(RM) -rf profile/*bookmarks*
 	$(NSINSTALL) -D profile
 	cp $^ profile/
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py \
+	$(call py_action,preprocessor, \
 	  -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
 	  profile/bookmarks.html.in \
-	  > $@
+	  -o $@)
 
 PANELS_XTRA_FILE = $(call MERGE_FILE,profile/panels.extra)
 
 # the #include in the .in file requires all to be in the same dir, sadly.
 %/defaults/profile/panels.rdf: $(PANELS_XTRA_FILE) generic/profile/panels.rdf.in
 	$(SYSINSTALL) -D $(dir $@)
 	$(RM) -rf profile/panels*
 	$(NSINSTALL) -D profile
 	cp $^ profile/
 	sed \
 	  -n 's/.*<RDF:Description about="\(.*\)">.*/        <RDF:li resource="\1"\/>/p' \
 	  profile/panels.extra > profile/panels-urn.inc
-	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py \
-	  profile/panels.rdf.in > $@
+	$(call py_action,preprocessor, \
+	  profile/panels.rdf.in -o $@)
 
 libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
 libs:: $(FINAL_TARGET)/defaults/profile/panels.rdf ;
 
 libs:: $(addprefix generic/profile/,$(PROFILE_FILES))
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
 
 libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
--- a/suite/themes/classic/Makefile.in
+++ b/suite/themes/classic/Makefile.in
@@ -18,14 +18,12 @@ DEFINES += -DSEAMONKEY_VERSION=$(SEAMONK
 
 FILES = \
 	$(srcdir)/chrome.manifest \
 	$(srcdir)/icon.png \
 	$(srcdir)/preview.png \
 	$(NULL)
 
 libs::
-	$(INSTALL) $(FILES) $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)
-	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf > $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf -o $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf)
 
 install::
-	$(SYSINSTALL) $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)
-	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf > $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf -o $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf)