summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-12-07 12:10:07 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-12-07 12:29:43 -0800
commit3b3387b4a325607cb8dd5ef5b6ddec5f7ae08bd7 (patch)
tree8d343859ee63e7ca90308823008b368b1ab2c801 /Setup.hs
parent581f8f77d5ad8b8c1507e75f8b61fbc82cd1eb70 (diff)
Improved process to create man page from README.
Previously it relied on pandoc already being installed. Now it uses dist/package.conf.inplace.
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Setup.hs b/Setup.hs
index aa007576e..186a8bb2b 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -48,9 +48,11 @@ runTestSuite _ _ pkg _ = do
-- | Build man pages from markdown sources in man/man1/.
makeManPages :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
-makeManPages _ flags _ buildInfo =
- mapM_ (makeManPage pandocPath (fromFlag $ buildVerbosity flags)) manpages
- where pandocPath = (buildDir buildInfo) </> "pandoc" </> "pandoc"
+makeManPages _ flags _ buildInfo = do
+ let pandocPath = (buildDir buildInfo) </> "pandoc" </> "pandoc"
+ makeManPage pandocPath (fromFlag $ buildVerbosity flags) "markdown2pdf.1"
+ let testCmd = "runghc -package-conf=dist/package.conf.inplace MakeManPage.hs" -- makes pandoc.1 from README
+ runCommand testCmd >>= waitForProcess >>= exitWith
manpages :: [FilePath]
manpages = ["pandoc.1", "markdown2pdf.1"]