[Git][ghc/ghc][master] packaging: Build manpage in separate directory to other documentation

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Aug 14 14:45:51 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
026f040a by Matthew Pickering at 2023-08-14T10:45:23-04:00
packaging: Build manpage in separate directory to other documentation

We were installing two copies of the manpage:

* One useless one in the `share/doc` folder, because we copy the doc/
  folder into share/
* The one we deliberately installed into `share/man` etc

The solution is to build the manpage into the `manpage` directory when
building the bindist, and then just install it separately.

Fixes #23707

- - - - -


3 changed files:

- hadrian/bindist/Makefile
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/Documentation.hs


Changes:

=====================================
hadrian/bindist/Makefile
=====================================
@@ -201,7 +201,7 @@ install_docs:
 	fi
 
 MAN_SECTION := 1
-MAN_PAGES := doc/users_guide/build-man/ghc.1
+MAN_PAGES := manpage/ghc.1
 
 .PHONY: install_man
 install_man:


=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -246,6 +246,10 @@ bindistRules = do
         -- reference. See #20802.
         copyDirectory ("utils" -/- "completion") bindistFilesDir
 
+        -- Copy the manpage into the binary distribution
+        whenM (liftIO (IO.doesDirectoryExist (root -/- "manpage"))) $ do
+          copyDirectory (root -/- "manpage") bindistFilesDir
+
         -- These scripts are only necessary in the configure/install
         -- workflow which is not supported on windows.
         -- TODO: Instead of guarding against windows, we could offer the


=====================================
hadrian/src/Rules/Documentation.hs
=====================================
@@ -43,7 +43,7 @@ archiveRoot :: FilePath
 archiveRoot = docRoot -/- "archives"
 
 manPageBuildPath :: FilePath
-manPageBuildPath = docRoot -/- "users_guide/build-man/ghc.1"
+manPageBuildPath = "manpage" -/- "ghc.1"
 
 -- TODO: Get rid of this hack.
 docContext :: Context



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/026f040ad0297cd1b735307656b8f5cf33d1e71e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/026f040ad0297cd1b735307656b8f5cf33d1e71e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230814/5e1c82dd/attachment-0001.html>


More information about the ghc-commits mailing list