4 DFLAGS
= -g
-DDEBUG
-Werror
6 DOCS
= tig
.1.txt tig
.1.html tig
.1 tigrc
.5.html tigrc
.5 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
;; \
28 *.5) install $$doc $(PREFIX
)/man
/man5
;; \
33 rm -f
$(PROGS
) $(DOCS
) core
36 aspell
--lang
=en
--check tig
.1.txt
38 .PHONY
: all docs
install clean
43 sed
-n
'/\/\*\*/,/\*\*\//p' < $< | \
44 sed
's/.*\*\*\/.*//' | \
45 sed
'/^[^*]*\*\*/d' | \
46 sed
's/\*\///;s/^[^*]*\* *//' > $@
49 asciidoc
-b xhtml11
-d article
-f web.conf
$<
52 asciidoc
-b xhtml11
-d manpage
$<
55 asciidoc
-b docbook
-d manpage
$<
61 asciidoc
-b xhtml11
-d manpage
$<
64 asciidoc
-b docbook
-d manpage
$<