Bug 1270229 - Process dist/idl manifest in actual xpidl Makefile; r?glandium
Currently, we process the dist/idl install manifest both in the
top-level Makefile.in and inside xpcom/xpidl/Makefile.in:export.
I'm intent on removing the redundancy and on removing
xpcom/xpidl/Makefile. In preparation for this, move the install manifest
processing invocation to config/makefiles/xpidl/Makefile.in.
This required a new make target and a make reinvocation because make
sucks. This is the same as before, just all inside the same Makefile.in
now.
MozReview-Commit-ID: HLtF1mHU4yu
--- a/config/makefiles/xpidl/Makefile.in
+++ b/config/makefiles/xpidl/Makefile.in
@@ -67,25 +67,33 @@ registered_xpt_files := @registered_xpt_
xpt_files := $(registered_xpt_files) @xpt_files@
@xpidl_rules@
depends_files := $(foreach root,$(xpidl_modules),$(idl_deps_dir)/$(root).pp)
GARBAGE += $(xpt_files) $(depends_files)
-xpidl:: $(xpt_files) $(chrome_manifests) $(interfaces_manifests)
+# We can't have the install manifest processing as an actual dependency of
+# the xpts because it is .PHONY and would cause the target to always be out
+# of date. So we have make reinvoke itself with another rule.
+.PHONY: xpidl
+xpidl::
+ $(call py_action,process_install_manifest,$(DIST)/idl $(DEPTH)/_build_manifests/install/dist_idl)
+ $(MAKE) xpidl-real
+
+.PHONY: xpidl-real
+xpidl-real:: $(xpt_files) $(chrome_manifests) $(interfaces_manifests)
$(xpt_files): $(process_py) $(call mkdir_deps,$(idl_deps_dir) $(dist_include_dir))
-include $(depends_files)
define xpt_deps
$(1): $(call mkdir_deps,$(dir $(1)))
$(1): $(addsuffix .idl,$(addprefix $(dist_idl_dir)/,$($(basename $(notdir $(1)))_deps)))
ifneq ($($(basename $(notdir $(1)))_deps),$($(basename $(notdir $(1)))_deps_built))
$(1): FORCE
endif
endef
$(foreach xpt,$(xpt_files),$(eval $(call xpt_deps,$(xpt))))
-.PHONY: xpidl
--- a/xpcom/xpidl/Makefile.in
+++ b/xpcom/xpidl/Makefile.in
@@ -1,10 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
export::
- $(call py_action,process_install_manifest,$(DIST)/idl $(DEPTH)/_build_manifests/install/dist_idl)
$(call SUBMAKE,xpidl,$(DEPTH)/config/makefiles/xpidl)
clean clobber realclean clobber_all distclean::
$(call SUBMAKE,$@,$(DEPTH)/config/makefiles/xpidl)