Commit 7f62b5a7 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Handle Make correctly in needBuilder, refactor customBuild

See #295
parent e081b081
...@@ -61,7 +61,6 @@ customBuild rs opts target@Target {..} = do ...@@ -61,7 +61,6 @@ customBuild rs opts target@Target {..} = do
cmd [Cwd output] [path] "x" (top -/- input) cmd [Cwd output] [path] "x" (top -/- input)
Configure dir -> do Configure dir -> do
need [dir -/- "configure"]
-- Inject /bin/bash into `libtool`, instead of /bin/sh -- Inject /bin/bash into `libtool`, instead of /bin/sh
let env = AddEnv "CONFIG_SHELL" "/bin/bash" let env = AddEnv "CONFIG_SHELL" "/bin/bash"
cmd Shell cmdEcho env [Cwd dir] [path] opts argList cmd Shell cmdEcho env [Cwd dir] [path] opts argList
...@@ -76,9 +75,7 @@ customBuild rs opts target@Target {..} = do ...@@ -76,9 +75,7 @@ customBuild rs opts target@Target {..} = do
Stdout output <- cmd (Stdin input) [path] argList Stdout output <- cmd (Stdin input) [path] argList
writeFileChanged file output writeFileChanged file output
Make dir -> do Make dir -> cmd Shell cmdEcho path ["-C", dir] argList
need [dir -/- "Makefile"]
cmd Shell cmdEcho path ["-C", dir] argList
_ -> cmd [path] argList _ -> cmd [path] argList
...@@ -170,6 +167,7 @@ isInternal = isJust . builderProvenance ...@@ -170,6 +167,7 @@ isInternal = isJust . builderProvenance
-- | Make sure a 'Builder' exists and rebuild it if out of date. -- | Make sure a 'Builder' exists and rebuild it if out of date.
needBuilder :: Builder -> Action () needBuilder :: Builder -> Action ()
needBuilder (Configure dir) = need [dir -/- "configure"] needBuilder (Configure dir) = need [dir -/- "configure"]
needBuilder (Make dir) = need [dir -/- "Makefile"]
needBuilder builder = when (isInternal builder) $ do needBuilder builder = when (isInternal builder) $ do
path <- builderPath builder path <- builderPath builder
need [path] need [path]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment