[Git][ghc/ghc][master] hadrian: Install LICENSE files in bindists

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Sep 28 07:27:44 UTC 2023



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


Commits:
9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00
hadrian: Install LICENSE files in bindists

Fixes #23548.

- - - - -


2 changed files:

- hadrian/bindist/Makefile
- hadrian/src/Rules/BinaryDist.hs


Changes:

=====================================
hadrian/bindist/Makefile
=====================================
@@ -78,6 +78,7 @@ endif
 
 install: install_bin install_lib install_extra
 install: install_man install_docs update_package_db
+install: install_data
 
 ifeq "$(RelocatableBuild)" "YES"
 ActualLibsDir=${ghclibdir}
@@ -209,6 +210,15 @@ install_docs:
 		$(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(DESTDIR)$(docdir)/html/libraries/"; \
 	fi
 
+.PHONY: install_data
+install_data:
+	@echo "Copying data to $(DESTDIR)share"
+	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
+	cd share; $(FIND) . -type f -exec sh -c \
+		'$(INSTALL_DIR) "$(DESTDIR)$(datadir)/`dirname $$1`" && \
+		$(INSTALL_DATA) "$$1" "$(DESTDIR)$(datadir)/`dirname $$1`"' \
+		sh '{}' ';';
+
 MAN_SECTION := 1
 MAN_PAGES := manpage/ghc.1
 


=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -253,6 +253,12 @@ bindistRules = do
           -- shipping it
           removeFile (bindistFilesDir -/- mingwStamp)
 
+        -- Include LICENSE files and related data.
+        -- On Windows LICENSE files are in _build/lib/doc, which is
+        -- already included above.
+        unless windowsHost $ do
+          copyDirectory (ghcBuildDir -/- "share") bindistFilesDir
+
         -- Include bash-completion script in binary distributions. We don't
         -- currently install this but merely include it for the user's
         -- reference. See #20802.



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9cdd629b21bb55bf11ca2089f096f682d0dc1840
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/20230928/d8756794/attachment-0001.html>


More information about the ghc-commits mailing list