Add haddock build targets.
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Wed, 19 Aug 2015 01:37:30 +0000 (02:37 +0100)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Wed, 19 Aug 2015 01:37:30 +0000 (02:37 +0100)
src/Rules.hs

index 43f5922..65ae2e4 100644 (file)
@@ -14,6 +14,7 @@ import Rules.Package
 import Rules.Oracles
 import Rules.Resources
 import Settings.Ways
+import Settings.User
 import Settings.Util
 import Settings.Packages
 import Settings.TargetDirectory
@@ -28,15 +29,17 @@ generateTargets = action $ do
                 buildPath = targetPath stage pkg -/- "build"
             buildGhciLib <- interpret target $ getPkgData BuildGhciLib
             pkgKey       <- interpret target $ getPkgData PackageKey
+            buildHaddock <- interpret target $ Settings.User.buildHaddock
             let ghciLib = [ buildPath -/- "HS" ++ pkgKey <.> "o"
                           | buildGhciLib == "YES" && stage /= Stage0 ]
+                haddock = [ pkgHaddockPath pkg | buildHaddock ]
 
             ways <- interpret target getWays
             libs <- forM ways $ \way -> do
                 extension <- libsuf way
                 return $ buildPath -/- "libHS" ++ pkgKey <.> extension
 
-            return $ ghciLib ++ libs
+            return $ ghciLib ++ libs ++ haddock
 
     need $ reverse targets