diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-01-26 12:57:50 -0500 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2023-02-01 13:18:47 +0000 |
commit | 6e1498fa2212cb5a47755d015a1ef58fc7cecb63 (patch) | |
tree | aaca0c2830d800d3b6eda2a1c79f109c67b29c0d /hadrian | |
parent | fc117e3d0d5c0d8ccd22ea36aeb7a0af774e49d4 (diff) | |
download | haskell-6e1498fa2212cb5a47755d015a1ef58fc7cecb63.tar.gz |
hadrian: Sphinx docs require templated cabal files
The package-version discovery logic in
`doc/users_guide/package_versions.py` uses packages' cabal files to
determine package versions. Teach Sphinx about these dependencies in
cases where the cabal files are generated by templates.
(cherry picked from commit f838815c365773a8107bf035a8ec27b8ff6ecc8b)
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Rules/Documentation.hs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs index df5fdfb94b..85408a1104 100644 --- a/hadrian/src/Rules/Documentation.hs +++ b/hadrian/src/Rules/Documentation.hs @@ -66,6 +66,20 @@ pathPath "users_guide" = "docs/users_guide" pathPath "Haddock" = "utils/haddock/doc" pathPath _ = "" +needDocDeps :: Action () +needDocDeps = do + -- These cabal files are needed by the docs/users_guide/ghc_packages.py + -- logic to determine the versions of packages shipped with GHC. + let templatedCabalFiles = map pkgCabalFile + [ ghcBoot + , ghcBootTh + , ghci + , libiserv + , compiler + ] + + need templatedCabalFiles + -- | Build all documentation documentationRules :: Rules () documentationRules = do @@ -86,8 +100,7 @@ documentationRules = do "docs" ~> do root <- buildRoot - -- we need to ensure that `configure` has been run (#17840) - need [configFile] + needDocDeps doctargets <- ghcDocs =<< flavour let html = htmlRoot -/- "index.html" -- also implies "docs-haddock" |