diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2019-04-09 16:16:47 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-11 19:51:24 -0400 |
commit | c401f8a487ce6762476b113ad9f0d32960a3e152 (patch) | |
tree | 45337484b5fc075f3cbb84a06660023f4094a415 /hadrian | |
parent | 42504f4a575395a35eec5c3fd7c9ef6e2b54e68e (diff) | |
download | haskell-c401f8a487ce6762476b113ad9f0d32960a3e152.tar.gz |
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).
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Rules/BinaryDist.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index b1b91bd5e0..f0cb547437 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/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 |