From 10b29b4ca81bd8b8ea3e22a78fbc03d28f0fd970 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 12 Mar 2018 17:49:08 +0100 Subject: [PATCH] 8199428: install-file macro fails on filenames with space on Solaris Reviewed-by: tbell, ihse --- make/common/MakeBase.gmk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index 3698ef8a8f0..1731f599771 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -518,12 +518,14 @@ ifeq ($(OPENJDK_TARGET_OS),solaris) define install-file $(call MakeTargetDir) $(RM) '$(call DecodeSpace, $@)' - if [ '$(call DecodeSpace, $(dir $@))' != \ + if [ '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))' != \ '$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \ - $(CP) -f -r -P '$(call DecodeSpace, $<)' '$(call DecodeSpace, $(@D))'; \ - if [ '$(call DecodeSpace, $(@F))' != \ + $(CP) -f -r -P '$(call DecodeSpace, $<)' \ + '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))'; \ + if [ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $@)))' != \ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))' ]; then \ - $(MV) '$(call DecodeSpace, $(@D)/$(