4 DFLAGS
= -g
-DDEBUG
-Werror
6 DOCS
= tig
.1.html tig
.1 tigrc
.5.html tigrc
.5 \
7 manual.html manual.html-chunked README.html
9 ifneq (,$(wildcard .git
))
10 VERSION
= $(shell git-describe
)
11 WTDIRTY
= $(shell git-diff-index
--name-only HEAD
2>/dev
/null
)
12 CFLAGS
+= '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"'
17 all-debug
: CFLAGS
+= $(DFLAGS
)
21 for prog in
$(PROGS
); do \
22 install $$prog $(PREFIX
)/bin
; \
26 for doc in
$(DOCS
); do \
28 *.1) install $$doc $(PREFIX
)/man
/man1
;; \
29 *.5) install $$doc $(PREFIX
)/man
/man5
;; \
34 rm -rf manual.html-chunked
35 rm -f
$(PROGS
) $(DOCS
) core
38 aspell
--lang
=en
--check tig
.1.txt tigrc
.5.txt manual.txt
43 .PHONY
: all all-debug doc
install install-doc
clean spell-check
48 asciidoc
-b xhtml11
-d article
-f web.conf
$<
51 asciidoc
-b xhtml11
-d manpage
$<
54 asciidoc
-b docbook
-d manpage
$<
60 asciidoc
-b xhtml11
-d manpage
$<
63 asciidoc
-b docbook
-d manpage
$<
69 asciidoc
-b xhtml11
-d article
$<
72 asciidoc
-b docbook
-d article
$<
74 %.html-chunked
: %.xml