Bug 1239217 - Skip empty install manifests, apart a few exceptions. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 21 Jan 2016 18:10:57 +0900
changeset 281190 0d981cf65508535f7967a48fa08f93e54401ad93
parent 281189 0947272393af5b921b4b1fbd888478536010d7b4
child 281191 233be618da5897e376b87a8928f518b28cfbeac1
push id29930
push usercbook@mozilla.com
push dateFri, 22 Jan 2016 11:05:50 +0000
treeherdermozilla-central@7104d650a97d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1239217 - Skip empty install manifests, apart a few exceptions. r=gps Install manifests are not empty in normal conditions, apart a few exceptions where they are only used for a "magic" `rm -rf`. However, we're going to introduce changes that will empty some of the install manifests and make their work happen from a different backend, in which case we don't want them to correspond to a `rm -rf`.
--- a/Makefile.in
+++ b/Makefile.in
@@ -123,26 +123,23 @@ install-manifests: $(addprefix install-,
 # js as standalone because automated builds are building nspr separately and
 # that would remove the resulting files.
 # Eventually, a standalone js build would just be able to build nspr itself,
 # removing the need for the former.
-.PHONY: $(addprefix install-,$(install_manifests))
-$(addprefix install-,$(filter dist/%,$(install_manifests))): install-dist/%: $(install_manifest_depends)
-	$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$*)
+.PHONY: $(addprefix install-,$(subst /,_,$(install_manifests)))
+$(addprefix install-,$(install_manifests)): install-%: $(install_manifest_depends)
+	$(addprefix $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
 # Dummy wrapper rule to allow the faster backend to piggy back
 install-dist_%: install-dist/% ;
-install-_tests: $(install_manifest_depends)
-	$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/_tests)
 # For compatibility
 .PHONY: install-tests
 install-tests: install-_tests
 include $(topsrcdir)/build/moz-automation.mk
 # dist and _tests should be purged during cleaning. However, we don't want them
 # purged during PGO builds because they contain some auto-generated files.
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -386,29 +386,24 @@ class RecursiveMakeBackend(CommonBackend
         self._makefile_in_count = 0
         self._makefile_out_count = 0
         self._test_manifests = {}
             'config', 'autoconf.mk'))
-        self._install_manifests = {
-            k: InstallManifest() for k in [
-                'dist_bin',
-                'dist_branding',
-                'dist_idl',
-                'dist_include',
-                'dist_public',
-                'dist_private',
-                'dist_sdk',
-                'dist_xpi-stage',
-                '_tests',
-                'xpidl',
-            ]}
+        self._install_manifests = defaultdict(InstallManifest)
+        # The build system relies on some install manifests always existing
+        # even if they are empty, because the directories are still filled
+        # by the build system itself, and the install manifests are only
+        # used for a "magic" rm -rf.
+        self._install_manifests['dist_public']
+        self._install_manifests['dist_private']
+        self._install_manifests['dist_sdk']
         self._traversal = RecursiveMakeTraversal()
         self._compile_graph = defaultdict(set)
         self._no_skip = {
             'export': set(),
             'libs': set(),
             'misc': set(),