Bug 1620744 - Use py3_action for cases that already support it; r=firefox-build-system-reviewers,rstewart

Differential Revision: https://phabricator.services.mozilla.com/D65846

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Shal 2020-03-10 20:19:13 +00:00
Родитель 5b93938c31
Коммит 4017368b2f
12 изменённых файлов: 24 добавлений и 24 удалений

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

@ -196,14 +196,14 @@ endif
.PHONY: symbolsfullarchive
symbolsfullarchive: prepsymbolsarchive
$(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' \
$(call py3_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' \
$(abspath $(DIST)/crashreporter-symbols) \
--full-archive)
.PHONY: symbolsarchive
symbolsarchive: prepsymbolsarchive
$(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip'
$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \
$(call py3_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \
$(abspath $(DIST)/crashreporter-symbols))
ifdef MOZ_CRASHREPORTER

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

@ -56,7 +56,7 @@ endif
# steps. See bug 1431342.
libs:: $(srcdir)/profile/channel-prefs.js
$(NSINSTALL) -D $(DIST)/bin/defaults/pref
$(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
$(call py3_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))

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

@ -173,7 +173,7 @@ endif
package-compare::
cd $(DIST); find $(PKGCOMP_FIND_OPTS) '$(FINDPATH)' -type f | sort > bin-list.txt
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST)) | grep '^$(BINPATH)' | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
$(call py3_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST)) | grep '^$(BINPATH)' | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt

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

@ -53,7 +53,7 @@ $(CONFIG_DIR)/setup.exe::
$(MKDIR) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(call py3_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
--preprocess-locale $(topsrcdir) \

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

@ -979,7 +979,7 @@ ifndef MOZ_DEBUG
endif
endif
@echo 'Packaging $(XPI_PKGNAME).xpi...'
$(call py_action,zip,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*')
$(call py3_action,zip,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*')
endif
# See comment above about moving this out of the tools tier.
@ -1159,7 +1159,7 @@ PP_TARGETS_ALL_RESULTS := $(sort $(foreach tier,$(PP_TARGETS_TIERS),$(PP_TARGETS
$(PP_TARGETS_ALL_RESULTS):
$(if $(filter-out $(notdir $@),$(notdir $(<:.in=))),$(error Looks like $@ has an unexpected dependency on $< which breaks PP_TARGETS))
$(RM) '$@'
$(call py_action,preprocessor,--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@')
$(call py3_action,preprocessor,--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@')
$(filter %.css,$(PP_TARGETS_ALL_RESULTS)): PP_TARGET_FLAGS+=--marker %

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

@ -19,7 +19,6 @@ for addon in addons:
GENERATED_FILES += [xpi]
GENERATED_FILES[xpi].script = '../../../../../../toolkit/mozapps/extensions/test/create_xpi.py'
GENERATED_FILES[xpi].py2 = True
GENERATED_FILES[xpi].inputs = [indir]
TEST_HARNESS_FILES.testing.mochitest.tests.junit += ['!%s' % xpi]

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

@ -8,7 +8,7 @@ include $(topsrcdir)/config/config.mk
ifeq (WINNT,$(OS_TARGET))
mozglue.def: $(srcdir)/mozglue.def.in $(GLOBAL_DEPS)
$(call py_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
$(call py3_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
GARBAGE += mozglue.def

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

@ -1591,13 +1591,13 @@ class RecursiveMakeBackend(MakeBackend):
mozpath.relpath(obj.path,
obj.install_target))),
]
rule.add_commands(['$(call py_action,buildlist,%s)' %
rule.add_commands(['$(call py3_action,buildlist,%s)' %
' '.join(args)])
args = [
mozpath.join('$(DEPTH)', obj.path),
make_quote(shell_quote(str(obj.entry))),
]
rule.add_commands(['$(call py_action,buildlist,%s)' % ' '.join(args)])
rule.add_commands(['$(call py3_action,buildlist,%s)' % ' '.join(args)])
fragment.dump(backend_file.fh, removal_guard=False)
self._no_skip['misc'].add(obj.relsrcdir)
@ -1683,7 +1683,7 @@ class RecursiveMakeBackend(MakeBackend):
rule.add_dependencies([source])
rule.add_commands([
'$(RM) $@',
'$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) '
'$(call py3_action,preprocessor,$(DEFINES) $(ACDEFINES) '
'$< -o $@)'
])
@ -1738,7 +1738,7 @@ class RecursiveMakeBackend(MakeBackend):
# static to preprocessed don't end up writing to a symlink,
# which would modify content in the source directory.
'$(RM) $@',
'$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) '
'$(call py3_action,preprocessor,$(DEFINES) $(ACDEFINES) '
'$< -o $@)'
])

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

@ -26,6 +26,7 @@ from tempfile import mkdtemp
BASE_SUBSTS = [
('PYTHON', mozpath.normsep(sys.executable)),
('PYTHON3', mozpath.normsep(sys.executable)),
('MOZ_UI_LOCALE', 'en-US'),
]

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

@ -211,14 +211,14 @@ endif
# and places it in dist/bin/res - it should be used when packaging a build.
multilocale.txt: LOCALES?=$(MOZ_CHROME_MULTILOCALE)
multilocale.txt:
$(call py_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp '$(MULTILOCALE_DIR)/multilocale.txt' $(ALL_LOCALES))
$(call py3_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp '$(MULTILOCALE_DIR)/multilocale.txt' $(ALL_LOCALES))
# This version of the target uses AB_CD to build multilocale.txt and places it
# in the $(XPI_NAME)/res dir - it should be used when repackaging a build.
multilocale.txt-%: LOCALES?=$(AB_CD)
multilocale.txt-%: MULTILOCALE_DIR=$(DIST)/xpi-stage/$(XPI_NAME)/res
multilocale.txt-%:
$(call py_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp '$(MULTILOCALE_DIR)/multilocale.txt' $(ALL_LOCALES))
$(call py3_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp '$(MULTILOCALE_DIR)/multilocale.txt' $(ALL_LOCALES))
locale-manifest.in: LOCALES?=$(MOZ_CHROME_MULTILOCALE)
locale-manifest.in: $(GLOBAL_DEPS) FORCE

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

@ -91,7 +91,7 @@ ifdef FUZZING_INTERFACES
JSSHELL_BINS += fuzz-tests$(BIN_SUFFIX)
endif
MAKE_JSSHELL = $(call py_action,zip,-C $(DIST)/bin --strip $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS))
MAKE_JSSHELL = $(call py3_action,zip,-C $(DIST)/bin --strip $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS))
ifneq (,$(PGO_JARLOG_PATH))
# The backslash subst is to work around an issue with our version of mozmake,
@ -134,14 +134,14 @@ endif
ifeq ($(MOZ_PKG_FORMAT),ZIP)
PKG_SUFFIX = .zip
INNER_MAKE_PACKAGE = $(call py_action,make_zip,'$(MOZ_PKG_DIR)' '$(PACKAGE)')
INNER_UNMAKE_PACKAGE = $(call py_action,make_unzip,$(UNPACKAGE))
INNER_MAKE_PACKAGE = $(call py3_action,make_zip,'$(MOZ_PKG_DIR)' '$(PACKAGE)')
INNER_UNMAKE_PACKAGE = $(call py3_action,make_unzip,$(UNPACKAGE))
endif
ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
PKG_SUFFIX = .exe
INNER_MAKE_PACKAGE = $(call py_action,exe_7z_archive,'$(MOZ_PKG_DIR)' '$(MOZ_INSTALLER_PATH)/app.tag' '$(MOZ_SFX_PACKAGE)' '$(PACKAGE)')
INNER_UNMAKE_PACKAGE = $(call py_action,exe_7z_extract,$(UNPACKAGE) $(MOZ_PKG_DIR))
INNER_MAKE_PACKAGE = $(call py3_action,exe_7z_archive,'$(MOZ_PKG_DIR)' '$(MOZ_INSTALLER_PATH)/app.tag' '$(MOZ_SFX_PACKAGE)' '$(PACKAGE)')
INNER_UNMAKE_PACKAGE = $(call py3_action,exe_7z_extract,$(UNPACKAGE) $(MOZ_PKG_DIR))
endif
#Create an RPM file
@ -231,7 +231,7 @@ ifeq ($(MOZ_PKG_FORMAT),DMG)
_ABS_MOZSRCDIR = $(shell cd $(MOZILLA_DIR) && pwd)
PKG_DMG_SOURCE = $(MOZ_PKG_DIR)
INNER_MAKE_PACKAGE = \
$(call py_action,make_dmg, \
$(call py3_action,make_dmg, \
$(if $(MOZ_PKG_MAC_DSSTORE),--dsstore '$(MOZ_PKG_MAC_DSSTORE)') \
$(if $(MOZ_PKG_MAC_BACKGROUND),--background '$(MOZ_PKG_MAC_BACKGROUND)') \
$(if $(MOZ_PKG_MAC_ICON),--icon '$(MOZ_PKG_MAC_ICON)') \
@ -239,7 +239,7 @@ ifeq ($(MOZ_PKG_FORMAT),DMG)
'$(PKG_DMG_SOURCE)' '$(PACKAGE)' \
)
INNER_UNMAKE_PACKAGE = \
$(call py_action,unpack_dmg, \
$(call py3_action,unpack_dmg, \
$(if $(MOZ_PKG_MAC_DSSTORE),--dsstore '$(MOZ_PKG_MAC_DSSTORE)') \
$(if $(MOZ_PKG_MAC_BACKGROUND),--background '$(MOZ_PKG_MAC_BACKGROUND)') \
$(if $(MOZ_PKG_MAC_ICON),--icon '$(MOZ_PKG_MAC_ICON)') \

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

@ -98,7 +98,7 @@ $(CONFIG_DIR)/helper.exe: $(HELPER_DEPS)
$(MKDIR) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(call py3_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
--preprocess-locale $(topsrcdir) \
@ -117,7 +117,7 @@ maintenanceservice_installer::
$(MKDIR) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(call py3_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
--preprocess-locale $(topsrcdir) \