summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-10 14:00:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-10 14:00:26 -0400
commit468fecc31561064be2fe05928f9c866395c60aa8 (patch)
tree45434cd625083eadc8de09f2b49a910e54dbdb85 /Setup.hs
parenteaa80be91758e534aec022638829879d82895b76 (diff)
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.
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs15
1 files changed, 5 insertions, 10 deletions
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, [])