8071651: infinite build loops in 9-dev windows platform on Jan 26

Reviewed-by: alanb, ihse
This commit is contained in:
Erik Joelsson 2015-01-28 14:04:05 +01:00
parent bccf30e6e7
commit d60c8e9ea6
2 changed files with 19 additions and 3 deletions

View File

@ -445,7 +445,9 @@ not-containing = $(strip $(foreach v,$(strip $2),$(if $(findstring $(strip $1),$
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
# String equals
equals = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
equals = \
$(and $(findstring $(strip $1),$(strip $2)),\
$(findstring $(strip $2),$(strip $1)))
ifneq ($(DISABLE_CACHE_FIND), true)
################################################################################
@ -606,8 +608,8 @@ DependOnVariableHelper = \
$(call ReadFile, $(call DependOnVariableFileName, $1, $2)))),,\
$(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
$(if $(findstring $(LOG_LEVEL), trace), \
$(info Variable $1: $(strip $($1))) \
$(info File: $(call ReadFile, $(call DependOnVariableFileName, $1, $2)))) \
$(info Variable $1: >$(strip $($1))<) \
$(info File: >$(call ReadFile, $(call DependOnVariableFileName, $1, $2))<)) \
$(call WriteFile, $($1), $(call DependOnVariableFileName, $1, $2))) \
$(call DependOnVariableFileName, $1, $2))

View File

@ -62,6 +62,20 @@ $(ESCAPE_DOLLAR_DIR)/_escape_dollar: $(DEPS)
TEST_TARGETS += $(ESCAPE_DOLLAR_DIR)/_escape_dollar
################################################################################
# Test Equals
EQUALS_VALUE1 := value1$(SPACE)
EQUALS_VALUE2 := value2
ifneq ($(call equals, $(EQUALS_VALUE1), $(EQUALS_VALUE2)), )
$(error The strings >$(EQUALS_VALUE1)< and >$(EQUALS_VALUE2)< are equal)
endif
ifeq ($(call equals, $(EQUALS_VALUE1), $(EQUALS_VALUE1)), )
$(error The strings >$(EQUALS_VALUE1)< and >$(EQUALS_VALUE1)< are not equal)
endif
################################################################################
# Test ShellQuote