[commit: ghc] wip/nfs-locking: Documentation: Move HsColour invocation to after `need` (8e8cc53)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:13:02 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/8e8cc532db9c18fb9b3867b3ceb0e730a93493ff/ghc

>---------------------------------------------------------------

commit 8e8cc532db9c18fb9b3867b3ceb0e730a93493ff
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Dec 20 16:43:12 2015 +0100

    Documentation: Move HsColour invocation to after `need`
    
    HsColour also depends upon the sources existing. Fixes #6.


>---------------------------------------------------------------

8e8cc532db9c18fb9b3867b3ceb0e730a93493ff
 src/Rules/Documentation.hs | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Rules/Documentation.hs b/src/Rules/Documentation.hs
index 2ebaa59..495a16c 100644
--- a/src/Rules/Documentation.hs
+++ b/src/Rules/Documentation.hs
@@ -15,14 +15,18 @@ buildPackageDocumentation _ target @ (PartialTarget stage package) =
         haddockFile = pkgHaddockFile package
     in when (stage == Stage1) $ do
         haddockFile %> \file -> do
-            whenM (specified HsColour) $ do
-                need [cabalFile]
-                build $ fullTarget target GhcCabalHsColour [cabalFile] []
             srcs <- interpretPartial target getPackageSources
             deps <- interpretPartial target $ getPkgDataList DepNames
             let haddocks = [ pkgHaddockFile depPkg
                            | Just depPkg <- map findKnownPackage deps ]
             need $ srcs ++ haddocks
+
+            -- HsColour sources
+            whenM (specified HsColour) $ do
+                need [cabalFile]
+                build $ fullTarget target GhcCabalHsColour [cabalFile] []
+
+            -- Build Haddock documentation
             let haddockWay = if dynamicGhcPrograms then dynamic else vanilla
             build $ fullTargetWithWay target Haddock haddockWay srcs [file]
 



More information about the ghc-commits mailing list