From 468fecc31561064be2fe05928f9c866395c60aa8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 10 Mar 2012 14:00:26 -0400 Subject: Setup.hs: import configure Rather than running make, which runs configure, let Setup.hs just include the configure code. The standalone configure is retained for use by the Makefile. This may work better with cabal-dev, since it avoids the Makefile running ghc, and lets cabal handle all the compiler running, with whatever flags it uses to expose dependencies. --- Setup.hs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'Setup.hs') diff --git a/Setup.hs b/Setup.hs index 547d6a156..14e6a4ea7 100644 --- a/Setup.hs +++ b/Setup.hs @@ -3,15 +3,10 @@ import Distribution.Simple import System.Cmd -main = defaultMainWithHooks simpleUserHooks { - preConf = makeSources, - postClean = makeClean -} +import qualified Build.Configure as Configure -makeSources _ _ = do - system "make sources" - return (Nothing, []) +main = defaultMainWithHooks simpleUserHooks { preConf = configure } -makeClean _ _ _ _ = do - system "make clean" - return () +configure _ _ = do + Configure.run Configure.tests + return (Nothing, []) -- cgit v1.2.3