aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2015-03-28 15:37:02 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2015-03-28 15:40:50 -0700
commit3f20fb3f9f8ccb2e6476e116e196b7e70ac559bb (patch)
tree6e639b274ab0e33d19d157b015ec197bc93f95ae /Setup.hs
parent524d284b88cc61a9cd958e2679effd1d0a01e1ac (diff)
downloadpandoc-3f20fb3f9f8ccb2e6476e116e196b7e70ac559bb.tar.gz
Always build man pages. Removed make-pandoc-man-pages flag.
Updated INSTALL instructions. Makefile: removed man target, now that we generate man pages by default.
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Setup.hs b/Setup.hs
index 868fe901e..c45ee69d3 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -38,7 +38,9 @@ main = defaultMainWithHooks $ simpleUserHooks {
, instHook = \pkgdescr ->
instHook simpleUserHooks pkgdescr{ executables =
[x | x <- executables pkgdescr, exeName x `notElem` noInstall] }
- , postBuild = makeReferenceFiles
+ , postBuild = \args bf pkgdescr lbi -> do
+ makeManPages args bf pkgdescr lbi
+ makeReferenceFiles args bf pkgdescr lbi
}
where
noInstall = ["make-pandoc-man-pages","make-reference-files"]
@@ -56,6 +58,13 @@ ppBlobSuffixHandler = ("hsb", \_ _ ->
return ()
})
+makeManPages :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
+makeManPages _ bf _ LocalBuildInfo{buildDir=buildDir}
+ = rawSystemExit verbosity progPath []
+ where
+ verbosity = fromFlagOrDefault normal $ buildVerbosity bf
+ progPath = buildDir </> "make-pandoc-man-pages" </> "make-pandoc-man-pages"
+
makeReferenceFiles :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
makeReferenceFiles _ bf _ LocalBuildInfo{buildDir=buildDir}
= mapM_