diff options
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -88,6 +88,14 @@ doBuild (BuildOptions mtarget) = do old <- targetCheckOld rootdir tg when old $ targetBuild rootdir tg +doRebuild :: BuildOptions -> IO () +doRebuild (BuildOptions mtarget) = do + (rootdir, targets, targetsForName) <- readCachedTargets (const True) + toBuild <- maybe (return targets) (targetsToBuild targetsForName) mtarget + forM_ toBuild $ useAnyTarget $ \tg -> do + targetRemoveBuildArtifacts rootdir tg + targetBuild rootdir tg + doRun :: RunOptions -> IO () doRun (RunOptions mtarget args) = do (rootdir, targets, targetsForName) <- readCachedTargets (isJust . useAnyTarget targetExecute) @@ -110,4 +118,5 @@ main = do Configure -> doConfigure Clean -> doClean Build opts -> doBuild opts + Rebuild opts -> doRebuild opts Run opts -> doRun opts |