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

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Sep 26 17:28:35 UTC 2023



Ben Gamari pushed to branch wip/T23548 at Glasgow Haskell Compiler / GHC


Commits:
ad004171 by Ben Gamari at 2023-09-26T13:28:25-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/ad004171c3be568b6e05be23fa136b8fcdfe8289

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ad004171c3be568b6e05be23fa136b8fcdfe8289
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/20230926/5e1dc29d/attachment-0001.html>


More information about the ghc-commits mailing list