aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 6664a992f95e18068fd942405ab1c59224ccc792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
version ?= $(shell awk '/[Vv]ersion/ { print $$2; }' pandoc.cabal)

.PHONY: test
test:
	cabal new-configure . --ghc-options '$(GHCOPTS)' --disable-optimization --enable-tests $(ENABLE)
	cabal new-build . --disable-optimization
	cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS)


.PHONY: full
full: ENABLE = --enable-benchmarks
full: test

man/pandoc.1: MANUAL.txt man/pandoc.1.before man/pandoc.1.after
	pandoc $< -f markdown -t man -s \
		--lua-filter man/manfilter.lua \
		--include-before-body man/pandoc.1.before \
		--include-after-body man/pandoc.1.after \
		--metadata author="" \
		--variable footer="pandoc $(version)" \
		-o $@

README.md: README.template MANUAL.txt tools/update-readme.lua
	pandoc --lua-filter tools/update-readme.lua \
	      --reference-location=section -t gfm $< -o $@