< prev index next >

make/common/MakeBase.gmk

Print this page

        

*** 498,521 **** # name of the target file differs from the source file, rename after copy. # If the source and target parent directories are the same, recursive copy doesn't work # so we fall back on regular copy, which isn't preserving symlinks. define install-file $(call MakeDir, $(@D)) ! $(RM) "$(call DecodeSpace, $@)" ! if [ "$(call DecodeSpace, $(dir $@))" != \ ! "$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))" ]; then \ ! $(CP) -f -r -P "$(call DecodeSpace, $<)" "$(call DecodeSpace, $(@D))"; \ ! if [ "$(call DecodeSpace, $(@F))" != \ ! "$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))" ]; then \ ! $(MV) "$(call DecodeSpace, $(@D)/$(<F))" "$(call DecodeSpace, $@)"; \ fi; \ else \ ! if [ -L "$(call DecodeSpace, $<)" ]; then \ $(ECHO) "Source file is a symlink and target is in the same directory: $< $@" ; \ exit 1; \ fi; \ ! $(CP) -f "$(call DecodeSpace, $<)" "$(call DecodeSpace, $@)"; \ fi endef else ifeq ($(OPENJDK_TARGET_OS),macosx) # On mac, extended attributes sometimes creep into the source files, which may later # cause the creation of ._* files which confuses testing. Clear these with xattr if --- 498,521 ---- # name of the target file differs from the source file, rename after copy. # If the source and target parent directories are the same, recursive copy doesn't work # so we fall back on regular copy, which isn't preserving symlinks. define install-file $(call MakeDir, $(@D)) ! $(RM) '$(call DecodeSpace, $@)' ! if [ '$(call DecodeSpace, $(dir $@))' != \ ! '$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \ ! $(CP) -f -r -P '$(call DecodeSpace, $<)' '$(call DecodeSpace, $(@D))'; \ ! if [ '$(call DecodeSpace, $(@F))' != \ ! '$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))' ]; then \ ! $(MV) '$(call DecodeSpace, $(@D)/$(<F))' '$(call DecodeSpace, $@)'; \ fi; \ else \ ! if [ -L '$(call DecodeSpace, $<)' ]; then \ $(ECHO) "Source file is a symlink and target is in the same directory: $< $@" ; \ exit 1; \ fi; \ ! $(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \ fi endef else ifeq ($(OPENJDK_TARGET_OS),macosx) # On mac, extended attributes sometimes creep into the source files, which may later # cause the creation of ._* files which confuses testing. Clear these with xattr if
*** 525,549 **** # # If copying a soft link to a directory, need to delete the target first to avoid # weird errors. define install-file $(call MakeDir, $(@D)) ! $(RM) "$(call DecodeSpace, $@)" ! $(CP) -fRP "$(call DecodeSpace, $<)" "$(call DecodeSpace, $@)" ! if [ -n "`$(XATTR) -l "$(call DecodeSpace, $@)"`" ]; then $(XATTR) -c "$(call DecodeSpace, $@)"; fi endef else define install-file $(call MakeDir, $(@D)) ! $(CP) -fP "$(call DecodeSpace, $<)" "$(call DecodeSpace, $@)" endef endif # Variant of install file that does not preserve symlinks define install-file-nolink $(call MakeDir, $(@D)) ! $(CP) -f "$(call DecodeSpace, $<)" "$(call DecodeSpace, $@)" endef ################################################################################ # Take two paths and return the path of the last common directory. # Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar --- 525,549 ---- # # If copying a soft link to a directory, need to delete the target first to avoid # weird errors. define install-file $(call MakeDir, $(@D)) ! $(RM) '$(call DecodeSpace, $@)' ! $(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)' ! if [ -n "`$(XATTR) -l '$(call DecodeSpace, $@)'`" ]; then $(XATTR) -c '$(call DecodeSpace, $@)'; fi endef else define install-file $(call MakeDir, $(@D)) ! $(CP) -fP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)' endef endif # Variant of install file that does not preserve symlinks define install-file-nolink $(call MakeDir, $(@D)) ! $(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)' endef ################################################################################ # Take two paths and return the path of the last common directory. # Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
*** 589,606 **** # There are two versions, either creating a relative or an absolute link. Be # careful when using this on Windows since the symlink created is only valid in # the unix emulation environment. define link-file-relative $(call MakeDir, $(@D)) ! $(RM) "$(call DecodeSpace, $@)" ! $(LN) -s "$(call DecodeSpace, $(call RelativePath, $<, $(@D)))" "$(call DecodeSpace, $@)" endef define link-file-absolute $(call MakeDir, $(@D)) ! $(RM) "$(call DecodeSpace, $@)" ! $(LN) -s "$(call DecodeSpace, $<)" "$(call DecodeSpace, $@)" endef ################################################################################ # Filter out duplicate sub strings while preserving order. Keeps the first occurance. uniq = \ --- 589,606 ---- # There are two versions, either creating a relative or an absolute link. Be # careful when using this on Windows since the symlink created is only valid in # the unix emulation environment. define link-file-relative $(call MakeDir, $(@D)) ! $(RM) '$(call DecodeSpace, $@)' ! $(LN) -s '$(call DecodeSpace, $(call RelativePath, $<, $(@D)))' '$(call DecodeSpace, $@)' endef define link-file-absolute $(call MakeDir, $(@D)) ! $(RM) '$(call DecodeSpace, $@)' ! $(LN) -s '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)' endef ################################################################################ # Filter out duplicate sub strings while preserving order. Keeps the first occurance. uniq = \
< prev index next >