aboutsummaryrefslogtreecommitdiff
path: root/pandoc.cabal
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-12-15 17:52:35 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-12-15 17:54:51 -0800
commit605648cbbf03932f04ca7561a02926598b3a7242 (patch)
treeda4bebe994f63d0dd0c6736613cb4ca430475d3f /pandoc.cabal
parent63cf37a9ca0cd9ffbc0a7a7091c5420f68a09dfe (diff)
downloadpandoc-605648cbbf03932f04ca7561a02926598b3a7242.tar.gz
Added 'tests' Cabal flag.
+ This ensures that test-pandoc gets built. + 'cabal test' now runs this. + The old tests/RunTests.hs has been removed, and src/test-pandoc.hs added.
Diffstat (limited to 'pandoc.cabal')
-rw-r--r--pandoc.cabal28
1 files changed, 21 insertions, 7 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index 727bae405..eb400d1c4 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -74,7 +74,7 @@ Extra-Source-Files:
-- code to create pandoc.1 man page
MakeManPage.hs,
manpage.template,
- -- benchmarking
+ -- benchmarks
Benchmark.hs,
-- tests
tests/bodybg.gif,
@@ -136,8 +136,7 @@ Extra-Source-Files:
tests/lhs-test.latex+lhs,
tests/lhs-test.html,
tests/lhs-test.html+lhs,
- tests/lhs-test.fragment.html+lhs,
- tests/RunTests.hs
+ tests/lhs-test.fragment.html+lhs
Extra-Tmp-Files: man/man1/pandoc.1, man/man1/markdown2pdf.1
Flag threaded
@@ -155,6 +154,12 @@ Flag library
Flag wrappers
Description: Build the wrappers (markdown2pdf).
Default: True
+Flag tests
+ Description: Build test-pandoc.
+ Default: False
+Flag benchmarks
+ Description: Build benchmark-pandoc.
+ Default: False
Library
-- Note: the following material must be in both Library and Executable stanzas.
@@ -261,9 +266,9 @@ Executable pandoc
Main-Is: pandoc.hs
if flag(executable) || flag(wrappers)
- Buildable: True
+ Buildable: True
else
- Buildable: False
+ Buildable: False
Executable markdown2pdf
Hs-Source-Dirs: src
@@ -275,7 +280,16 @@ Executable markdown2pdf
Ghc-Prof-Options: -auto-all
Extensions: CPP
if flag(wrappers)
- Buildable: True
+ Buildable: True
else
- Buildable: False
+ Buildable: False
+
+Executable test-pandoc
+ Hs-Source-Dirs: src
+ Main-Is: test-pandoc.hs
+ if !flag(tests)
+ Buildable: False
+ else
+ Ghc-Options: -Wall
+ Build-Depends: base >= 4 && < 5, Diff, MissingH