cabal: Put build-depends for tests under conditional.

Otherwise even those who don't build with the tests flag need
to have dependencies like test-framework.

This restores the old behavior; I wrongly assumed that by now cabal
was smart enough not to bring in build-depends for components with
Buildable = False.
This commit is contained in:
John MacFarlane 2012-02-06 13:49:56 -08:00
parent 66ac842456
commit c0cb852265

View file

@ -391,30 +391,30 @@ Executable test-pandoc
FlexibleInstances
Hs-Source-Dirs: src
-- END DUPLICATED SECTION
if impl(ghc >= 7)
cpp-options: -D_LIT=lit
else
cpp-options: -D_LIT=$lit
if flag(tests)
Buildable: True
else
if !flag(tests)
Buildable: False
Other-Extensions: TemplateHaskell, QuasiQuotes
Build-Depends: Diff, test-framework >= 0.3 && < 0.6,
test-framework-hunit >= 0.2 && < 0.3,
test-framework-quickcheck2 >= 0.2.9 && < 0.3,
QuickCheck >= 2.4 && < 2.6,
HUnit >= 1.2 && < 1.3,
template-haskell >= 2.4 && < 2.8,
ansi-terminal == 0.5.*
Other-Modules: Tests.Old
Tests.Helpers
Tests.Arbitrary
Tests.Shared
Tests.Readers.LaTeX
Tests.Readers.Markdown
Tests.Readers.RST
Tests.Writers.Native
Tests.Writers.ConTeXt
Tests.Writers.HTML
Tests.Writers.Markdown
else
Buildable: True
if impl(ghc >= 7)
cpp-options: -D_LIT=lit
else
cpp-options: -D_LIT=$lit
Other-Extensions: TemplateHaskell, QuasiQuotes
Build-Depends: Diff, test-framework >= 0.3 && < 0.6,
test-framework-hunit >= 0.2 && < 0.3,
test-framework-quickcheck2 >= 0.2.9 && < 0.3,
QuickCheck >= 2.4 && < 2.6,
HUnit >= 1.2 && < 1.3,
template-haskell >= 2.4 && < 2.8,
ansi-terminal == 0.5.*
Other-Modules: Tests.Old
Tests.Helpers
Tests.Arbitrary
Tests.Shared
Tests.Readers.LaTeX
Tests.Readers.Markdown
Tests.Readers.RST
Tests.Writers.Native
Tests.Writers.ConTeXt
Tests.Writers.HTML
Tests.Writers.Markdown