2016-12-01 16:21:08 +03:00
|
|
|
PANDOC_MINOR_VERSION=$(shell ghc-pkg latest pandoc | sed 's/.*-//' | cut -d. -f2)
|
2016-12-01 16:55:10 +03:00
|
|
|
PATAT_BUILD_DATE=$(shell date '+%B %d, %Y' -d "$(shell git log -1 --format=%cd --date=short)")
|
2016-12-01 16:21:08 +03:00
|
|
|
|
2016-11-18 14:38:04 +03:00
|
|
|
extra/patat.1: README.md extra/make-man
|
2016-12-01 16:55:10 +03:00
|
|
|
PATAT_BUILD_DATE="$(PATAT_BUILD_DATE)" ./extra/make-man >$@
|
2016-11-18 14:38:04 +03:00
|
|
|
|
|
|
|
extra/make-man: extra/make-man.hs
|
2016-12-01 16:43:22 +03:00
|
|
|
ghc -DPANDOC_MINOR_VERSION=${PANDOC_MINOR_VERSION} -Wall -o $@ $<
|
2016-11-18 14:38:04 +03:00
|
|
|
|
|
|
|
man: extra/patat.1
|
|
|
|
|
2016-12-01 16:21:08 +03:00
|
|
|
# Also check if we can generate the manual.
|
|
|
|
test: man
|
2016-11-18 14:38:04 +03:00
|
|
|
bash test.sh
|
|
|
|
|
2016-12-01 16:55:10 +03:00
|
|
|
clean:
|
|
|
|
rm -f extra/patat.1
|
|
|
|
rm -f extra/make-man
|
|
|
|
|
|
|
|
.PHONY: man test clean
|