From a9ab9f37a0f804b598bb794b81aa316a6bbfcef2 Mon Sep 17 00:00:00 2001 From: Sandor Molnar Date: Wed, 11 Oct 2023 12:25:58 +0300 Subject: [PATCH] Backed out 8 changesets (bug 1850647, bug 1325181) for causing build bustages CLOSED TREE Backed out changeset ab9d4ca38d83 (bug 1850647) Backed out changeset 7465055478d9 (bug 1850647) Backed out changeset 2008dd9ac32a (bug 1325181) Backed out changeset c95204654c91 (bug 1850647) Backed out changeset 0128ca1c9d18 (bug 1850647) Backed out changeset e9277971c260 (bug 1850647) Backed out changeset 6c15af4bc2c6 (bug 1850647) Backed out changeset ce7ac5e23c1c (bug 1850647) --- Makefile.in | 8 +- browser/app/Makefile.in | 6 +- browser/installer/windows/Makefile.in | 2 +- config/makefiles/functions.mk | 14 +- config/makefiles/rust.mk | 12 +- config/makefiles/xpidl/Makefile.in | 4 - config/rules.mk | 27 +- dom/bindings/Makefile.in | 2 +- ipc/app/Makefile.in | 8 +- python/mozbuild/mozbuild/backend/make.py | 2 +- python/mozbuild/mozbuild/backend/recursivemake.py | 19 +- python/mozbuild/mozbuild/build_commands.py | 24 +- python/mozbuild/mozbuild/controller/building.py | 52 ++- python/mozbuild/mozbuild/html_build_viewer.py | 4 - .../mozbuild/test/backend/test_recursivemake.py | 20 +- .../mozsystemmonitor/resourcemonitor.py | 354 --------------------- toolkit/components/telemetry/Makefile.in | 2 +- toolkit/crashreporter/client/Makefile.in | 2 +- toolkit/locales/l10n.mk | 4 +- toolkit/mozapps/installer/packager.mk | 12 +- toolkit/mozapps/installer/upload-files.mk | 2 +- toolkit/mozapps/installer/windows/nsis/makensis.mk | 4 +- toolkit/mozapps/update/updater/Makefile.in | 4 +- .../update/updater/updater-xpcshell/Makefile.in | 2 +- 24 files changed, 92 insertions(+), 498 deletions(-) diff --git a/Makefile.in b/Makefile.in index 731095d26170..4c4214da78d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -83,7 +83,7 @@ ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS))) @# same directory, because that would blow up $(if $(wildcard _build_manifests/install/$(subst /,_,$*)),$(if $(wildcard faster/install_$(subst /,_,$*)*),$(error FasterMake and RecursiveMake ends of the hybrid build system want to handle $*))) endif - $(foreach manifest,$(wildcard _build_manifests/install/$(subst /,_,$*)),$(call py_action,process_install_manifest $*,$(if $(filter copy,$(NSDISTMODE)),--no-symlinks )--track install_$(subst /,_,$*).track $* $(manifest))) + $(addprefix $(call py_action,process_install_manifest,$(if $(filter copy,$(NSDISTMODE)),--no-symlinks )--track install_$(subst /,_,$*).track $*) ,$(wildcard _build_manifests/install/$(subst /,_,$*))) # Dummy wrapper rule to allow the faster backend to piggy back $(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))): install-dist_%: install-dist/% ; @@ -93,7 +93,7 @@ install-tests: install-test-files .PHONY: install-test-files install-test-files: - $(call py_action,process_install_manifest test/files,$(if $(filter copy,$(NSDISTMODE)),--no-symlinks )--track install__test_files.track _tests _build_manifests/install/_test_files) + $(call py_action,process_install_manifest,$(if $(filter copy,$(NSDISTMODE)),--no-symlinks )--track install__test_files.track _tests _build_manifests/install/_test_files) include $(topsrcdir)/build/moz-automation.mk @@ -168,14 +168,14 @@ endif .PHONY: symbolsfullarchive symbolsfullarchive: prepsymbolsarchive $(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst' - $(call py_action,symbols_archive $(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst' \ + $(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst' \ $(abspath $(DIST)/crashreporter-symbols) \ --full-archive) .PHONY: symbolsarchive symbolsarchive: prepsymbolsarchive $(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' - $(call py_action,symbols_archive $(SYMBOL_ARCHIVE_BASENAME).zip,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \ + $(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \ $(abspath $(DIST)/crashreporter-symbols)) ifdef MOZ_CRASHREPORTER diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 7a09bc249462..54d6b43fe126 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -55,7 +55,7 @@ endif # steps. See bug 1431342. libs:: $(srcdir)/profile/channel-prefs.js $(NSINSTALL) -D $(DIST)/bin/defaults/pref - $(call py_action,preprocessor channel-prefs.js,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js) + $(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) @@ -86,8 +86,8 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS- $(MKDIR) -p '$(dist_dest)/$(LPROJ)' rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents '$(dist_dest)' --exclude English.lproj rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ '$(dist_dest)/$(LPROJ)' - $(call py_action,preprocessor Info.plist,-Fsubstitution -DAPP_VERSION='$(MOZ_APP_VERSION)' -DMOZ_APP_NAME='$(MOZ_APP_NAME)' -DMAC_APP_NAME='$(MAC_APP_NAME)' -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' -DMAC_BUNDLE_VERSION='$(MAC_BUNDLE_VERSION)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o '$(dist_dest)/Contents/Info.plist') - $(call py_action,preprocessor InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DMAC_APP_NAME='$(MAC_APP_NAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o '$(dist_dest)/$(LPROJ)/InfoPlist.strings') + $(call py_action,preprocessor,-Fsubstitution -DAPP_VERSION='$(MOZ_APP_VERSION)' -DMOZ_APP_NAME='$(MOZ_APP_NAME)' -DMAC_APP_NAME='$(MAC_APP_NAME)' -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' -DMAC_BUNDLE_VERSION='$(MAC_BUNDLE_VERSION)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o '$(dist_dest)/Contents/Info.plist') + $(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DMAC_APP_NAME='$(MAC_APP_NAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o '$(dist_dest)/$(LPROJ)/InfoPlist.strings') rsync -a --exclude-from='$(objdir)/macbuild/Contents/MacOS-files.txt' $(DIST)/bin/ '$(dist_dest)/Contents/Resources' rsync -a --include-from='$(objdir)/macbuild/Contents/MacOS-files.txt' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS' # MacOS-files-copy.in is a list of files that should be copies rather diff --git a/browser/installer/windows/Makefile.in b/browser/installer/windows/Makefile.in index e6823bb9803f..eca2908fcc33 100644 --- a/browser/installer/windows/Makefile.in +++ b/browser/installer/windows/Makefile.in @@ -60,7 +60,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 defines.nsi,-Fsubstitution $(DEFINES) $(ACDEFINES) \ + $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) $(PYTHON3) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ --preprocess-locale $(topsrcdir) \ diff --git a/config/makefiles/functions.mk b/config/makefiles/functions.mk index 3ce9afd06739..93282c402965 100644 --- a/config/makefiles/functions.mk +++ b/config/makefiles/functions.mk @@ -27,16 +27,4 @@ core_winabspath = $(error core_winabspath is unsupported) # # libs:: # $(call py_action,purge_manifests,_build_manifests/purge/foo.manifest) -# -# The first argument can optionally contain the name of the file being created -# or processed. e.g. -# libs:: -# $(call py_action,purge_manifests foo.manifest,_build_manifests/purge/foo.manifest) -# This optional name will be displayed in build profiles. -# -# Note: $(call BUILDSTATUS) can't be used here as that would expand to multiple -# lines and some py_action callers expect a single line. -py_action = \ - echo BUILDSTATUS START_$(firstword $(1)) $(or $(word 2,$(1)),$(2)) ; \ - $(PYTHON3) -m mozbuild.action.$(firstword $(1)) $(2) ; \ - echo BUILDSTATUS END_$(firstword $(1)) $(or $(word 2,$(1)),$(2)) +py_action = $(PYTHON3) -m mozbuild.action.$(1) $(2) diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk index f16a71635db7..c0432a1c5f1f 100644 --- a/config/makefiles/rust.mk +++ b/config/makefiles/rust.mk @@ -450,9 +450,7 @@ endif # build. force-cargo-library-build: $(REPORT_BUILD) - $(call BUILDSTATUS,START_Rust $(notdir $(RUST_LIBRARY_FILE))) $(call CARGO_BUILD) --lib $(cargo_target_flag) $(rust_features_flag) -- $(cargo_rustc_flags) - $(call BUILDSTATUS,END_Rust $(notdir $(RUST_LIBRARY_FILE))) RUST_LIBRARY_DEP_FILE := $(basename $(RUST_LIBRARY_FILE)).d RUST_LIBRARY_DEPS := $(wordlist 2, 10000000, $(if $(wildcard $(RUST_LIBRARY_DEP_FILE)),$(shell cat $(RUST_LIBRARY_DEP_FILE)))) @@ -468,7 +466,7 @@ ifeq ($(OS_ARCH), Linux) ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN)) ifndef MOZ_LTO_RUST_CROSS ifneq (,$(filter -Clto,$(cargo_rustc_flags))) - $(call py_action,check_binary $(@F),--networking $@) + $(call py_action,check_binary,--networking $@) endif endif endif @@ -514,9 +512,7 @@ host_rust_features_flag := --features '$(if $(HOST_RUST_LIBRARY_FEATURES),$(HOST force-cargo-host-library-build: $(REPORT_BUILD) - $(call BUILDSTATUS,START_Rust $(notdir $(HOST_RUST_LIBRARY_FILE))) $(call CARGO_BUILD) --lib $(cargo_host_flag) $(host_rust_features_flag) - $(call BUILDSTATUS,END_Rust $(notdir $(HOST_RUST_LIBRARY_FILE))) $(HOST_RUST_LIBRARY_FILE): force-cargo-host-library-build ; @@ -539,9 +535,7 @@ program_features_flag := --features mozilla-central-workspace-hack force-cargo-program-build: $(call resfile,module) $(REPORT_BUILD) - $(call BUILDSTATUS,START_Rust $(RUST_CARGO_PROGRAMS)) $(call CARGO_BUILD) $(addprefix --bin ,$(RUST_CARGO_PROGRAMS)) $(cargo_target_flag) $(program_features_flag) -- $(addprefix -C link-arg=$(CURDIR)/,$(call resfile,module)) $(CARGO_RUSTCFLAGS) - $(call BUILDSTATUS,END_Rust $(RUST_CARGO_PROGRAMS)) # RUST_PROGRAM_DEPENDENCIES(RUST_PROGRAM) # Generates a rule suitable to rebuild RUST_PROGRAM only if its dependencies are @@ -584,18 +578,14 @@ host_program_features_flag := --features mozilla-central-workspace-hack force-cargo-host-program-build: $(REPORT_BUILD) - $(call BUILDSTATUS,START_Rust $(HOST_RUST_CARGO_PROGRAMS)) $(call CARGO_BUILD) $(addprefix --bin ,$(HOST_RUST_CARGO_PROGRAMS)) $(cargo_host_flag) $(host_program_features_flag) - $(call BUILDSTATUS,END_Rust $(HOST_RUST_CARGO_PROGRAMS)) $(HOST_RUST_PROGRAMS): force-cargo-host-program-build ; ifndef CARGO_NO_AUTO_ARG force-cargo-host-program-%: $(REPORT_BUILD) - $(call BUILDSTATUS,START_Rust $(HOST_RUST_CARGO_PROGRAMS)) $(call RUN_CARGO,$*) $(addprefix --bin ,$(HOST_RUST_CARGO_PROGRAMS)) $(cargo_host_flag) $(host_program_features_flag) - $(call BUILDSTATUS,END_Rust $(HOST_RUST_CARGO_PROGRAMS)) else force-cargo-host-program-%: $(call RUN_CARGO,$*) $(addprefix --bin ,$(HOST_RUST_CARGO_PROGRAMS)) $(filter-out --release $(cargo_target_flag)) diff --git a/config/makefiles/xpidl/Makefile.in b/config/makefiles/xpidl/Makefile.in index 96601d6cb9ce..349820ea48f5 100644 --- a/config/makefiles/xpidl/Makefile.in +++ b/config/makefiles/xpidl/Makefile.in @@ -41,7 +41,6 @@ code_gen_deps := $(topsrcdir)/xpcom/ds/tools/perfecthash.py # in the virtualenv. %.xpt: $(REPORT_BUILD) - $(call BUILDSTATUS,START_xpt $@) $(PYTHON3) $(process_py) --depsdir $(idl_deps_dir) \ --bindings-conf $(topsrcdir)/dom/bindings/Bindings.conf \ $(foreach dir,$(all_idl_dirs),-I $(dir)) \ @@ -55,7 +54,6 @@ code_gen_deps := $(topsrcdir)/xpcom/ds/tools/perfecthash.py # indicate whether IDLs were added or removed. # Note that removing previously built files is not covered. @echo $(basename $(notdir $@))_deps_built = $($(basename $(notdir $@))_deps) >> $(idl_deps_dir)/$(basename $(notdir $@)).pp - $(call BUILDSTATUS,END_xpt $@) xpidl_modules := @xpidl_modules@ xpt_files := $(addsuffix .xpt,$(xpidl_modules)) @@ -75,10 +73,8 @@ $(xpt_files): $(process_py) $(call mkdir_deps,$(idl_deps_dir) $(dist_include_dir $(stub_file) : $(xpt_files) $(code_gen_py) $(code_gen_deps) $(REPORT_BUILD) - $(call BUILDSTATUS,START_xpt $(notdir $(generated_files))) $(PYTHON3) $(code_gen_py) $(generated_files) $(xpt_files) @touch $@ - $(call BUILDSTATUS,END_xpt $(notdir $(generated_files))) -include $(depends_files) diff --git a/config/rules.mk b/config/rules.mk index ad08a8db9484..b5a3349a72d0 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -418,12 +418,11 @@ endef # $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(call resfile,$(PROGRAM)) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET)) $(REPORT_BUILD) - $(call BUILDSTATUS,START_Program $(@F)) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) $(LINKER) -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS) else # !WINNT || GNU_CC $(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS) - $(call py_action,check_binary $(@F),$@) + $(call py_action,check_binary,$@) endif # WINNT && !GNU_CC ifdef ENABLE_STRIP @@ -432,11 +431,9 @@ endif ifdef MOZ_POST_PROGRAM_COMMAND $(MOZ_POST_PROGRAM_COMMAND) $@ endif - $(call BUILDSTATUS,END_Program $(@F)) $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS) $(call mkdir_deps,$(DEPTH)/dist/host/bin) $(REPORT_BUILD) - $(call BUILDSTATUS,START_Program $(@F)) ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH)) $(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) else @@ -446,7 +443,6 @@ else $(HOST_CC) -o $@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) endif # HOST_CPP_PROG_LINK endif - $(call BUILDSTATUS,END_Program $(@F)) # # This is an attempt to support generation of multiple binaries @@ -463,12 +459,11 @@ $(foreach p,$(SIMPLE_PROGRAMS),$(eval $(call simple_program_deps,$(p)))) $(SIMPLE_PROGRAMS): $(REPORT_BUILD) - $(call BUILDSTATUS,START_Program $(@F)) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) $(LINKER) -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS) else $(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) -o $@ $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS) - $(call py_action,check_binary $(@F),$@) + $(call py_action,check_binary,$@) endif # WINNT && !GNU_CC ifdef ENABLE_STRIP @@ -477,11 +472,9 @@ endif ifdef MOZ_POST_PROGRAM_COMMAND $(MOZ_POST_PROGRAM_COMMAND) $@ endif - $(call BUILDSTATUS,END_Program $@) $(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS) $(REPORT_BUILD) - $(call BUILDSTATUS,START_Program $@) ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC)) $(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) else @@ -491,7 +484,6 @@ else $(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) endif endif - $(call BUILDSTATUS,END_Program $(@F)) $(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS) $(REPORT_BUILD) @@ -516,14 +508,12 @@ endif $(HOST_SHARED_LIBRARY): Makefile $(REPORT_BUILD) - $(call BUILDSTATUS,START_SharedLib $@) $(RM) $@ ifneq (,$(filter clang-cl,$(HOST_CC_TYPE))) $(HOST_LINKER) -DLL -OUT:$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) else $(HOST_CXX) $(HOST_OUTOPTION)$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) endif - $(call BUILDSTATUS,END_SharedLib $@) # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files, # so instead of deleting .o files after repacking them into a dylib, we make @@ -532,11 +522,9 @@ endif $(SHARED_LIBRARY): $(OBJS) $(call resfile,$(SHARED_LIBRARY)) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS) $(REPORT_BUILD) - $(call BUILDSTATUS,START_SharedLib $@) $(RM) $@ $(MKSHLIB) $($@_OBJS) $(filter %.res,$^) $(RELRHACK_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(call py_action,check_binary,$@) - $(call BUILDSTATUS,END_SharedLib $@) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) endif # WINNT && !GCC @@ -574,7 +562,6 @@ $(HOST_CPPOBJS): $(REPORT_BUILD_VERBOSE) $(call BUILDSTATUS,OBJECT_FILE $@) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(NSPR_CFLAGS) $< - $(call BUILDSTATUS,END_Object $@) $(HOST_CMOBJS): $(REPORT_BUILD_VERBOSE) @@ -624,7 +611,7 @@ define syms_template syms:: $(2) $(2): $(1) ifdef MOZ_CRASHREPORTER - $$(call py_action,dumpsymbols $$@,$$(abspath $$<) $$(abspath $$@) $$(DUMP_SYMBOLS_FLAGS)) + $$(call py_action,dumpsymbols,$$(abspath $$<) $$(abspath $$@) $$(DUMP_SYMBOLS_FLAGS)) ifeq ($(OS_ARCH),WINNT) ifdef WINCHECKSEC $$(PYTHON3) $$(topsrcdir)/build/win32/autowinchecksec.py $$< @@ -672,13 +659,11 @@ $(CPPOBJS): $(REPORT_BUILD_VERBOSE) $(call BUILDSTATUS,OBJECT_FILE $@) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $< - $(call BUILDSTATUS,END_Object $@) $(CPPWASMOBJS): $(REPORT_BUILD_VERBOSE) $(call BUILDSTATUS,OBJECT_FILE $@) $(WASM_CXX) -o $@ -c $(WASM_CXXFLAGS) $($(notdir $<)_FLAGS) $< - $(call BUILDSTATUS,END_Object $@) $(CMMOBJS): $(REPORT_BUILD_VERBOSE) @@ -864,7 +849,7 @@ endif endif misc realchrome:: $(FINAL_TARGET)/chrome - $(call py_action,jar_maker $(subst $(topsrcdir)/,,$(JAR_MANIFEST)),\ + $(call py_action,jar_maker,\ $(QUIET) -d $(FINAL_TARGET) \ $(MAKE_JARS_FLAGS) $(DEFINES) $(ACDEFINES) \ $(JAR_MANIFEST)) @@ -882,7 +867,7 @@ endif ifneq ($(XPI_PKGNAME),) tools realchrome:: @echo 'Packaging $(XPI_PKGNAME).xpi...' - $(call py_action,zip $(XPI_PKGNAME).xpi,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*') + $(call py_action,zip,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*') endif ############################################################################# @@ -1049,7 +1034,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 $(@F),--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@') + $(call py_action,preprocessor,--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@') $(filter %.css,$(PP_TARGETS_ALL_RESULTS)): PP_TARGET_FLAGS+=--marker % diff --git a/dom/bindings/Makefile.in b/dom/bindings/Makefile.in index aa4f158b2f9f..c2a1766be736 100644 --- a/dom/bindings/Makefile.in +++ b/dom/bindings/Makefile.in @@ -43,7 +43,7 @@ export:: webidl.stub -include codegen.pp webidl.stub: $(codegen_dependencies) - $(call py_action,webidl $(relativesrcdir),$(srcdir)) + $(call py_action,webidl,$(srcdir)) @$(TOUCH) $@ .PHONY: compiletests diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in index b7f40e9fb51d..9ccb738d51fe 100644 --- a/ipc/app/Makefile.in +++ b/ipc/app/Makefile.in @@ -30,15 +30,15 @@ libs:: # plugin-container $(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app - $(call py_action,preprocessor $(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist,-Fsubstitution -DEXECUTABLE='$(MOZ_CHILD_PROCESS_NAME)' -DBUNDLEID='$(MOZ_CHILD_PROCESS_BUNDLEID)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist) - $(call py_action,preprocessor $(MOZ_CHILD_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_CHILD_PROCESS_APPNAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings) + $(call py_action,preprocessor,-Fsubstitution -DEXECUTABLE='$(MOZ_CHILD_PROCESS_NAME)' -DBUNDLEID='$(MOZ_CHILD_PROCESS_BUNDLEID)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist) + $(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_CHILD_PROCESS_APPNAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings) $(NSINSTALL) -D $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS $(NSINSTALL) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS # media-plugin-helper $(NSINSTALL) -D $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app - $(call py_action,preprocessor $(MOZ_EME_PROCESS_NAME).app/Contents/Info.plist,-Fsubstitution -DEXECUTABLE='$(MOZ_EME_PROCESS_NAME_BRANDED)' -DBUNDLEID='$(MOZ_EME_PROCESS_BUNDLEID)' -DMOZ_EME_PROCESS_NAME_BRANDED='$(MOZ_EME_PROCESS_NAME_BRANDED)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app/Contents/Info.plist) - $(call py_action,preprocessor $(MOZ_EME_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_EME_PROCESS_BUNDLENAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings) + $(call py_action,preprocessor,-Fsubstitution -DEXECUTABLE='$(MOZ_EME_PROCESS_NAME_BRANDED)' -DBUNDLEID='$(MOZ_EME_PROCESS_BUNDLEID)' -DMOZ_EME_PROCESS_NAME_BRANDED='$(MOZ_EME_PROCESS_NAME_BRANDED)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app/Contents/Info.plist) + $(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_EME_PROCESS_BUNDLENAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings) $(NSINSTALL) -D $(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app/Contents/MacOS cp $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME) "$(DIST)/bin/$(MOZ_EME_PROCESS_NAME).app/Contents/MacOS/$(MOZ_EME_PROCESS_NAME_BRANDED)" endif #} diff --git a/python/mozbuild/mozbuild/backend/make.py b/python/mozbuild/mozbuild/backend/make.py index e93e49093a72..90b37e675847 100644 --- a/python/mozbuild/mozbuild/backend/make.py +++ b/python/mozbuild/mozbuild/backend/make.py @@ -106,7 +106,7 @@ class MakeBackend(CommonBackend): ( """{stub}: {script}{inputs}{backend}{force} \t$(REPORT_BUILD) -\t$(call py_action,file_generate {output},{locale}{script} """ # wrap for E501 +\t$(call py_action,file_generate,{locale}{script} """ # wrap for E501 """{method} {output} {dep_file} {stub}{inputs}{flags}) \t@$(TOUCH) $@ """ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index 520e3b63d24c..2b0a6cb5e9ae 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -1683,21 +1683,20 @@ class RecursiveMakeBackend(MakeBackend): top_level = mozpath.join(obj.install_target, "chrome.manifest") if obj.path != top_level: - path = mozpath.relpath(obj.path, obj.install_target) args = [ mozpath.join("$(DEPTH)", top_level), - make_quote(shell_quote("manifest %s" % path)), + make_quote( + shell_quote( + "manifest %s" % mozpath.relpath(obj.path, obj.install_target) + ) + ), ] - rule.add_commands( - ["$(call py_action %s,buildlist,%s)" % (path, " ".join(args))] - ) + rule.add_commands(["$(call py_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,%s)" % (obj.entry.path, " ".join(args))] - ) + rule.add_commands(["$(call py_action,buildlist,%s)" % " ".join(args)]) fragment.dump(backend_file.fh, removal_guard=False) self._no_skip["misc"].add(obj.relsrcdir) @@ -1786,7 +1785,7 @@ class RecursiveMakeBackend(MakeBackend): rule.add_commands( [ "$(RM) $@", - "$(call py_action,preprocessor $@,$(DEFINES) $(ACDEFINES) " + "$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) " "$< -o $@)", ] ) @@ -1861,7 +1860,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 py_action,preprocessor,$(DEFINES) $(ACDEFINES) " "$< -o $@)", ] ) diff --git a/python/mozbuild/mozbuild/build_commands.py b/python/mozbuild/mozbuild/build_commands.py index 3299ca712e2b..bdf9e97800bf 100644 --- a/python/mozbuild/mozbuild/build_commands.py +++ b/python/mozbuild/mozbuild/build_commands.py @@ -5,7 +5,6 @@ import argparse import os import subprocess -from urllib.parse import quote import mozpack.path as mozpath from mach.decorators import Command, CommandArgument @@ -263,7 +262,7 @@ def configure( @Command( "resource-usage", category="post-build", - description="Show a profile of the build in the Firefox Profiler.", + description="Show information about system resource usage for a build.", virtualenv_name="build", ) @CommandArgument( @@ -282,7 +281,7 @@ def configure( default="firefox", help="Web browser to automatically open. See webbrowser Python module.", ) -@CommandArgument("--url", help="URL of a build profile to display") +@CommandArgument("--url", help="URL of JSON document to display") def resource_usage(command_context, address=None, port=None, browser=None, url=None): import webbrowser @@ -291,10 +290,10 @@ def resource_usage(command_context, address=None, port=None, browser=None, url=N server = BuildViewerServer(address, port) if url: - server.add_resource_json_url("profile", url) + server.add_resource_json_url("url", url) else: - profile = command_context._get_state_filename("profile_build_resources.json") - if not os.path.exists(profile): + last = command_context._get_state_filename("build_resources.json") + if not os.path.exists(last): print( "Build resources not available. If you have performed a " "build and receive this message, the psutil Python package " @@ -302,20 +301,17 @@ def resource_usage(command_context, address=None, port=None, browser=None, url=N ) return 1 - server.add_resource_json_file("profile", profile) - - profiler_url = "https://profiler.firefox.com/from-url/" + quote( - server.url + "resources/profile", "" - ) + server.add_resource_json_file("last", last) try: - webbrowser.get(browser).open_new_tab(profiler_url) + webbrowser.get(browser).open_new_tab(server.url) except Exception: print("Cannot get browser specified, trying the default instead.") try: - browser = webbrowser.get().open_new_tab(profiler_url) + browser = webbrowser.get().open_new_tab(server.url) except Exception: - print("Please open %s in a browser." % profiler_url) + print("Please open %s in a browser." % server.url) + print("Hit CTRL+c to stop server.") server.run() diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py index 591e56e80b16..aa753bf690c9 100644 --- a/python/mozbuild/mozbuild/controller/building.py +++ b/python/mozbuild/mozbuild/controller/building.py @@ -9,6 +9,7 @@ import json import logging import os import re +import shutil import subprocess import sys import time @@ -181,7 +182,7 @@ class TierStatus(object): class BuildMonitor(MozbuildObject): """Monitors the output of the build.""" - def init(self, warnings_path, terminal): + def init(self, warnings_path): """Create a new monitor. warnings_path is a path of a warnings database to use. @@ -203,8 +204,6 @@ class BuildMonitor(MozbuildObject): # warnings. self.instance_warnings = WarningsDatabase() - self._terminal = terminal - def on_warning(warning): # Skip `errors` if warning["type"] == "error": @@ -255,12 +254,8 @@ class BuildMonitor(MozbuildObject): """ message = None - # If the previous line was colored (eg. for a compiler warning), our - # line will start with the ansi reset sequence. Strip it to ensure it - # does not interfere with our parsing of the line. - plain_line = self._terminal.strip(line) if self._terminal else line - if plain_line.startswith("BUILDSTATUS"): - args = plain_line.split()[1:] + if line.startswith("BUILDSTATUS"): + args = line.split()[1:] action = args.pop(0) update_needed = True @@ -276,13 +271,6 @@ class BuildMonitor(MozbuildObject): self.tiers.finish_tier(tier) elif action == "OBJECT_FILE": self.build_objects.append(args[0]) - self.resources.begin_marker("Object", args[0]) - update_needed = False - elif action.startswith("START_"): - self.resources.begin_marker(action[len("START_") :], " ".join(args)) - update_needed = False - elif action.startswith("END_"): - self.resources.end_marker(action[len("END_") :], " ".join(args)) update_needed = False elif action == "BUILD_VERBOSE": build_dir = args[0] @@ -294,8 +282,8 @@ class BuildMonitor(MozbuildObject): raise Exception("Unknown build status: %s" % action) return BuildOutputResult(None, update_needed, message) - elif plain_line.startswith("BUILDTASK"): - _, data = plain_line.split(maxsplit=1) + elif line.startswith("BUILDTASK"): + _, data = line.split(maxsplit=1) # Check that we can parse the JSON. Skip this line if we can't; # we'll be missing data, but that's not a huge deal. try: @@ -357,18 +345,28 @@ class BuildMonitor(MozbuildObject): # the upload path, alongside, for convenience, a copy of the HTML # viewer. if "MOZ_AUTOMATION" in os.environ and "UPLOAD_PATH" in os.environ: - build_resources_profile_path = os.path.join( - os.environ["UPLOAD_PATH"], "profile_build_resources.json" + build_resources_path = os.path.join( + os.environ["UPLOAD_PATH"], "build_resources.json" ) - else: - build_resources_profile_path = self._get_state_filename( - "profile_build_resources.json" + shutil.copy( + os.path.join( + self.topsrcdir, + "python", + "mozbuild", + "mozbuild", + "resources", + "html-build-viewer", + "build_resources.html", + ), + os.environ["UPLOAD_PATH"], ) + else: + build_resources_path = self._get_state_filename("build_resources.json") with io.open( - build_resources_profile_path, "w", encoding="utf-8", newline="\n" + build_resources_path, "w", encoding="utf-8", newline="\n" ) as fh: to_write = six.ensure_text( - json.dumps(self.resources.as_profile(), separators=(",", ":")) + json.dumps(self.resources.as_dict(), indent=2) ) fh.write(to_write) except Exception as e: @@ -1144,7 +1142,7 @@ class BuildDriver(MozbuildObject): self.mach_context = mach_context warnings_path = self._get_state_filename("warnings.json") monitor = self._spawn(BuildMonitor) - monitor.init(warnings_path, self.log_manager.terminal) + monitor.init(warnings_path) footer = BuildProgressFooter(self.log_manager.terminal, monitor) # Disable indexing in objdir because it is not necessary and can slow @@ -1539,7 +1537,7 @@ class BuildDriver(MozbuildObject): # if excessive: # print(EXCESSIVE_SWAP_MESSAGE) - print("To view a profile of the build, run |mach " "resource-usage|.") + print("To view resource usage of the build, run |mach " "resource-usage|.") long_build = monitor.elapsed > 1200 diff --git a/python/mozbuild/mozbuild/html_build_viewer.py b/python/mozbuild/mozbuild/html_build_viewer.py index 7a99ff774474..0582e6f1beb3 100644 --- a/python/mozbuild/mozbuild/html_build_viewer.py +++ b/python/mozbuild/mozbuild/html_build_viewer.py @@ -34,13 +34,9 @@ class HTTPHandler(http.server.BaseHTTPRequestHandler): self.send_response(200) self.send_header("Content-Type", "application/json; charset=utf-8") - self.send_header( - "Access-Control-Allow-Origin", "https://profiler.firefox.com" - ) self.end_headers() self.wfile.write(s.json_files[key]) - self.server.wrapper.do_shutdown = True return if p == "/": diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py index e5e313b4f7fa..b7b5cd37fab4 100644 --- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py +++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py @@ -420,7 +420,7 @@ class TestRecursiveMakeBackend(BackendTester): "EXTRA_MDDEPEND_FILES += $(MDDEPDIR)/bar.c.pp", "$(MDDEPDIR)/bar.c.stub: %s/generate-bar.py" % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate bar.c,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp $(MDDEPDIR)/bar.c.stub)" # noqa + "$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp $(MDDEPDIR)/bar.c.stub)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -430,7 +430,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/foo.h.stub: %s/generate-foo.py $(srcdir)/foo-data" % (env.topsrcdir), "$(REPORT_BUILD)", - "$(call py_action,file_generate foo.h,%s/generate-foo.py main foo.h $(MDDEPDIR)/foo.h.pp $(MDDEPDIR)/foo.h.stub $(srcdir)/foo-data)" # noqa + "$(call py_action,file_generate,%s/generate-foo.py main foo.h $(MDDEPDIR)/foo.h.pp $(MDDEPDIR)/foo.h.stub $(srcdir)/foo-data)" # noqa % (env.topsrcdir), "@$(TOUCH) $@", "", @@ -453,7 +453,7 @@ class TestRecursiveMakeBackend(BackendTester): "EXTRA_MDDEPEND_FILES += $(MDDEPDIR)/bar.c.pp", "$(MDDEPDIR)/bar.c.stub: %s/generate-bar.py FORCE" % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate bar.c,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp $(MDDEPDIR)/bar.c.stub)" # noqa + "$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp $(MDDEPDIR)/bar.c.stub)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -463,7 +463,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/foo.c.stub: %s/generate-foo.py $(srcdir)/foo-data" % (env.topsrcdir), "$(REPORT_BUILD)", - "$(call py_action,file_generate foo.c,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(MDDEPDIR)/foo.c.stub $(srcdir)/foo-data)" # noqa + "$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(MDDEPDIR)/foo.c.stub $(srcdir)/foo-data)" # noqa % (env.topsrcdir), "@$(TOUCH) $@", "", @@ -487,7 +487,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)" # noqa % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate foo.xyz,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa + "$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -515,7 +515,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)" # noqa % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate foo.xyz,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa + "$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -525,7 +525,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/abc.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE" # noqa % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate abc.xyz,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(MDDEPDIR)/abc.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa + "$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(MDDEPDIR)/abc.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -550,7 +550,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/foo$(AB_CD).xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)" # noqa % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate foo$(AB_CD).xyz,--locale=$(AB_CD) %s/generate-foo.py main foo$(AB_CD).xyz $(MDDEPDIR)/foo$(AB_CD).xyz.pp $(MDDEPDIR)/foo$(AB_CD).xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa + "$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo$(AB_CD).xyz $(MDDEPDIR)/foo$(AB_CD).xyz.pp $(MDDEPDIR)/foo$(AB_CD).xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -559,7 +559,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/bar$(AB_rCD).xyz.stub: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)" # noqa % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate bar$(AB_rCD).xyz,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(MDDEPDIR)/bar$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input)" # noqa + "$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(MDDEPDIR)/bar$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", @@ -568,7 +568,7 @@ class TestRecursiveMakeBackend(BackendTester): "$(MDDEPDIR)/zot$(AB_rCD).xyz.stub: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)" # noqa % env.topsrcdir, "$(REPORT_BUILD)", - "$(call py_action,file_generate zot$(AB_rCD).xyz,--locale=$(AB_CD) %s/generate-foo.py main zot$(AB_rCD).xyz $(MDDEPDIR)/zot$(AB_rCD).xyz.pp $(MDDEPDIR)/zot$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input)" # noqa + "$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main zot$(AB_rCD).xyz $(MDDEPDIR)/zot$(AB_rCD).xyz.pp $(MDDEPDIR)/zot$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input)" # noqa % env.topsrcdir, "@$(TOUCH) $@", "", diff --git a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py index b32118d6f669..824863cbb604 100644 --- a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py +++ b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py @@ -268,11 +268,9 @@ class SystemResourceMonitor(object): self.end_time = None self.events = [] - self.markers = [] self.phases = OrderedDict() self._active_phases = {} - self._active_markers = {} self._running = False self._stopped = False @@ -312,7 +310,6 @@ class SystemResourceMonitor(object): self._process = multiprocessing.Process( target=_collect, args=(child_pipe, poll_interval) ) - self.poll_interval = poll_interval def __del__(self): if self._running: @@ -414,26 +411,6 @@ class SystemResourceMonitor(object): """ self.events.append((time.time(), name)) - def record_marker(self, name, start, end, text): - """Record a marker with a duration and an optional text - - Markers are typically used to record when a single command happened. - For actions with a longer duration that justifies tracking resource use - see the phase API below. - """ - self.markers.append((name, start, end, text)) - - def begin_marker(self, name, text): - self._active_markers[name + ":" + text] = time.time() - - def end_marker(self, name, text): - end = time.time() - id = name + ":" + text - if not id in self._active_markers: - return - start = self._active_markers.pop(id) - self.record_marker(name, start, end, text) - @contextmanager def phase(self, name): """Context manager for recording an active phase.""" @@ -766,334 +743,3 @@ class SystemResourceMonitor(object): ) return o - - def as_profile(self): - startTime = self.measurements[0].start - profile = { - "meta": { - "processType": 0, - "product": "mach", - "stackwalk": 0, - "version": 27, - "preprocessedProfileVersion": 47, - "symbolicationNotSupported": True, - "interval": self.poll_interval * 1000, - "startTime": startTime * 1000, - "logicalCPUs": psutil.cpu_count(logical=True), - "physicalCPUs": psutil.cpu_count(logical=False), - "mainMemory": psutil.virtual_memory()[0], - "markerSchema": [ - { - "name": "Phase", - "tooltipLabel": "{marker.data.phase}", - "tableLabel": "{marker.name} — {marker.data.phase} — CPU time: {marker.data.cpuTime} ({marker.data.cpuPercent})", - "chartLabel": "{marker.data.phase}", - "display": ["marker-chart", "marker-table"], - "data": [ - { - "key": "cpuTime", - "label": "CPU Time", - "format": "duration", - }, - { - "key": "cpuPercent", - "label": "CPU Percent", - "format": "string", - }, - ], - }, - { - "name": "Text", - "tooltipLabel": "{marker.name}", - "tableLabel": "{marker.name} — {marker.data.text}", - "chartLabel": "{marker.data.text}", - "display": ["marker-chart", "marker-table"], - "data": [ - { - "key": "text", - "label": "Description", - "format": "string", - "searchable": True, - } - ], - }, - { - "name": "Mem", - "tooltipLabel": "{marker.name}", - "display": [], - "data": [ - {"key": "used", "label": "Memory Used", "format": "bytes"}, - { - "key": "cached", - "label": "Memory cached", - "format": "bytes", - }, - { - "key": "buffers", - "label": "Memory buffers", - "format": "bytes", - }, - ], - "graphs": [ - {"key": "used", "color": "orange", "type": "line-filled"} - ], - }, - { - "name": "IO", - "tooltipLabel": "{marker.name}", - "display": [], - "data": [ - { - "key": "write_bytes", - "label": "Written", - "format": "bytes", - }, - { - "key": "write_count", - "label": "Write count", - "format": "integer", - }, - {"key": "read_bytes", "label": "Read", "format": "bytes"}, - { - "key": "read_count", - "label": "Read count", - "format": "integer", - }, - ], - "graphs": [ - {"key": "read_bytes", "color": "green", "type": "bar"}, - {"key": "write_bytes", "color": "red", "type": "bar"}, - ], - }, - ], - "usesOnlyOneStackType": True, - }, - "libs": [], - "threads": [ - { - "processType": "default", - "processName": "mach", - "processStartupTime": 0, - "processShutdownTime": None, - "registerTime": 0, - "unregisterTime": None, - "pausedRanges": [], - "name": "", - "isMainThread": False, - "pid": "0", - "tid": 0, - "samples": { - "weightType": "samples", - "weight": None, - "stack": [], - "time": [], - "length": 0, - }, - "stringArray": ["(root)"], - "markers": { - "data": [], - "name": [], - "startTime": [], - "endTime": [], - "phase": [], - "category": [], - "length": 0, - }, - "stackTable": { - "frame": [0], - "prefix": [None], - "category": [0], - "subcategory": [0], - "length": 1, - }, - "frameTable": { - "address": [-1], - "inlineDepth": [0], - "category": [None], - "subcategory": [0], - "func": [0], - "nativeSymbol": [None], - "innerWindowID": [0], - "implementation": [None], - "line": [None], - "column": [None], - "length": 1, - }, - "funcTable": { - "isJS": [False], - "relevantForJS": [False], - "name": [0], - "resource": [-1], - "fileName": [None], - "lineNumber": [None], - "columnNumber": [None], - "length": 1, - }, - "resourceTable": { - "lib": [], - "name": [], - "host": [], - "type": [], - "length": 0, - }, - "nativeSymbols": { - "libIndex": [], - "address": [], - "name": [], - "functionSize": [], - "length": 0, - }, - } - ], - "counters": [], - } - - firstThread = profile["threads"][0] - markers = firstThread["markers"] - - def get_string_index(string): - stringArray = firstThread["stringArray"] - try: - return stringArray.index(string) - except ValueError: - stringArray.append(string) - return len(stringArray) - 1 - - def add_marker(name_index, start, end, data): - markers["startTime"].append((start - startTime) * 1000) - markers["endTime"].append((end - startTime) * 1000) - markers["category"].append(0) - # 1 = marker with start and end times, 2 = start but no end. - markers["phase"].append(1) - markers["name"].append(name_index) - markers["data"].append(data) - markers["length"] = markers["length"] + 1 - - def format_percent(value): - return str(round(value, 1)) + "%" - - samples = firstThread["samples"] - samples["stack"].append(0) - samples["time"].append(0) - - cpu_string_index = get_string_index("CPU Use") - memory_string_index = get_string_index("Memory") - io_string_index = get_string_index("IO") - valid_cpu_fields = set() - for m in self.measurements: - # Ignore samples that are much too short. - if m.end - m.start < self.poll_interval / 10: - continue - - # Sample times - samples["stack"].append(0) - samples["time"].append((m.end - startTime) * 1000) - - # CPU - markerData = { - "type": "CPU", - "cpuPercent": format_percent( - sum(list(m.cpu_percent)) / len(m.cpu_percent) - ), - } - total = 0 - for field in ["nice", "user", "system", "iowait", "softirq"]: - if hasattr(m.cpu_times[0], field): - total += sum(getattr(core, field) for core in m.cpu_times) / ( - m.end - m.start - ) - if total > 0: - valid_cpu_fields.add(field) - markerData[field] = total - for field in ["nice", "user", "system", "iowait", "idle"]: - if hasattr(m.cpu_times[0], field): - markerData[field + "_pct"] = format_percent( - 100 - * sum(getattr(core, field) for core in m.cpu_times) - / (m.end - m.start) - / len(m.cpu_times) - ) - add_marker(cpu_string_index, m.start, m.end, markerData) - - # Memory - markerData = {"type": "Mem", "used": m.virt.used} - if hasattr(m.virt, "cached"): - markerData["cached"] = m.virt.cached - if hasattr(m.virt, "buffers"): - markerData["buffers"] = m.virt.buffers - add_marker(memory_string_index, m.start, m.end, markerData) - - # IO - markerData = { - "type": "IO", - "read_count": m.io.read_count, - "read_bytes": m.io.read_bytes, - "write_count": m.io.write_count, - "write_bytes": m.io.write_bytes, - } - add_marker(io_string_index, m.start, m.end, markerData) - samples["length"] = len(samples["stack"]) - - # The marker schema for CPU markers should only contain graph - # definitions for fields we actually have, or the profiler front-end - # will detect missing data and skip drawing the track entirely. - cpuSchema = { - "name": "CPU", - "tooltipLabel": "{marker.name}", - "display": [], - "data": [{"key": "cpuPercent", "label": "CPU Percent", "format": "string"}], - "graphs": [], - } - cpuData = cpuSchema["data"] - for field, label in { - "user": "User %", - "iowait": "IO Wait %", - "system": "System %", - "nice": "Nice %", - "idle": "Idle %", - }.items(): - if field in valid_cpu_fields or field == "idle": - cpuData.append( - {"key": field + "_pct", "label": label, "format": "string"} - ) - cpuGraphs = cpuSchema["graphs"] - for field, color in { - "softirq": "orange", - "iowait": "red", - "system": "grey", - "user": "yellow", - "nice": "blue", - }.items(): - if field in valid_cpu_fields: - cpuGraphs.append({"key": field, "color": color, "type": "bar"}) - profile["meta"]["markerSchema"].insert(0, cpuSchema) - - # Create markers for phases - phase_string_index = get_string_index("Phase") - for phase, v in self.phases.items(): - markerData = {"type": "Phase", "phase": phase} - - cpu_percent_cores = self.aggregate_cpu_percent(phase=phase) - if cpu_percent_cores: - markerData["cpuPercent"] = format_percent( - sum(cpu_percent_cores) / len(cpu_percent_cores) - ) - - cpu_times = [list(c) for c in self.aggregate_cpu_times(phase=phase)] - cpu_times_sum = [0.0] * self._cpu_times_len - for i in range(0, self._cpu_times_len): - cpu_times_sum[i] = sum(core[i] for core in cpu_times) - total_cpu_time_ms = sum(cpu_times_sum) * 1000 - if total_cpu_time_ms > 0: - markerData["cpuTime"] = total_cpu_time_ms - - add_marker(phase_string_index, v[0], v[1], markerData) - - # Add generic markers - for name, start, end, text in self.markers: - markerData = {"type": "Text"} - if text: - markerData["text"] = text - add_marker(get_string_index(name), start, end, markerData) - - return profile diff --git a/toolkit/components/telemetry/Makefile.in b/toolkit/components/telemetry/Makefile.in index fd3038dd69a5..77bab76cadaf 100644 --- a/toolkit/components/telemetry/Makefile.in +++ b/toolkit/components/telemetry/Makefile.in @@ -13,5 +13,5 @@ misc:: $(call mkdir_deps,$(testdir)) $(EXIT_ON_ERROR) \ for dir in $(addondir)/*; do \ base=`basename $$dir`; \ - $(call py_action,zip $$base.xpi,-C $$dir $(testdir)/$$base.xpi \*); \ + $(call py_action,zip,-C $$dir $(testdir)/$$base.xpi \*); \ done diff --git a/toolkit/crashreporter/client/Makefile.in b/toolkit/crashreporter/client/Makefile.in index 2d3ef1bee914..a3110090b248 100644 --- a/toolkit/crashreporter/client/Makefile.in +++ b/toolkit/crashreporter/client/Makefile.in @@ -13,7 +13,7 @@ ifeq ($(OS_ARCH),Darwin) libs:: $(NSINSTALL) -D $(DIST)/bin/crashreporter.app rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/crashreporter.app - $(call py_action,preprocessor crashreporter.app/Contents/Resources/English.lproj/InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_APP_DISPLAYNAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/crashreporter.app/Contents/Resources/English.lproj/InfoPlist.strings) + $(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_APP_DISPLAYNAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/crashreporter.app/Contents/Resources/English.lproj/InfoPlist.strings) $(NSINSTALL) -D $(DIST)/bin/crashreporter.app/Contents/MacOS $(NSINSTALL) $(DIST)/bin/crashreporter $(DIST)/bin/crashreporter.app/Contents/MacOS endif diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk index 7be07e2e42ae..574b206469f9 100644 --- a/toolkit/locales/l10n.mk +++ b/toolkit/locales/l10n.mk @@ -217,8 +217,8 @@ package-langpack-%: XPI_NAME=locale-$* package-langpack-%: AB_CD=$* package-langpack-%: $(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH) - $(call py_action,langpack_manifest $(AB_CD),--locales $(AB_CD) --app-version $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --app-name '$(MOZ_APP_DISPLAYNAME)' --l10n-basedir '$(L10NBASEDIR)' --metadata $(LANGPACK_METADATA) --langpack-eid '$(MOZ_LANGPACK_EID)' --input $(DIST)/xpi-stage/locale-$(AB_CD)) - $(call py_action,zip $(PKG_LANGPACK_BASENAME).xpi,-C $(DIST)/xpi-stage/locale-$(AB_CD) -x **/*.manifest -x **/*.js -x **/*.ini $(LANGPACK_FILE) $(PKG_ZIP_DIRS) manifest.json) + $(call py_action,langpack_manifest,--locales $(AB_CD) --app-version $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --app-name '$(MOZ_APP_DISPLAYNAME)' --l10n-basedir '$(L10NBASEDIR)' --metadata $(LANGPACK_METADATA) --langpack-eid '$(MOZ_LANGPACK_EID)' --input $(DIST)/xpi-stage/locale-$(AB_CD)) + $(call py_action,zip,-C $(DIST)/xpi-stage/locale-$(AB_CD) -x **/*.manifest -x **/*.js -x **/*.ini $(LANGPACK_FILE) $(PKG_ZIP_DIRS) manifest.json) # This variable is to allow the wget-en-US target to know which ftp server to download from ifndef EN_US_BINARY_URL diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 41e609321840..3dddc62aee9c 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -42,7 +42,7 @@ endif # RUN_FIND_DUPES ifndef MOZ_IS_COMM_TOPDIR ifdef RUN_MOZHARNESS_ZIP # Package mozharness - $(call py_action,test_archive $(MOZHARNESS_PACKAGE), \ + $(call py_action,test_archive, \ mozharness \ $(ABS_DIST)/$(PKG_PATH)$(MOZHARNESS_PACKAGE)) endif # RUN_MOZHARNESS_ZIP @@ -60,7 +60,7 @@ ifdef MOZ_ARTIFACT_BUILD_SYMBOLS cd $(DIST)/crashreporter-symbols && \ zip -r5D '../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' . -i '*.sym' -i '*.txt' ifeq ($(MOZ_ARTIFACT_BUILD_SYMBOLS),full) - $(call py_action,symbols_archive $(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst' \ + $(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).tar.zst' \ $(abspath $(DIST)/crashreporter-symbols) \ --full-archive) endif @@ -98,10 +98,10 @@ endif # MOZ_ASAN || LIBFUZZER || MOZ_UBSAN endif # Darwin ifndef MOZ_ARTIFACT_BUILDS @echo 'Generating XPT artifacts archive ($(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)' - $(call py_action,zip $(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(topobjdir)/config/makefiles/xpidl '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt') + $(call py_action,zip,-C $(topobjdir)/config/makefiles/xpidl '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt') else @echo 'Packaging existing XPT artifacts from artifact build into archive ($(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)' - $(call py_action,zip $(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(ABS_DIST)/xpt_artifacts '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt') + $(call py_action,zip,-C $(ABS_DIST)/xpt_artifacts '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt') endif # MOZ_ARTIFACT_BUILDS prepare-package: stage-package @@ -203,14 +203,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 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)) # 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 multilocale.txt,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp '$(MULTILOCALE_DIR)/multilocale.txt' $(ALL_LOCALES)) + $(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)) locale-manifest.in: LOCALES?=$(MOZ_CHROME_MULTILOCALE) locale-manifest.in: $(GLOBAL_DEPS) FORCE diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk index e4c4d278a670..10ea0f2993d9 100644 --- a/toolkit/mozapps/installer/upload-files.mk +++ b/toolkit/mozapps/installer/upload-files.mk @@ -85,7 +85,7 @@ ifdef FUZZING_INTERFACES JSSHELL_BINS += fuzz-tests$(BIN_SUFFIX) endif -MAKE_JSSHELL = $(call py_action,zip $(JSSHELL_NAME),-C $(DIST)/bin --strip $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS)) +MAKE_JSSHELL = $(call py_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, diff --git a/toolkit/mozapps/installer/windows/nsis/makensis.mk b/toolkit/mozapps/installer/windows/nsis/makensis.mk index 65533bd7fbeb..4fa6dea94810 100755 --- a/toolkit/mozapps/installer/windows/nsis/makensis.mk +++ b/toolkit/mozapps/installer/windows/nsis/makensis.mk @@ -101,7 +101,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 defines.nsi,-Fsubstitution $(DEFINES) $(ACDEFINES) \ + $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) $(PYTHON3) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ --preprocess-locale $(topsrcdir) \ @@ -120,7 +120,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 defines.nsi,-Fsubstitution $(DEFINES) $(ACDEFINES) \ + $(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \ $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi) $(PYTHON3) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \ --preprocess-locale $(topsrcdir) \ diff --git a/toolkit/mozapps/update/updater/Makefile.in b/toolkit/mozapps/update/updater/Makefile.in index 70cf32378afa..502c09d21f69 100644 --- a/toolkit/mozapps/update/updater/Makefile.in +++ b/toolkit/mozapps/update/updater/Makefile.in @@ -17,12 +17,12 @@ include $(topsrcdir)/config/rules.mk ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) export:: - $(call py_action,preprocessor dist/bin/Info.plist,-Fsubstitution -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/Info.plist) + $(call py_action,preprocessor,-Fsubstitution -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/Info.plist) libs:: $(NSINSTALL) -D $(DIST)/bin/updater.app rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app rsync -a -C $(DIST)/bin/Info.plist $(DIST)/bin/updater.app/Contents - $(call py_action,preprocessor updater.app/Contents/Resources/English.lproj/InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_APP_DISPLAYNAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings) + $(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_APP_DISPLAYNAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings) $(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS $(NSINSTALL) $(DIST)/bin/org.mozilla.updater $(DIST)/bin/updater.app/Contents/MacOS endif diff --git a/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in b/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in index 533533c4d9e9..00a43f12d75c 100644 --- a/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in +++ b/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in @@ -27,7 +27,7 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) # Copy for xpcshell tests $(NSINSTALL) -D $(XPCSHELLTESTDIR)/data/updater-xpcshell.app rsync -a -C --exclude '*.in' $(srcdir)/../macbuild/Contents $(XPCSHELLTESTDIR)/data/updater-xpcshell.app - $(call py_action,preprocessor updater-xpcshell.app/Contents/Resources/English.lproj/InfoPlist.strings,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_APP_DISPLAYNAME)' $(srcdir)/../macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(XPCSHELLTESTDIR)/data/updater-xpcshell.app/Contents/Resources/English.lproj/InfoPlist.strings) + $(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_APP_DISPLAYNAME)' $(srcdir)/../macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(XPCSHELLTESTDIR)/data/updater-xpcshell.app/Contents/Resources/English.lproj/InfoPlist.strings) $(NSINSTALL) -D $(XPCSHELLTESTDIR)/data/updater-xpcshell.app/Contents/MacOS $(NSINSTALL) $(FINAL_TARGET)/updater-xpcshell $(XPCSHELLTESTDIR)/data/updater-xpcshell.app/Contents/MacOS rm -Rf $(XPCSHELLTESTDIR)/data/updater.app -- 2.11.4.GIT