4 DFLAGS = -g -DDEBUG -Werror
6 DOCS = tig.1.txt tig.1.html tig.1 README.html
8 ifneq (,$(wildcard .git))
9 VERSION = $(shell git-describe)
10 WTDIRTY = $(shell git-diff-index --name-only HEAD 2>/dev/null)
11 CFLAGS += '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"'
16 all-debug: CFLAGS += $(DFLAGS)
20 for prog in $(PROGS); do \
21 install $$prog $(PREFIX)/bin; \
25 for doc in $(DOCS); do \
27 *.1) install $$doc $(PREFIX)/man/man1 ;; \
32 rm -f $(PROGS) $(DOCS) core
35 aspell --lang=en --check tig.1.txt
37 .PHONY: all docs install clean
42 sed -n '/\/\*\*/,/\*\*\//p' < $< | \
43 sed 's/.*\*\*\///' | \
44 sed '/^[^*]*\*\*/d' | \
45 sed 's/\*\///;s/^[^*]*\* *//' > $@
48 asciidoc -b xhtml11 -d article -f web.conf $<
51 asciidoc -b xhtml11 -d manpage $<
54 asciidoc -b docbook -d manpage $<