diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-06-28 14:39:17 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-06-28 14:39:17 -0700 |
commit | fe625e053d078e03d824a1df746196b8a2c697b1 (patch) | |
tree | 0129bded228d952594d06a8ed675154d05909abc /Setup.hs | |
parent | 3e5b4faaf2a99950991ff7b16c0e0b06234b9792 (diff) | |
download | pandoc-fe625e053d078e03d824a1df746196b8a2c697b1.tar.gz |
New method for producing man pages.
This change adds `--man1` and `--man5` options to pandoc, so
pandoc can generate its own man pages.
It removes the old overly complex method of building a separate
executable (but not installing it) just to create the man pages.
The man pages are no longer automatically created in the build
process.
The man/ directory has been removed. The man page templates
have been moved to data/.
New unexported module: Text.Pandoc.ManPages.
Text.Pandoc.Data now exports readmeFile, and `readDataFile`
knows how to find README.
Closes #2190.
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -31,18 +31,7 @@ main :: IO () main = defaultMainWithHooks $ simpleUserHooks { -- enable hsb2hs preprocessor for .hsb files hookedPreProcessors = [ppBlobSuffixHandler] - -- ensure that make-pandoc-man-pages doesn't get installed to bindir - , copyHook = \pkgdescr -> - copyHook simpleUserHooks pkgdescr{ executables = - [x | x <- executables pkgdescr, exeName x `notElem` noInstall] } - , instHook = \pkgdescr -> - instHook simpleUserHooks pkgdescr{ executables = - [x | x <- executables pkgdescr, exeName x `notElem` noInstall] } - , postBuild = \args bf pkgdescr lbi -> - makeManPages args bf pkgdescr lbi } - where - noInstall = ["make-pandoc-man-pages"] ppBlobSuffixHandler :: PPSuffixHandler ppBlobSuffixHandler = ("hsb", \_ _ -> @@ -56,10 +45,3 @@ ppBlobSuffixHandler = ("hsb", \_ _ -> Nothing -> error "hsb2hs is needed to build this program: cabal install hsb2hs" 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" |