[Git][ghc/ghc][master] Make Hadrian solely responsible for substituting `docs/users_guide/ghc_config.py.in`
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Oct 18 23:41:41 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
f9436990 by John Ericson at 2023-10-18T19:41:01-04:00
Make Hadrian solely responsible for substituting `docs/users_guide/ghc_config.py.in`
Fixes #24091
Progress on #23966
Issue #24091 reports that `@ProjectVersion@` is no longer being
substituted in the GHC user's guide. I assume this is a recent issue,
but I am not sure how it's worked since
c1a3ecde720b3bddc2c8616daaa06ee324e602ab; it looks like both Hadrian and
configure are trying to substitute the same `.in` file!
Now only Hadrian does. That is better anyways; already something that
issue #23966 requested.
It seems like we were missing some dependencies in Hadrian. (I really,
really hate that this is possible!) Hopefully it is fixed now.
- - - - -
5 changed files:
- configure.ac
- hadrian/cfg/system.config.in
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Rules/Documentation.hs
- hadrian/src/Rules/Generate.hs
Changes:
=====================================
configure.ac
=====================================
@@ -1069,7 +1069,6 @@ AC_CONFIG_FILES(
hadrian/ghci-cabal
hadrian/ghci-multi-cabal
hadrian/ghci-stack
- docs/users_guide/ghc_config.py
distrib/configure.ac
hadrian/cfg/default.host.target
hadrian/cfg/default.target
=====================================
hadrian/cfg/system.config.in
=====================================
@@ -34,6 +34,9 @@ python = @PythonCmd@
cc-llvm-backend = @CcLlvmBackend@
+llvm-min-version = @LlvmMinVersion@
+llvm-max-version = @LlvmMaxVersion@
+
# Build options:
#===============
=====================================
hadrian/src/Oracles/Setting.hs
=====================================
@@ -49,6 +49,8 @@ data Setting = CursesIncludeDir
| GhcPatchLevel
| GhcVersion
| GhcSourcePath
+ | LlvmMinVersion
+ | LlvmMaxVersion
| GmpIncludeDir
| GmpLibDir
| IconvIncludeDir
@@ -103,6 +105,8 @@ setting key = lookupSystemConfig $ case key of
GhcPatchLevel -> "ghc-patch-level"
GhcVersion -> "ghc-version"
GhcSourcePath -> "ghc-source-path"
+ LlvmMinVersion -> "llvm-min-version"
+ LlvmMaxVersion -> "llvm-max-version"
GmpIncludeDir -> "gmp-include-dir"
GmpLibDir -> "gmp-lib-dir"
IconvIncludeDir -> "iconv-include-dir"
=====================================
hadrian/src/Rules/Documentation.hs
=====================================
@@ -356,6 +356,9 @@ buildSphinxInfoGuide = do
root <- buildRootRules
let path = "GHCUsersGuide"
root -/- infoRoot -/- path <.> "info" %> \ file -> do
+
+ needDocDeps
+
withTempDir $ \dir -> do
let rstFilesDir = pathPath path
rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"]
@@ -391,6 +394,8 @@ buildManPage = do
root <- buildRootRules
root -/- manPageBuildPath %> \file -> do
need ["docs/users_guide/ghc.rst"]
+ needDocDeps
+
withTempDir $ \dir -> do
build $ target docContext (Sphinx ManMode) ["docs/users_guide"] [dir]
checkSphinxWarnings dir
=====================================
hadrian/src/Rules/Generate.hs
=====================================
@@ -324,7 +324,12 @@ templateRules = do
templateRule "libraries/template-haskell/template-haskell.cabal" $ projectVersion
templateRule "libraries/prologue.txt" $ packageVersions
templateRule "docs/index.html" $ packageVersions
- templateRule "docs/users_guide/ghc_config.py" $ packageUnitIds Stage1
+ templateRule "docs/users_guide/ghc_config.py" $ mconcat
+ [ projectVersion
+ , packageUnitIds Stage1
+ , interpolateSetting "LlvmMinVersion" LlvmMinVersion
+ , interpolateSetting "LlvmMaxVersion" LlvmMaxVersion
+ ]
-- Generators
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9436990ac1304c8c13b4f1f3ec3e2c3206104e3
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9436990ac1304c8c13b4f1f3ec3e2c3206104e3
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/20231018/733e9620/attachment-0001.html>
More information about the ghc-commits
mailing list