8 DFLAGS
= -g
-DDEBUG
-Werror
10 DOCS
= tig
.1.html tig
.1 tigrc
.5.html tigrc
.5 \
11 manual.html manual.html-chunked README.html
13 ifneq (,$(wildcard .git
))
14 VERSION
= $(shell git-describe
)
15 WTDIRTY
= $(shell git-diff-index
--name-only HEAD
2>/dev
/null
)
16 CFLAGS
+= '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"'
21 all-debug
: CFLAGS
+= $(DFLAGS
)
25 for prog in
$(PROGS
); do \
26 install $$prog $(DESTDIR
)$(bindir); \
30 mkdir
-p
$(DESTDIR
)$(mandir)/man1
$(DESTDIR
)$(mandir)/man5
31 for doc in
$(DOCS
); do \
33 *.1) install $$doc $(DESTDIR
)$(mandir)/man1
;; \
34 *.5) install $$doc $(DESTDIR
)$(mandir)/man5
;; \
39 rm -rf manual.html-chunked
40 rm -f
$(PROGS
) $(DOCS
) core
43 aspell
--lang
=en
--check tig
.1.txt tigrc
.5.txt manual.txt
48 .PHONY
: all all-debug doc
install install-doc
clean spell-check
53 asciidoc
-b xhtml11
-d article
-f web.conf
$<
56 asciidoc
-b xhtml11
-d manpage
$<
59 asciidoc
-b docbook
-d manpage
$<
65 asciidoc
-b xhtml11
-d manpage
$<
68 asciidoc
-b docbook
-d manpage
$<
74 asciidoc
-b xhtml11
-d article
$<
77 asciidoc
-b docbook
-d article
$<
79 %.html-chunked
: %.xml