Web plugin.
[supybook.git] / Makefile
blobf1c3079630cb5d8a84a378aadf077afe0c3663d3
1 PARAMS=-a toc -a toclevels=3 -a date=$(shell date +%Y-%m-%d) -a numbered -d book
2 ifdef VERSION
3 REVISION=$(VERSION)
4 endif
5 ifdef REVISION
6 PARAMS+=-a revision=$(REVISION)
7 else
8 PARAMS+=-a revision=$(shell git describe)$(shell git diff-index HEAD |grep '' > /dev/null && echo '+dirty')
9 endif
11 all: index.html
13 pdf: index.pdf
15 release: clean all
16 ifndef VERSION
17 @echo "Usage: make release VERSION=x"
18 @false
19 else
20 tar --owner=0 --group=0 --transform 's!^!supybook-$(VERSION)/!' -zcf supybook-$(VERSION).tar.gz index.txt index.html Makefile
21 endif
23 %.html: %.txt
24 asciidoc $(PARAMS) $<
26 %.pdf: %.txt
27 a2x $(PARAMS) -f pdf $<
29 clean:
30 @$(RM) index.html
32 .PHONY: all pdf release release-tar