[Git][ghc/ghc][master] Hadrian: fix binary-dir with --docs=none

Marge Bot gitlab at gitlab.haskell.org
Thu Apr 11 23:57:35 UTC 2019



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


Commits:
c401f8a4 by Sylvain Henry at 2019-04-11T23:51:24Z
Hadrian: fix binary-dir with --docs=none

Hadrian's "binary-dist" target must check that the "docs" directory
exists (it may not since we can disable docs generation).

- - - - -


1 changed file:

- hadrian/src/Rules/BinaryDist.hs


Changes:

=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -121,7 +121,13 @@ bindistRules = do
         copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir
         copyDirectory (rtsIncludeDir)         bindistFilesDir
         need ["docs"]
-        copyDirectory (root -/- "docs") bindistFilesDir
+        -- TODO: we should only embed the docs that have been generated
+        -- depending on the current settings (flavours' "ghcDocs" field and
+        -- "--docs=.." command-line flag)
+        -- Currently we embed the "docs" directory if it exists but it may
+        -- contain outdated or even invalid data.
+        whenM (doesDirectoryExist (root -/- "docs")) $ do
+          copyDirectory (root -/- "docs") bindistFilesDir
         when windows $ do
           copyDirectory (root -/- "mingw") bindistFilesDir
           -- we use that opportunity to delete the .stamp file that we use



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/c401f8a487ce6762476b113ad9f0d32960a3e152

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/c401f8a487ce6762476b113ad9f0d32960a3e152
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/20190411/85d414a8/attachment-0001.html>


More information about the ghc-commits mailing list