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
cmd [Cwd output] [path] "x" (top -/- input)
Configure dir -> do
need [dir -/- "configure"]
-- Inject /bin/bash into `libtool`, instead of /bin/sh
let env = AddEnv "CONFIG_SHELL" "/bin/bash"
cmd Shell cmdEcho env [Cwd dir] [path] opts argList
......@@ -76,9 +75,7 @@ customBuild rs opts target@Target {..} = do
Stdout output <- cmd (Stdin input) [path] argList
writeFileChanged file output
Make dir -> do
need [dir -/- "Makefile"]
cmd Shell cmdEcho path ["-C", dir] argList
Make dir -> cmd Shell cmdEcho path ["-C", dir] argList
_ -> cmd [path] argList
......@@ -170,6 +167,7 @@ isInternal = isJust . builderProvenance
-- | Make sure a 'Builder' exists and rebuild it if out of date.
needBuilder :: Builder -> Action ()
needBuilder (Configure dir) = need [dir -/- "configure"]
needBuilder (Make dir) = need [dir -/- "Makefile"]
needBuilder builder = when (isInternal builder) $ do
path <- builderPath builder
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