diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-07 12:10:07 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-07 12:29:43 -0800 |
commit | 3b3387b4a325607cb8dd5ef5b6ddec5f7ae08bd7 (patch) | |
tree | 8d343859ee63e7ca90308823008b368b1ab2c801 /Setup.hs | |
parent | 581f8f77d5ad8b8c1507e75f8b61fbc82cd1eb70 (diff) | |
download | pandoc-3b3387b4a325607cb8dd5ef5b6ddec5f7ae08bd7.tar.gz |
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.hs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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"] |