patat/Makefile

21 lines
545 B
Makefile
Raw Normal View History

PANDOC_MINOR_VERSION=$(shell ghc-pkg latest pandoc | sed 's/.*-//' | cut -d. -f2)
PATAT_BUILD_DATE=$(shell date '+%B %d, %Y' -d "$(shell git log -1 --format=%cd --date=short)")
2016-11-18 14:38:04 +03:00
extra/patat.1: README.md extra/make-man
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
# Also check if we can generate the manual.
test: man
2016-11-18 14:38:04 +03:00
bash test.sh
clean:
rm -f extra/patat.1
rm -f extra/make-man
.PHONY: man test clean