Skip to content
Snippets Groups Projects
Commit f838815c authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

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.
parent 03d693b2
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
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