tools: shake cleanup, webmanual target fixup

This commit is contained in:
Simon Michael 2016-04-05 15:56:14 -07:00
parent 9b492325da
commit 7163a730fd

View File

@ -41,17 +41,16 @@ import "time" Data.Time
import "directory" System.Directory as S (getDirectoryContents) import "directory" System.Directory as S (getDirectoryContents)
usage = [i|Usage: usage = [i|Usage:
./Shake.hs compile # compile this script (optional) ./Shake.hs compile # compile this script (optional)
./Shake # show commands ./Shake # show commands
./Shake --help # show options ./Shake --help # show options, eg --color
./Shake [--color] COMMAND ./Shake manpages # generate nroff files for man
./Shake webmanpages # generate web man pages for hakyll
Commands:
compile
manpages
webmanual
|] |]
buildDir = ".build"
pandocExe = "stack exec -- pandoc" -- use the pandoc required above
pandocFiltersResolver = ""
manpages = [ manpages = [
"hledger_csv.5" "hledger_csv.5"
,"hledger_journal.5" ,"hledger_journal.5"
@ -67,12 +66,6 @@ manpageDir p
| '_' `elem` p = "hledger-lib" | '_' `elem` p = "hledger-lib"
| otherwise = dropExtension p | otherwise = dropExtension p
buildDir = ".build"
pandocExe = "stack exec -- pandoc" -- use the pandoc required above
pandocFiltersResolver = ""
main = do main = do
pandocFilters <- pandocFilters <-
@ -121,7 +114,7 @@ main = do
"--filter doc/pandoc-capitalize-headers" "--filter doc/pandoc-capitalize-headers"
"-o" out "-o" out
phony "webmanual" $ need manpageMdsForHakyll phony "webmanpages" $ need manpageMdsForHakyll
manpageMdsForHakyll |%> \out -> do manpageMdsForHakyll |%> \out -> do
let let