git.iko.soy/typeable/pandoc
on master help sign in
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.

commit3f20fb3f9f8ccb2e6476e116e196b7e70ac559bb authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 28 Mar 2015, 15:37 (12 years ago) parent524d284
4 files changed+12−23
INSTALL+1−6 Makefile−8 Setup.hs+10−1 pandoc.cabal+1−8
INSTALL+1−6
@@ -66,11 +66,7 @@ Quick install
6666 --extra-include-dirs=/usr/local/Cellar/icu4c/51.1/include \
6767 -funicode_collation text-icu pandoc-citeproc
6868
69−The cabal installation procedure does not generate man pages.
70−To build the `pandoc` man pages, build pandoc with the
71−`make-pandoc-man-pages` flag, and then use the command
72−`make-pandoc-man-pages` from the pandoc source directory.
73−This will create the man pages in `man/man1` and `man/man5`.
69+The build process will create man pages in `man/man1` and `man/man5`.
7470
7571To build the `pandoc-citeproc` man pages, go to the pandoc-citeproc
7672build directory, and
@@ -209,4 +205,3 @@ To use a smaller sample size so the benchmarks run faster:
209205To run just the markdown benchmarks:
210206
211207 cabal bench --benchmark-options='markdown'
212−
Makefile−8
@@ -1,10 +1,5 @@
11version=$(shell grep '^Version:' pandoc.cabal | awk '{print $$2;}')
2−makemanpages=$(shell find dist -type f -name make-pandoc-man-pages)
3−ifeq "${makemanpages}" ""
4− makemanpages=@echo "You need to 'cabal configure -fmake-pandoc-man-pages && cabal build'" && exit 1
5−endif
62setup=dist/setup/setup
7−MANPAGES=man/man1/pandoc.1 man/man5/pandoc_markdown.5
83PREFIX ?= /usr/local
94
105quick:
@@ -43,8 +38,6 @@ dist: man
4338debpkg:
4439 ./make_deb.sh
4540
46−man: $(MANPAGES)
47−
4841osxpkg:
4942 ./make_osx_package.sh
5043
@@ -56,7 +49,6 @@ osxpkg:
5649
5750clean:
5851 cabal clean
59− -rm $(MANPAGES)
6052 -rm -rf $(BINDIST) $(BINDIST).tar.gz
6153
6254.PHONY: deps quick full install man clean test bench haddock osxpkg dist bindist prof
Setup.hs+10−1
@@ -38,7 +38,9 @@ main = defaultMainWithHooks $ simpleUserHooks {
3838 , instHook = \pkgdescr ->
3939 instHook simpleUserHooks pkgdescr{ executables =
4040 [x | x <- executables pkgdescr, exeName x `notElem` noInstall] }
41− , postBuild = makeReferenceFiles
41+ , postBuild = \args bf pkgdescr lbi -> do
42+ makeManPages args bf pkgdescr lbi
43+ makeReferenceFiles args bf pkgdescr lbi
4244 }
4345 where
4446 noInstall = ["make-pandoc-man-pages","make-reference-files"]
@@ -56,6 +58,13 @@ ppBlobSuffixHandler = ("hsb", \_ _ ->
5658 return ()
5759 })
5860
61+makeManPages :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
62+makeManPages _ bf _ LocalBuildInfo{buildDir=buildDir}
63+ = rawSystemExit verbosity progPath []
64+ where
65+ verbosity = fromFlagOrDefault normal $ buildVerbosity bf
66+ progPath = buildDir </> "make-pandoc-man-pages" </> "make-pandoc-man-pages"
67+
5968makeReferenceFiles :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
6069makeReferenceFiles _ bf _ LocalBuildInfo{buildDir=buildDir}
6170 = mapM_
pandoc.cabal+1−8
@@ -231,10 +231,6 @@ Flag https
231231 Description: Enable support for downloading of resources over https.
232232 Default: True
233233
234−Flag make-pandoc-man-pages
235− Description: Build program to regenerate pandoc man pages from README.
236− Default: False
237−
238234Flag network-uri
239235 Description: Get Network.URI from the network-uri package
240236 Default: True
@@ -442,10 +438,7 @@ Executable make-pandoc-man-pages
442438 old-time >= 1.0 && < 1.2,
443439 time >= 1.2 && < 1.6
444440 Default-Language: Haskell98
445− if flag(make-pandoc-man-pages)
446− Buildable: True
447− else
448− Buildable: False
441+ Buildable: True
449442
450443Executable make-reference-files
451444 Main-Is: make-reference-files.hs