Bug 850088 - check-sync-dirs.py fails for buld files copies not in sync. r=Callek
authorEdmund Wong <ewong@pw-wspx.org>
Tue, 12 Mar 2013 10:09:27 +0800
changeset 15118 98928de881ed01421fb319efc92133164d07c447
parent 15117 fc416f4edfca9c2ef2332951725d93c0815c3459
child 15119 3220cc71d13738248229f093feec0cc7b91a51fb
push id898
push userbugzilla@standard8.plus.com
push dateMon, 13 May 2013 17:03:31 +0000
treeherdercomm-beta@3106694b14de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs850088
Bug 850088 - check-sync-dirs.py fails for buld files copies not in sync. r=Callek
config/makefiles/autotargets.mk
--- a/config/makefiles/autotargets.mk
+++ b/config/makefiles/autotargets.mk
@@ -43,27 +43,18 @@ slash_strip = \
     $(subst <--[**]-->,$(space),\
 	$(call _slashSqueeze,\
     $(subst $(space),<--[**]-->,$(1))\
   )))
 
 # Extract directory path from a dependency file.
 mkdir_stem =$(foreach val,$(getargv),$(subst /.mkdir.done,$(NULL),$(val)))
 
-# Function can be called by other functions to expand un-expanded make vars.
-# := functionality in call(able) function form
-expand = $(eval func-expand-$(1) := $($(1)))$(func-expand-$(1))
-
 ## Generate timestamp file for threadsafe directory creation
-mkdir_deps = \
-  $(strip \
-  $(foreach var,$(getargv),\
-  $(foreach dir,$(call expand,var),\
-  $(call slash_strip,$(call expand,dir)/.mkdir.done) \
-  )))
+mkdir_deps =$(foreach dir,$(getargv),$(call slash_strip,$(dir)/.mkdir.done))
 
 #######################
 ##---]  TARGETS  [---##
 #######################
 
 %/.mkdir.done: # mkdir -p -p => mkdir -p
 	$(subst $(space)-p,$(null),$(MKDIR)) -p "$(dir $@)"
 # Make the timestamp old enough for not being a problem with symbolic links
@@ -77,29 +68,27 @@ mkdir_deps = \
 .mkdir.done:
 	@echo "WARNING: $(MKDIR) -dot- requested by $(MAKE) -C $(CURDIR) $(MAKECMDGOALS)"
 	@$(TOUCH) -t 198001030000 "$@"
 
 INCLUDED_AUTOTARGETS_MK = 1
 endif #}
 
 
-###########################################################################
-## GENERATED_DIR(_\S+)? directory deps
-## GENERATED_DIRS_{export,lib,tools} = foo   # target specific deps
-###########################################################################
-GENERATED_DIRS += $(foreach tgt,$(MAKECMDGOALS),$(value GENERATED_DIRS_$(tgt)))
-GENERATED_DIRS := $(call expand,GENERATED_DIRS)
-GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS)))
-GARBAGE_DIRS   += $(GENERATED_DIRS)
-
-# directory deps are timestamp based to only create when needed
-AUTO_DEPS += $(if $(value GENERATED_DIRS),$(call mkdir_deps,GENERATED_DIRS))
+## Accumulate deps and cleanup
+ifneq (,$(GENERATED_DIRS))
+  GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS)))
+  tmpauto :=$(call mkdir_deps,GENERATED_DIRS)
+  GENERATED_DIRS_DEPS +=$(tmpauto)
+  GARBAGE_DIRS        +=$(GENERATED_DIRS)
+endif
 
 #################################################################
 # One ring/dep to rule them all:
 #   config/rules.mk::all target is available by default
 #   Add $(AUTO_DEPS) as an explicit target dependency when needed.
 #################################################################
+
+AUTO_DEPS +=$(GENERATED_DIRS_DEPS)
 AUTO_DEPS := $(strip $(sort $(AUTO_DEPS)))
 
 # Complain loudly if deps have not loaded so getargv != $(NULL)
 $(call requiredfunction,getargv)