Tweak wanting

This commit is contained in:
Chris Done 2015-01-18 20:48:21 +01:00
parent bb5952dbf9
commit 5e089315d9

View File

@ -93,6 +93,7 @@ shakePlan haddockFiles registerLock pb shakeDir = do
build <- target (targetForBuild pb) build <- target (targetForBuild pb)
(do need haddockTargets (do need haddockTargets
copyToBuild pb shakeDir) copyToBuild pb shakeDir)
want haddockTargets
want [build] want [build]
where versionMappings = M.toList (M.map ppVersion (bpPackages (pbPlan pb))) where versionMappings = M.toList (M.map ppVersion (bpPackages (pbPlan pb)))
corePackages = M.keys $ siCorePackages $ bpSystemInfo $ pbPlan pb corePackages = M.keys $ siCorePackages $ bpSystemInfo $ pbPlan pb
@ -102,15 +103,19 @@ shakePlan haddockFiles registerLock pb shakeDir = do
-- | Copy the build as a whole to builds/. -- | Copy the build as a whole to builds/.
copyToBuild :: PerformBuild -> String -> Action () copyToBuild :: PerformBuild -> String -> Action ()
copyToBuild pb shakeDir = do copyToBuild pb shakeDir = do
liftIO (putStrLn ("Copying snapshot to " ++ FP.encodeString (pbInstallDest pb)))
copy pbBinDir copy pbBinDir
copy pbLibDir copy pbLibDir
copy pbDataDir copy pbDataDir
copy pbDocDir copy pbDocDir
makeFile (targetForBuild pb) makeFile (targetForBuild pb)
where copy mkPath = liftIO $ where copy mkPath = liftIO $
do putStrLn ("Copying " ++ mkPath shakeDir)
copyDir copyDir
(FP.decodeString $ mkPath shakeDir) here
(FP.decodeString $ mkPath $ FP.encodeString $ pbInstallDest pb) there
where here = (FP.decodeString $ mkPath shakeDir)
there = (FP.decodeString $ mkPath $ FP.encodeString $ pbInstallDest pb)
-- | Generate haddock docs for the package. -- | Generate haddock docs for the package.
packageDocs :: TVar (Map String FilePath) packageDocs :: TVar (Map String FilePath)