Allow to compile from git repo

This commit is contained in:
2021-04-28 18:45:48 +02:00
parent 7e0f839ff8
commit 9f0ac0ee19
6 changed files with 170 additions and 97 deletions

View File

@@ -770,6 +770,15 @@ make args workdir = do
let mymake = if has_gmake then "gmake" else "make"
execLogged mymake True args [rel|ghc-make|] workdir Nothing
makeOut :: [ByteString]
-> Maybe (Path Abs)
-> IO CapturedProcess
makeOut args workdir = do
spaths <- catMaybes . fmap parseAbs <$> liftIO getSearchPath
has_gmake <- isJust <$> liftIO (searchPath spaths [rel|gmake|])
let mymake = if has_gmake then [rel|gmake|] else [rel|make|]
liftIO $ executeOut mymake args workdir
-- | Try to apply patches in order. Fails with 'PatchFailed'
-- on first failure.