Skip to content
Snippets Groups Projects
Commit f9436990 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

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
c1a3ecde; 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.
parent 72c7380c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -34,6 +34,9 @@ python = @PythonCmd@
cc-llvm-backend = @CcLlvmBackend@
llvm-min-version = @LlvmMinVersion@
llvm-max-version = @LlvmMaxVersion@
# Build options:
#===============
......
......@@ -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"
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment