diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-01-26 12:57:50 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-31 15:52:32 -0500 |
commit | f838815c365773a8107bf035a8ec27b8ff6ecc8b (patch) | |
tree | ba2fdc49de5ff64e4f5d859706b438a30fc6e5dd /hadrian | |
parent | 03d693b20a40bb7e86955889b25ae80b531cffae (diff) | |
download | haskell-f838815c365773a8107bf035a8ec27b8ff6ecc8b.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.
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 10a2c2ce57..3c31823889 100644 --- a/hadrian/src/Rules/Documentation.hs +++ b/hadrian/src/Rules/Documentation.hs @@ -68,6 +68,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 @@ -88,8 +102,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" |