
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.
21 lines
483 B
Haskell
21 lines
483 B
Haskell
{- configure program -}
|
|
|
|
import Data.Maybe
|
|
|
|
import qualified Build.Configure as Configure
|
|
import Build.TestConfig
|
|
import Utility.StatFS
|
|
|
|
tests :: [TestCase]
|
|
tests = [ TestCase "StatFS" testStatFS
|
|
] ++ Configure.tests
|
|
|
|
{- This test cannot be included in Build.Configure due to needing
|
|
- Utility/StatFS.hs to be built. -}
|
|
testStatFS :: Test
|
|
testStatFS = do
|
|
s <- getFileSystemStats "."
|
|
return $ Config "statfs_sane" $ BoolConfig $ isJust s
|
|
|
|
main :: IO ()
|
|
main = Configure.run tests
|