[Haskell-cafe] Cabal, sdist and flags
Sean Leather
leather at cs.uu.nl
Thu Oct 8 04:59:58 EDT 2009
>
> To make this work I had to move the 'main-is' outside of the if-else:
>
> executable tests
> main-is: Test.hs
> hs-source-dirs: test-src src
> if flag(BuildTests)
> build-depends: test-framework, test-framework-hunit, HUnit,
> test-framework-quickcheck2, QuickCheck >= 2.1.0.0
> else
> buildable: False
>
> I found this surprising, so I'm tempted to call it a bug. A quick
> search didn't tell me whether this is well-known already, hence the
> email. Would you consider it a bug? Has it been raised already?
>
I do something similar with EMGM, but I never tried to put the main-is
inside the if. I just did this for the test executable.
if flag(test)
build-depends: QuickCheck >= 2.1 && < 2.2,
HUnit >= 1.2 && < 1.3
else
buildable: False
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091008/0ab1df69/attachment.html
More information about the Haskell-Cafe
mailing list