diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-08-20 10:05:57 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-08-22 22:06:57 -0400 |
commit | 80102356468d87b683d5360a291c44b057a52ade (patch) | |
tree | 6dddde8c81b78374e0a9197121c8cc6bac840b51 /hadrian/bindist | |
parent | c96552517acc55ba307add250d499d97dc203677 (diff) | |
download | haskell-80102356468d87b683d5360a291c44b057a52ade.tar.gz |
hadrian: Don't duplicate binaries on installation
Previously we used `install` on symbolic links, which ended up
copying the target file rather than installing a symbolic link.
Fixes #22062.
Diffstat (limited to 'hadrian/bindist')
-rw-r--r-- | hadrian/bindist/Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile index 33ec5ace3f..215c2665d9 100644 --- a/hadrian/bindist/Makefile +++ b/hadrian/bindist/Makefile @@ -139,7 +139,11 @@ install_bin_libdir: @echo "Copying binaries to $(DESTDIR)$(ActualBinsDir)" $(INSTALL_DIR) "$(DESTDIR)$(ActualBinsDir)" for i in $(BINARIES); do \ - $(INSTALL_PROGRAM) $$i "$(DESTDIR)$(ActualBinsDir)"; \ + if test -L "$$i"; then \ + cp -RP "$$i" "$(DESTDIR)$(ActualBinsDir)"; \ + else \ + $(INSTALL_PROGRAM) "$$i" "$(DESTDIR)$(ActualBinsDir)"; \ + fi; \ done # Work around #17418 on Darwin if [ -e "${XATTR}" ]; then \ |