Skip to content

Commit

Permalink
8172037: Change log message of SetupCopyFiles
Browse files Browse the repository at this point in the history
Reviewed-by: tbell
  • Loading branch information
erikj committed Jan 9, 2017
1 parent adc135a commit 4d1ac5f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions make/CopyImportModules.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions make/ModuleWrapper.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ else
$(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
$(TARGETS))), \
MACRO := link-file-relative, \
LOG_ACTION := Creating symlink, \
))
endif

Expand Down
10 changes: 8 additions & 2 deletions make/common/MakeBase.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -737,14 +739,18 @@ 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))

$$(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

Expand Down

0 comments on commit 4d1ac5f

Please sign in to comment.