summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
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_