summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-20 10:05:57 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-20 10:12:45 -0400
commitabe7bbdf78a9b29654e4ca3fa6a3e5717c316f63 (patch)
treeb061c126fde62da620efd00f0b666dfe0cb5370d
parentab3e0f5a02f6a1b63407e08bb97a228a76c27abd (diff)
downloadhaskell-wip/T22062.tar.gz
hadrian: Don't duplicate binaries on installationwip/T22062
Previously we used `install` on symbolic links, which ended up copying the target file rather than installing a symbolic link. Fixes #22062.
-rw-r--r--hadrian/bindist/Makefile6
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 \