summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-26 12:51:50 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-31 15:52:32 -0500
commit03d693b20a40bb7e86955889b25ae80b531cffae (patch)
tree27039c1d78e88d88aa41ccc5ef9e0f51b0381a29
parent2cb500a5ee1a31dfe1a2cdd71f175442026eb082 (diff)
downloadhaskell-03d693b20a40bb7e86955889b25ae80b531cffae.tar.gz
Revert "Hadrian: fix doc generation"
This is too large of a hammer. This reverts commit 5640cb1d84d3cce4ce0a9e90d29b2b20d2b38c2f.
-rw-r--r--hadrian/src/Rules/Documentation.hs14
-rw-r--r--hadrian/src/Rules/Generate.hs7
2 files changed, 3 insertions, 18 deletions
diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs
index 89c09fb701..10a2c2ce57 100644
--- a/hadrian/src/Rules/Documentation.hs
+++ b/hadrian/src/Rules/Documentation.hs
@@ -12,7 +12,7 @@ import Hadrian.BuildPath
import Hadrian.Haskell.Cabal
import Hadrian.Haskell.Cabal.Type
-import Rules.Generate (ghcPrimDependencies, generateTemplateResults)
+import Rules.Generate (ghcPrimDependencies)
import Base
import Context
import Expression (getContextData, interpretInContext, (?), package)
@@ -68,12 +68,6 @@ pathPath "users_guide" = "docs/users_guide"
pathPath "Haddock" = "utils/haddock/doc"
pathPath _ = ""
--- Generate files required to build the docs (e.g. ghc.cabal)
-needDocDeps :: Action ()
-needDocDeps = do
- -- build .cabal files used by the doc engine to list package versions
- generateTemplateResults
-
-- | Build all documentation
documentationRules :: Rules ()
documentationRules = do
@@ -194,9 +188,6 @@ buildSphinxHtml :: FilePath -> Rules ()
buildSphinxHtml path = do
root <- buildRootRules
root -/- htmlRoot -/- path -/- "index.html" %> \file -> do
-
- needDocDeps
-
let dest = takeDirectory file
rstFilesDir = pathPath path
rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"]
@@ -310,9 +301,6 @@ buildSphinxPdf :: FilePath -> Rules ()
buildSphinxPdf path = do
root <- buildRootRules
root -/- pdfRoot -/- path <.> "pdf" %> \file -> do
-
- needDocDeps
-
withTempDir $ \dir -> do
let rstFilesDir = pathPath path
rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"]
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
index 43f722e697..b156c9dfdf 100644
--- a/hadrian/src/Rules/Generate.hs
+++ b/hadrian/src/Rules/Generate.hs
@@ -2,7 +2,7 @@ module Rules.Generate (
isGeneratedCmmFile, compilerDependencies, generatePackageCode,
generateRules, copyRules, generatedDependencies,
ghcPrimDependencies,
- templateRules, generateTemplateResults
+ templateRules
) where
import qualified Data.Set as Set
@@ -243,6 +243,7 @@ templateResults =
, "driver/ghci/ghci-wrapper.cabal"
, "ghc/ghc-bin.cabal"
, "utils/iserv/iserv.cabal"
+ , "utils/iserv-proxy/iserv-proxy.cabal"
, "utils/remote-iserv/remote-iserv.cabal"
, "utils/runghc/runghc.cabal"
, "libraries/ghc-boot/ghc-boot.cabal"
@@ -255,10 +256,6 @@ templateResults =
, "libraries/prologue.txt"
]
--- | Generate all the files we know we have a template for
-generateTemplateResults :: Action ()
-generateTemplateResults = need templateResults
-
templateRules :: Rules ()
templateRules = do
templateResults |%> \out -> do