[Git][ghc/ghc][wip/backports-9.4] hadrian: Don't duplicate binaries on installation

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Sat Aug 20 16:08:05 UTC 2022



Ben Gamari pushed to branch wip/backports-9.4 at Glasgow Haskell Compiler / GHC


Commits:
c126db99 by Ben Gamari at 2022-08-20T12:07:46-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
=====================================
@@ -140,7 +140,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 "${XATTR}" -c -r "$(DESTDIR)$(ActualBinsDir)"; fi



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c126db9925d1fc4a6a9a57ad8d0edfdf9dfd0d38
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/20220820/0c9100a4/attachment.html>


More information about the ghc-commits mailing list