8172037: Change log message of SetupCopyFiles

Reviewed-by: tbell
This commit is contained in:
Erik Joelsson 2017-01-09 11:55:37 +01:00
parent 6cf0f0435b
commit a658a12158
3 changed files with 12 additions and 2 deletions

View File

@ -67,14 +67,17 @@ ifneq ($(LIBS_DIR), )
# or risk invalidating the build output from external changes.
ifeq ($(filter $(OUTPUT_ROOT)/%, $(LIBS_DIR)), )
LINK_MACRO := install-file
LOG_ACTION := Copying
else
LINK_MACRO := link-file-relative
LOG_ACTION := Creating symlink
endif
$(eval $(call SetupCopyFiles, LINK_LIBS, \
SRC := $(LIBS_DIR), \
DEST := $(JDK_OUTPUTDIR)/lib, \
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
MACRO := $(LINK_MACRO), \
LOG_ACTION := $(LOG_ACTION), \
))
TARGETS += $(COPY_LIBS) $(LINK_LIBS)
endif

View File

@ -76,6 +76,7 @@ else
$(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
$(TARGETS))), \
MACRO := link-file-relative, \
LOG_ACTION := Creating symlink, \
))
endif

View File

@ -694,8 +694,9 @@ define AddFileToCopy
# 2 : Dest file
# 3 : Variable to add targets to
# 4 : Macro to call for copy operation
# 5 : Action text to log
$2: $1
$$(call LogInfo, Copying $$(patsubst $(OUTPUT_ROOT)/%,%,$$@))
$$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUT_ROOT)/%,%,$$@))
$$($$(strip $4))
$3 += $2
@ -721,6 +722,7 @@ identity = \
# Default is 'install-file'
# NAME_MACRO : Optionally supply a macro that rewrites the target file name
# based on the source file name
# LOG_ACTION : Optionally specify a different action text for log messages
SetupCopyFiles = $(NamedParamsMacroTemplate)
define SetupCopyFilesBody
@ -737,6 +739,10 @@ define SetupCopyFilesBody
$1_NAME_MACRO := identity
endif
ifeq ($$($1_LOG_ACTION), )
$1_LOG_ACTION := Copying
endif
# Remove any trailing slash from SRC and DEST
$1_SRC := $$(patsubst %/,%,$$($1_SRC))
$1_DEST := $$(patsubst %/,%,$$($1_DEST))
@ -744,7 +750,7 @@ define SetupCopyFilesBody
$$(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, $$($1_MACRO), $$($1_LOG_ACTION))))
endef