[Git][ghc/ghc][master] hadrian: Don't duplicate binaries on installation

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Aug 23 02:07:12 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
80102356 by Ben Gamari at 2022-08-22T22:06:57-04:00
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.

- - - - -


1 changed file:

- hadrian/bindist/Makefile


Changes:

=====================================
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 \



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/80102356468d87b683d5360a291c44b057a52ade

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/80102356468d87b683d5360a291c44b057a52ade
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220822/87865ab0/attachment.html>


More information about the ghc-commits mailing list