bug 830351: remove unused .mkdir.deps rule and clenaup cosmetic makefile problems
authorJoey Armstrong <joey@mozilla.com>
Thu, 31 Jan 2013 14:55:30 -0500
changeset 130367 40aeae12d0913ac0fd68ba59350d648f2fe660d6
parent 130366 a033cebb0e4acb68fd86f18d5a7449920ede252c
child 130368 eefb9fb2af7860d23519eb8c66e42c3f1f018070
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs830351
milestone21.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 830351: remove unused .mkdir.deps rule and clenaup cosmetic makefile problems
config/makefiles/autotargets.mk
config/makefiles/makeutils.mk
config/makefiles/test/check-autotargets.mk
config/rules.mk
js/src/config/makefiles/autotargets.mk
js/src/config/makefiles/makeutils.mk
js/src/config/rules.mk
--- a/config/makefiles/autotargets.mk
+++ b/config/makefiles/autotargets.mk
@@ -33,17 +33,17 @@ space = $(NULL) $(NULL)
 getPathPrefix =$(if $(filter /%,$(1)),/)
 
 # Squeeze '//' from the path, easily created by string functions
 _slashSqueeze =$(foreach val,$(getargv),$(call getPathPrefix,$(val))$(subst $(space),/,$(strip $(subst /,$(space),$(val)))))
 
 # Squeeze extraneous directory slashes from the path
 #  o protect embedded spaces within the path
 #  o replace //+ sequences with /
-slash_strip =\
+slash_strip = \
   $(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)))
@@ -57,37 +57,31 @@ mkdir_deps =$(foreach dir,$(getargv),$(c
 
 %/.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
 # targets depending on it. Use Jan 3, 1980 to accomodate any timezone where
 # 198001010000 would translate to something older than FAT epoch.
 	@$(TOUCH) -t 198001030000 "$@"
 
-# A handful of makefiles are attempting "mkdir dot".  Likely not intended
-# or stale logic so add a stub target to handle the request and warn for now.
-.mkdir.done:
-ifndef NOWARN_AUTOTARGETS # {
-	@echo "WARNING: $(MKDIR) -dot- requested by $(MAKE) -C $(CURDIR) $(MAKECMDGOALS)"
-	@$(TOUCH) -t 198001030000 $@
-endif #}
-
 INCLUDED_AUTOTARGETS_MK = 1
 endif #}
 
 
 ## 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)
--- a/config/makefiles/makeutils.mk
+++ b/config/makefiles/makeutils.mk
@@ -40,21 +40,21 @@ subargv =$(wordlist $(1),$(words $(getar
 # Debug:
 #   target-preqs = \
 #     $(call banner,target-preqs-BEGIN) \
 #     foo bar tans \
 #     $(call banner,target-preqs-END) \
 #     $(NULL)
 #   target: $(target-preqs)
 
-banner =\
-$(info )\
-$(info ***************************************************************************)\
-$(info ** $(getargv))\
-$(info ***************************************************************************)\
+banner = \
+$(info ) \
+$(info ***************************************************************************) \
+$(info ** $(getargv)) \
+$(info ***************************************************************************) \
 $(NULL)
 
 #####################################################################
 # Intent: Determine if a string or pattern is contained in a list
 # Usage: strcmp  - $(call if_XinY,clean,$(MAKECMDGOALS))
 #      : pattern - $(call if_XinY,clean%,$(MAKECMDGOALS))
 is_XinY =$(filter $(1),$(call subargv,3,$(getargv)))
 
--- a/config/makefiles/test/check-autotargets.mk
+++ b/config/makefiles/test/check-autotargets.mk
@@ -6,31 +6,29 @@
 
 ifdef VERBOSE
   $(warning loading test)
 endif
 
 space=$(null) $(null)
 GENERATED_DIRS = bogus # test data
 
-NOWARN_AUTOTARGETS = 1 # Unit test includes makefile twice.
-
 undefine USE_AUTOTARGETS_MK
 undefine INCLUDED_AUTOTARGETS_MK
 include $(topsrcdir)/config/makefiles/autotargets.mk
 
 ifndef INCLUDED_AUTOTARGETS_MK
   $(error autotargets.mk was not included
 endif
 
 $(call requiredfunction,mkdir_deps)
 
 
 # Verify test data populated makefile vars correctly
-vars = AUTO_DEPS GARBAGE_DIRS GENERATED_DIRS_DEPS 
+vars = AUTO_DEPS GARBAGE_DIRS GENERATED_DIRS_DEPS
 $(foreach var,$(vars),$(call errorIfEmpty,$(var)))
 
 # Data should also be valid
 ifneq (bogus,$(findstring bogus,$(AUTO_DEPS)))
   $(error AUTO_DEPS=[$(AUTO_DEPS)] is not set correctly)
 endif
 
 
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -111,17 +111,17 @@ check::
 cppunittests-remote: DM_TRANS?=adb
 cppunittests-remote:
 	@if [ "${TEST_DEVICE}" != "" -o "$(DM_TRANS)" = "adb" ]; then \
 		$(PYTHON) -u $(topsrcdir)/testing/remotecppunittests.py \
 			--xre-path=$(DEPTH)/dist/bin \
 			--localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \
 			--dm_trans=$(DM_TRANS) \
 			--deviceIP=${TEST_DEVICE} \
- 			$(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)) $(EXTRA_TEST_ARGS); \
+			$(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)) $(EXTRA_TEST_ARGS); \
 	else \
 		echo "please prepare your host with environment variables for TEST_DEVICE"; \
 	fi
 
 endif # CPP_UNIT_TESTS
 
 .PHONY: check
 
--- a/js/src/config/makefiles/autotargets.mk
+++ b/js/src/config/makefiles/autotargets.mk
@@ -33,17 +33,17 @@ space = $(NULL) $(NULL)
 getPathPrefix =$(if $(filter /%,$(1)),/)
 
 # Squeeze '//' from the path, easily created by string functions
 _slashSqueeze =$(foreach val,$(getargv),$(call getPathPrefix,$(val))$(subst $(space),/,$(strip $(subst /,$(space),$(val)))))
 
 # Squeeze extraneous directory slashes from the path
 #  o protect embedded spaces within the path
 #  o replace //+ sequences with /
-slash_strip =\
+slash_strip = \
   $(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)))
@@ -57,37 +57,31 @@ mkdir_deps =$(foreach dir,$(getargv),$(c
 
 %/.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
 # targets depending on it. Use Jan 3, 1980 to accomodate any timezone where
 # 198001010000 would translate to something older than FAT epoch.
 	@$(TOUCH) -t 198001030000 "$@"
 
-# A handful of makefiles are attempting "mkdir dot".  Likely not intended
-# or stale logic so add a stub target to handle the request and warn for now.
-.mkdir.done:
-ifndef NOWARN_AUTOTARGETS # {
-	@echo "WARNING: $(MKDIR) -dot- requested by $(MAKE) -C $(CURDIR) $(MAKECMDGOALS)"
-	@$(TOUCH) -t 198001030000 $@
-endif #}
-
 INCLUDED_AUTOTARGETS_MK = 1
 endif #}
 
 
 ## 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)
--- a/js/src/config/makefiles/makeutils.mk
+++ b/js/src/config/makefiles/makeutils.mk
@@ -40,21 +40,21 @@ subargv =$(wordlist $(1),$(words $(getar
 # Debug:
 #   target-preqs = \
 #     $(call banner,target-preqs-BEGIN) \
 #     foo bar tans \
 #     $(call banner,target-preqs-END) \
 #     $(NULL)
 #   target: $(target-preqs)
 
-banner =\
-$(info )\
-$(info ***************************************************************************)\
-$(info ** $(getargv))\
-$(info ***************************************************************************)\
+banner = \
+$(info ) \
+$(info ***************************************************************************) \
+$(info ** $(getargv)) \
+$(info ***************************************************************************) \
 $(NULL)
 
 #####################################################################
 # Intent: Determine if a string or pattern is contained in a list
 # Usage: strcmp  - $(call if_XinY,clean,$(MAKECMDGOALS))
 #      : pattern - $(call if_XinY,clean%,$(MAKECMDGOALS))
 is_XinY =$(filter $(1),$(call subargv,3,$(getargv)))
 
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -111,17 +111,17 @@ check::
 cppunittests-remote: DM_TRANS?=adb
 cppunittests-remote:
 	@if [ "${TEST_DEVICE}" != "" -o "$(DM_TRANS)" = "adb" ]; then \
 		$(PYTHON) -u $(topsrcdir)/testing/remotecppunittests.py \
 			--xre-path=$(DEPTH)/dist/bin \
 			--localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \
 			--dm_trans=$(DM_TRANS) \
 			--deviceIP=${TEST_DEVICE} \
- 			$(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)) $(EXTRA_TEST_ARGS); \
+			$(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)) $(EXTRA_TEST_ARGS); \
 	else \
 		echo "please prepare your host with environment variables for TEST_DEVICE"; \
 	fi
 
 endif # CPP_UNIT_TESTS
 
 .PHONY: check