diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-06-23 18:11:00 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-07-17 22:30:32 -0400 |
commit | a10584e8df9b346cecf700b23187044742ce0b35 (patch) | |
tree | be1a327b84ee87a7f29c87a92fcc8eec8f2d20cd /hadrian | |
parent | 028f081e4e748794d7a0e6359987ec799c3dc404 (diff) | |
download | haskell-a10584e8df9b346cecf700b23187044742ce0b35.tar.gz |
hadrian: Rename documentation directories for consistency with make
* Rename `docs` to `doc`
* Place pdf documentation in `doc/` instead of `doc/pdfs/`
Fixes #21164.
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/bindist/Makefile | 4 | ||||
-rw-r--r-- | hadrian/src/Context.hs | 2 | ||||
-rw-r--r-- | hadrian/src/Rules/BinaryDist.hs | 4 | ||||
-rw-r--r-- | hadrian/src/Rules/Documentation.hs | 4 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/Cabal.hs | 8 |
5 files changed, 11 insertions, 11 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile index c079755f1f..1cea0b0109 100644 --- a/hadrian/bindist/Makefile +++ b/hadrian/bindist/Makefile @@ -71,7 +71,7 @@ define patchpackageconf # to the doc files. cat '$2' | sed 's|haddock-interfaces.*|haddock-interfaces: "$${pkgroot}/$4/html/libraries/$5/$1.haddock"|' \ | sed 's|haddock-html.*|haddock-html: "$${pkgroot}/$4/html/libraries/$5"|' \ - | sed 's| $${pkgroot}/../../docs/html/.*||' \ + | sed 's| $${pkgroot}/../../doc/html/.*||' \ > '$2.copy' # The rts package doesn't actually supply haddocks, so we stop advertising them # altogether. @@ -188,7 +188,7 @@ install_lib: lib/settings cp -R $$i "$(DESTDIR)$(ActualLibsDir)/"; \ done -DOCS = $(wildcard ./docs/*) +DOCS = $(wildcard ./doc/*) install_docs: @echo "Copying docs to $(DESTDIR)$(docdir)" $(INSTALL_DIR) "$(DESTDIR)$(docdir)" diff --git a/hadrian/src/Context.hs b/hadrian/src/Context.hs index 81bff8a11f..eb9d7caf81 100644 --- a/hadrian/src/Context.hs +++ b/hadrian/src/Context.hs @@ -89,7 +89,7 @@ pkgHaddockFile :: Context -> Action FilePath pkgHaddockFile Context {..} = do root <- buildRoot version <- pkgIdentifier package - return $ root -/- "docs/html/libraries" -/- version -/- pkgName package <.> "haddock" + return $ root -/- "doc/html/libraries" -/- version -/- pkgName package <.> "haddock" -- | Path to the registered ghc-pkg library file of a given 'Context', e.g.: -- @_build/stage1/lib/x86_64-linux-ghc-8.9.0/libHSarray-0.5.1.0-ghc8.9.0.so@ diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index 3902643079..24d9217cce 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -226,8 +226,8 @@ bindistRules = do -- version should not be used for directories the build system can -- create. Using the Action version caused documentation to not be -- included in the bindist in the past (part of the problem in #18669). - whenM (liftIO (IO.doesDirectoryExist (root -/- "docs"))) $ do - copyDirectory (root -/- "docs") bindistFilesDir + whenM (liftIO (IO.doesDirectoryExist (root -/- "doc"))) $ do + copyDirectory (root -/- "doc") bindistFilesDir copyFile ("libraries" -/- "prologue.txt") (bindistFilesDir -/- "docs-utils" -/- "prologue.txt") copyFile ("libraries" -/- "gen_contents_index") (bindistFilesDir -/- "docs-utils" -/- "gen_contents_index" ) diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs index 0e72c064c3..aff2f38c63 100644 --- a/hadrian/src/Rules/Documentation.hs +++ b/hadrian/src/Rules/Documentation.hs @@ -26,13 +26,13 @@ import qualified Data.Set as Set import qualified Text.Parsec as Parsec docRoot :: FilePath -docRoot = "docs" +docRoot = "doc" htmlRoot :: FilePath htmlRoot = docRoot -/- "html" pdfRoot :: FilePath -pdfRoot = docRoot -/- "pdfs" +pdfRoot = docRoot infoRoot :: FilePath infoRoot = docRoot -/- "info" diff --git a/hadrian/src/Settings/Builders/Cabal.hs b/hadrian/src/Settings/Builders/Cabal.hs index dfd322b28d..c85104eeae 100644 --- a/hadrian/src/Settings/Builders/Cabal.hs +++ b/hadrian/src/Settings/Builders/Cabal.hs @@ -102,15 +102,15 @@ commonCabalArgs stage = do , arg "--prefix" , arg prefix - -- NB: this is valid only because Hadrian puts the @docs@ and + -- NB: this is valid only because Hadrian puts the @doc@ and -- @libraries@ folders in the same relative position: -- -- * libraries in @_build/stageN/libraries@ - -- * docs in @_build/docs/html/libraries@ + -- * docs in @_build/doc/html/libraries@ -- - -- This doesn't hold if we move the @docs@ folder anywhere else. + -- This doesn't hold if we move the @doc@ folder anywhere else. , arg "--htmldir" - , arg $ "${pkgroot}/../../docs/html/libraries/" ++ package_id + , arg $ "${pkgroot}/../../doc/html/libraries/" ++ package_id , withStaged $ Ghc CompileHs , withBuilderArgs (Ghc CompileHs stage) |