Bug 934864 - Add REPORT_BUILD do INSTALL_TARGETS and PP_TARGETS. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 09 Nov 2013 10:32:58 +0900
changeset 154593 4810e8f4eb98462aa7134d691d5dc240163e2f53
parent 154592 97daebf6405b17fe368e76809b8926b4892e3f9b
child 154594 484945495f95ca30fea9e096a5fabbf49b18e787
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersgps
bugs934864
milestone28.0a1
Bug 934864 - Add REPORT_BUILD do INSTALL_TARGETS and PP_TARGETS. r=gps
config/rules.mk
js/src/config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -48,17 +48,17 @@ endif
 
 ifdef REBUILD_CHECK
 ifdef .PYMAKE
 REPORT_BUILD = @%rebuild_check rebuild_check $@ $^
 else
 REPORT_BUILD = $(info $(shell $(PYTHON) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
 endif
 else
-REPORT_BUILD = $(info $(notdir $@))
+REPORT_BUILD = $(info $(if $(filter $(DEPTH)/%,$@),$(@:$(DEPTH)/%=%),$(notdir $@)))
 endif
 
 ifeq ($(OS_ARCH),OS2)
 EXEC			=
 else
 EXEC			= exec
 endif
 
@@ -1531,20 +1531,22 @@ endef
 $(foreach tier,$(INSTALL_TARGETS_TIERS), \
   $(eval $(tier):: $(INSTALL_TARGETS_FILES_$(tier)) $(INSTALL_TARGETS_EXECUTABLES_$(tier))) \
 )
 
 install_targets_sanity = $(if $(filter-out $(notdir $@),$(notdir $(<))),$(error Looks like $@ has an unexpected dependency on $< which breaks INSTALL_TARGETS))
 
 $(sort $(foreach tier,$(INSTALL_TARGETS_TIERS),$(INSTALL_TARGETS_FILES_$(tier)))):
 	$(install_targets_sanity)
+	$(REPORT_BUILD)
 	$(call install_cmd,$(IFLAGS1) "$<" "$(@D)")
 
 $(sort $(foreach tier,$(INSTALL_TARGETS_TIERS),$(INSTALL_TARGETS_EXECUTABLES_$(tier)))):
 	$(install_targets_sanity)
+	$(REPORT_BUILD)
 	$(call install_cmd,$(IFLAGS2) "$<" "$(@D)")
 
 ################################################################################
 # Preprocessing rules
 #
 # The PP_TARGETS variable contains a list of all preprocessing target
 # categories. Each category has associated variables listing input files, the
 # output directory, extra preprocessor flags, and so on. For example:
@@ -1595,16 +1597,17 @@ pp_target_results = $(foreach file,$($(1
 )
 
 $(foreach tier,$(PP_TARGETS_TIERS), \
   $(eval $(tier):: $(PP_TARGETS_RESULTS_$(tier))) \
 )
 
 $(sort $(foreach tier,$(PP_TARGETS_TIERS),$(PP_TARGETS_RESULTS_$(tier)))):
 	$(if $(filter-out $(notdir $@),$(notdir $(<:.in=))),$(error Looks like $@ has an unexpected dependency on $< which breaks PP_TARGETS))
+	$(REPORT_BUILD)
 	$(RM) "$@"
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) "$<" -o "$@"
 
 
 # Pull in non-recursive targets if this is a partial tree build.
 ifndef TOPLEVEL_BUILD
 include $(topsrcdir)/config/makefiles/nonrecursive.mk
 endif
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -48,17 +48,17 @@ endif
 
 ifdef REBUILD_CHECK
 ifdef .PYMAKE
 REPORT_BUILD = @%rebuild_check rebuild_check $@ $^
 else
 REPORT_BUILD = $(info $(shell $(PYTHON) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
 endif
 else
-REPORT_BUILD = $(info $(notdir $@))
+REPORT_BUILD = $(info $(if $(filter $(DEPTH)/%,$@),$(@:$(DEPTH)/%=%),$(notdir $@)))
 endif
 
 ifeq ($(OS_ARCH),OS2)
 EXEC			=
 else
 EXEC			= exec
 endif
 
@@ -1531,20 +1531,22 @@ endef
 $(foreach tier,$(INSTALL_TARGETS_TIERS), \
   $(eval $(tier):: $(INSTALL_TARGETS_FILES_$(tier)) $(INSTALL_TARGETS_EXECUTABLES_$(tier))) \
 )
 
 install_targets_sanity = $(if $(filter-out $(notdir $@),$(notdir $(<))),$(error Looks like $@ has an unexpected dependency on $< which breaks INSTALL_TARGETS))
 
 $(sort $(foreach tier,$(INSTALL_TARGETS_TIERS),$(INSTALL_TARGETS_FILES_$(tier)))):
 	$(install_targets_sanity)
+	$(REPORT_BUILD)
 	$(call install_cmd,$(IFLAGS1) "$<" "$(@D)")
 
 $(sort $(foreach tier,$(INSTALL_TARGETS_TIERS),$(INSTALL_TARGETS_EXECUTABLES_$(tier)))):
 	$(install_targets_sanity)
+	$(REPORT_BUILD)
 	$(call install_cmd,$(IFLAGS2) "$<" "$(@D)")
 
 ################################################################################
 # Preprocessing rules
 #
 # The PP_TARGETS variable contains a list of all preprocessing target
 # categories. Each category has associated variables listing input files, the
 # output directory, extra preprocessor flags, and so on. For example:
@@ -1595,16 +1597,17 @@ pp_target_results = $(foreach file,$($(1
 )
 
 $(foreach tier,$(PP_TARGETS_TIERS), \
   $(eval $(tier):: $(PP_TARGETS_RESULTS_$(tier))) \
 )
 
 $(sort $(foreach tier,$(PP_TARGETS_TIERS),$(PP_TARGETS_RESULTS_$(tier)))):
 	$(if $(filter-out $(notdir $@),$(notdir $(<:.in=))),$(error Looks like $@ has an unexpected dependency on $< which breaks PP_TARGETS))
+	$(REPORT_BUILD)
 	$(RM) "$@"
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) "$<" -o "$@"
 
 
 # Pull in non-recursive targets if this is a partial tree build.
 ifndef TOPLEVEL_BUILD
 include $(topsrcdir)/config/makefiles/nonrecursive.mk
 endif