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.
This commit is contained in:
parent
eaa80be917
commit
468fecc315
3 changed files with 119 additions and 109 deletions
15
Setup.hs
15
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"
|
||||
main = defaultMainWithHooks simpleUserHooks { preConf = configure }
|
||||
|
||||
configure _ _ = do
|
||||
Configure.run Configure.tests
|
||||
return (Nothing, [])
|
||||
|
||||
makeClean _ _ _ _ = do
|
||||
system "make clean"
|
||||
return ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue