8189434: SetupCopyFiles does not handle files with $ in them

Reviewed-by: ihse
This commit is contained in:
Erik Joelsson 2017-10-17 15:46:09 +02:00
parent 7c3c83fb55
commit 447beeba7f
3 changed files with 14 additions and 6 deletions

View File

@ -299,7 +299,7 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
$(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
DEST := $(TEST_IMAGE_DIR)/jdk/demos, \
FILES := $(call DoubleDollar, $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image)), \
FILES := $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image), \
))
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)

View File

@ -324,9 +324,8 @@ ifneq ($(filter jdk, $(MAKECMDGOALS)), )
DEMO_FILES := \
$(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \
$(call DoubleDollar, \
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \
-type f -a ! \( -name "_the*" -o -name "javac_state" \) )) \
-type f -a ! \( -name "_the*" -o -name "javac_state" \) ) \
)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)

View File

@ -781,10 +781,19 @@ define SetupCopyFilesBody
$1_SRC := $$(patsubst %/,%,$$($1_SRC))
$1_DEST := $$(patsubst %/,%,$$($1_DEST))
# Need to wrap arguments in DoubleDollar because of the eval nested inside an
# eval macro body.
$$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
$$(eval $$(call AddFileToCopy, $$($1_SRC)/$$f, \
$$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)), \
$1, $$($1_MACRO), $$($1_LOG_ACTION))))
$$(eval $$(call AddFileToCopy, \
$$(call DoubleDollar, $$($1_SRC)/$$f), \
$$(call DoubleDollar, \
$$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
), \
$1, \
$$($1_MACRO), \
$$($1_LOG_ACTION) \
)) \
)
endef