[Git][ghc/ghc][wip/backports-9.8] 4 commits: hadrian: Install LICENSE files in bindists
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Sep 27 13:37:33 UTC 2023
Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC
Commits:
b34ccb2e by Ben Gamari at 2023-09-27T09:27:06-04:00
hadrian: Install LICENSE files in bindists
Fixes #23548.
- - - - -
63b6ef7d by Ben Gamari at 2023-09-27T09:29:57-04:00
Bump containers submodule
To 0.7.
- - - - -
2582b034 by Ben Gamari at 2023-09-27T09:30:19-04:00
Bump haddock submodule
Applying fix from #21984.
- - - - -
5101d74f by Ben Gamari at 2023-09-27T09:36:39-04:00
users-guide: Refactor handling of :base-ref: et al.
(cherry picked from commit 8f82e99fda693326e55ae798e11f3896c875c966)
- - - - -
8 changed files:
- configure.ac
- docs/users_guide/ghc_config.py.in
- hadrian/bindist/Makefile
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/Generate.hs
- libraries/containers
- − m4/library_version.m4
- utils/haddock
Changes:
=====================================
configure.ac
=====================================
@@ -1159,20 +1159,6 @@ AC_SUBST(BUILD_MAN)
AC_SUBST(BUILD_SPHINX_HTML)
AC_SUBST(BUILD_SPHINX_PDF)
-dnl ** Determine library versions
-dnl The packages below should include all packages needed by
-dnl doc/users_guide/ghc_config.py.in.
-LIBRARY_VERSION(base)
-LIBRARY_VERSION(Cabal, Cabal/Cabal/Cabal.cabal)
-dnl template-haskell.cabal and ghc-prim.cabal are generated later
-dnl by Hadrian but the .in files already have the version
-LIBRARY_VERSION(template-haskell, template-haskell/template-haskell.cabal.in)
-LIBRARY_VERSION(array)
-LIBRARY_VERSION(ghc-prim, ghc-prim/ghc-prim.cabal.in)
-LIBRARY_VERSION(ghc-compact)
-LIBRARY_ghc_VERSION="$ProjectVersion"
-AC_SUBST(LIBRARY_ghc_VERSION)
-
if grep ' ' compiler/ghc.cabal.in 2>&1 >/dev/null; then
AC_MSG_ERROR([compiler/ghc.cabal.in contains tab characters; please remove them])
fi
=====================================
docs/users_guide/ghc_config.py.in
=====================================
@@ -18,14 +18,14 @@ libs_base_uri = '../libraries'
# N.B. If you add a package to this list be sure to also add a corresponding
# LIBRARY_VERSION macro call to configure.ac.
lib_versions = {
- 'base': '@LIBRARY_base_VERSION@',
- 'ghc-prim': '@LIBRARY_ghc_prim_VERSION@',
- 'template-haskell': '@LIBRARY_template_haskell_VERSION@',
- 'ghc-compact': '@LIBRARY_ghc_compact_VERSION@',
- 'ghc': '@LIBRARY_ghc_VERSION@',
- 'parallel': '@LIBRARY_parallel_VERSION@',
- 'Cabal': '@LIBRARY_Cabal_VERSION@',
- 'array': '@LIBRARY_array_VERSION@',
+ 'base': '@LIBRARY_base_UNIT_ID@',
+ 'ghc-prim': '@LIBRARY_ghc_prim_UNIT_ID@',
+ 'template-haskell': '@LIBRARY_template_haskell_UNIT_ID@',
+ 'ghc-compact': '@LIBRARY_ghc_compact_UNIT_ID@',
+ 'ghc': '@LIBRARY_ghc_UNIT_ID@',
+ 'parallel': '@LIBRARY_parallel_UNIT_ID@',
+ 'Cabal': '@LIBRARY_Cabal_UNIT_ID@',
+ 'array': '@LIBRARY_array_UNIT_ID@',
}
version = '@ProjectVersion@'
=====================================
hadrian/bindist/Makefile
=====================================
@@ -67,6 +67,7 @@ endif
install: install_bin install_lib
install: install_man install_docs update_package_db
+install: install_data
ActualBinsDir=${ghclibdir}/bin
ifeq "$(RelocatableBuild)" "YES"
@@ -199,6 +200,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
=====================================
@@ -239,6 +239,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.
=====================================
hadrian/src/Rules/Generate.hs
=====================================
@@ -313,6 +313,13 @@ packageVersions = foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaske
f pkg = interpolateVar var $ version <$> readPackageData pkg
where var = "LIBRARY_" <> pkgName pkg <> "_VERSION"
+packageUnitIds :: Interpolations
+packageUnitIds = foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaskell, ghcCompact, array ]
+ where
+ f :: Package -> Interpolations
+ f pkg = interpolateVar var $ pkgUnitId Stage1 pkg
+ where var = "LIBRARY_" <> pkgName pkg <> "_UNIT_ID"
+
templateRule :: FilePath -> Interpolations -> Rules ()
templateRule outPath interps = do
outPath %> \_ -> do
@@ -339,6 +346,7 @@ templateRules = do
templateRule "libraries/template-haskell/template-haskell.cabal" $ projectVersion
templateRule "libraries/prologue.txt" $ packageVersions
templateRule "docs/index.html" $ packageVersions
+ templateRule "doc/users_guide/ghc_config.py" $ packageUnitIds
-- Generators
=====================================
libraries/containers
=====================================
@@ -1 +1 @@
-Subproject commit f61b0c9104a3c436361f56a0974c5eeef40c1b89
+Subproject commit f5d0b13251291c3bd1ae396f3e6c8b0b9eaf58b0
=====================================
m4/library_version.m4 deleted
=====================================
@@ -1,10 +0,0 @@
-# LIBRARY_VERSION(lib, [cabal_file])
-# --------------------------------
-# Gets the version number of a library.
-# If $1 is ghc-prim, then we define LIBRARY_ghc_prim_VERSION as 1.2.3
-# $2 points to the directory under libraries/
-AC_DEFUN([LIBRARY_VERSION],[
-cabal_file=m4_default([$2],[$1/$1.cabal])
-LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/${cabal_file} | sed "s/.* //"`
-AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION)
-])
=====================================
utils/haddock
=====================================
@@ -1 +1 @@
-Subproject commit 86d5fce5e5f24b6d244c827f7d1f2b49253dbf38
+Subproject commit 5b1a520c2b9987de0d616271aa3d3c07e1567a6b
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bf9b8f091e8ad71b0f0a9b1b48ce19526e600aab...5101d74f10c6a7691904ca3d9ecf140b9fc3f8a5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bf9b8f091e8ad71b0f0a9b1b48ce19526e600aab...5101d74f10c6a7691904ca3d9ecf140b9fc3f8a5
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/20230927/e9b0e73f/attachment-0001.html>
More information about the ghc-commits
mailing list