Commit 375d41e7 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Another attempt to invoke libtool via bash, see #103.

parent 9e731d6d
......@@ -99,15 +99,15 @@ runConfigure dir opts args = do
runMake :: FilePath -> [String] -> Action ()
runMake dir args = do
need [dir -/- "Makefile"]
let note = if null args then "" else " (" ++ intercalate "," args ++ ")"
let note = if null args then "" else " (" ++ intercalate ", " args ++ ")"
putBuild $ "| Run make" ++ note ++ " in " ++ dir ++ "..."
quietly $ cmd Shell (EchoStdout False) "make" ["-C", dir, "MAKEFLAGS="] args
quietly $ cmd Shell (EchoStdout False) "make" ["-C", dir] args
runBuilder :: Builder -> [String] -> Action ()
runBuilder builder args = do
needBuilder laxDependencies builder
path <- builderPath builder
let note = if null args then "" else " (" ++ intercalate "," args ++ ")"
let note = if null args then "" else " (" ++ intercalate ", " args ++ ")"
putBuild $ "| Run " ++ show builder ++ note
quietly $ cmd [path] args
......
......@@ -114,7 +114,7 @@ integerGmpRules = do
copyFile integerGmpLibraryFakeH integerGmpLibraryH
else do
putBuild "| No GMP framework detected; in tree GMP will be built"
runMake integerGmpBuild ["LIBTOOL=\"bash libtool\""]
runMake integerGmpBuild ["MAKEFLAGS='LIBTOOL=bash\\ libtool'"]
copyFile integerGmpLibraryInTreeH integerGmpLibraryH
-- TODO: why copy library, can we move it instead?
......
......@@ -91,13 +91,13 @@ libffiRules = do
args <- configureArguments
runConfigure libffiBuild envs args
runMake libffiBuild []
runMake libffiBuild ["install"]
runMake libffiBuild ["MAKEFLAGS="]
runMake libffiBuild ["MAKEFLAGS=", "install"]
forM_ ["ffi.h", "ffitarget.h"] $ \file -> do
let src = libffiBuild -/- "inst/lib" -/- libname -/- "include" -/- file
copyFile src (rtsBuildPath -/- file)
libffiName <- rtsLibffiLibraryName
copyFile libffiLibrary (rtsBuildPath -/- "lib" ++ libffiName <.> "a")
......
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