Bug 1037981 Make 'derecursed' builds support --enable-xterm-updates r=glandium
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Wed, 16 Jul 2014 08:36:30 +0100
changeset 216220 0152913dbac70a56b44ee68a8c013c7ba0df7844
parent 216219 e8d086d9a01ada25aafe3de8882fa2dea75b86d5
child 216221 b3918dd99a0eff3f061233a7c6bb4cf37cf31b49
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1037981
milestone33.0a1
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 1037981 Make 'derecursed' builds support --enable-xterm-updates r=glandium
config/makefiles/debugmake.mk
config/recurse.mk
config/rules.mk
--- a/config/makefiles/debugmake.mk
+++ b/config/makefiles/debugmake.mk
@@ -8,18 +8,23 @@
 
 ###########################################################################
 ## Intent: Helper targets for displaying variables and state information
 ###########################################################################
 
 # Support usage outside of config/rules.mk
 ifndef INCLUDED_DEBUGMAKE_MK #{
 
+define CR
+
+
+endef
+
 define shell_quote
-'$(subst ','\'',$(1))'
+'$(subst $(CR),\$(CR),$(subst ','\'',$(1)))'
 endef
 
 echo-variable-%:
 	@echo $(call shell_quote,$($*))
 
 echo-tiers:
 	@echo $(TIERS)
 
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -86,17 +86,17 @@ endif
 
 GARBAGE_DIRS += subtiers
 
 # Recursion rule for all directories traversed for all subtiers in the
 # current tier.
 # root.mk defines subtier_of_* variables, that map a normalized subdir path to
 # a subtier name (e.g. subtier_of_memory_jemalloc = base)
 $(addsuffix /$(CURRENT_TIER),$(CURRENT_DIRS)): %/$(CURRENT_TIER):
-	+@$(MAKE) -C $* $(if $(filter $*,$(tier_$(subtier_of_$(subst /,_,$*))_staticdirs)),,$(CURRENT_TIER))
+	$(call SUBMAKE,$(if $(filter $*,$(tier_$(subtier_of_$(subst /,_,$*))_staticdirs)),,$(CURRENT_TIER)),$*)
 # Ensure existing stamps are up-to-date, but don't create one if submake didn't create one.
 	$(if $(wildcard $@),@$(STAMP_TOUCH))
 
 # Dummy rules for possibly inexisting dependencies for the above tier targets
 $(addsuffix /Makefile,$(CURRENT_DIRS)) $(addsuffix /backend.mk,$(CURRENT_DIRS)):
 
 # The export tier requires nsinstall, which is built from config. So every
 # subdirectory traversal needs to happen after traversing config.
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -341,31 +341,35 @@ endif
 ifeq ($(SOLARIS_SUNPRO_CXX),1)
 GARBAGE_DIRS += SunWS_cache
 endif
 
 ifdef MOZ_UPDATE_XTERM
 # Its good not to have a newline at the end of the titlebar string because it
 # makes the make -s output easier to read.  Echo -n does not work on all
 # platforms, but we can trick printf into doing it.
+ifeq (.,$(relativesrcdir))
+UPDATE_TITLE = printf '\033]0;%s in %s\007' $(1) $(2) ;
+else
 UPDATE_TITLE = printf '\033]0;%s in %s\007' $(1) $(relativesrcdir)/$(2) ;
 endif
+endif
 
 ifdef MACH
 ifndef NO_BUILDSTATUS_MESSAGES
 define BUILDSTATUS
 @echo 'BUILDSTATUS $1'
 
 endef
 endif
 endif
 
 define SUBMAKE # $(call SUBMAKE,target,directory,static)
 +@$(UPDATE_TITLE)
-+$(MAKE) $(if $(2),-C $(2)) $(1)
++@$(MAKE) $(if $(2),-C $(2)) $(1)
 
 endef # The extra line is important here! don't delete it
 
 define TIER_DIR_SUBMAKE
 $(call SUBMAKE,$(4),$(3),$(5))
 
 endef # Ths empty line is important.