4 DFLAGS
= -g
-DDEBUG
-Werror
6 DOCS
= tig
.1.txt 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
40 .PHONY
: all docs
install clean
45 sed
-n
'/\/\*\*/,/\*\*\//p' < $< | \
46 sed
's/.*\*\*\/.*//' | \
47 sed
'/^[^*]*\*\*/d' | \
48 sed
's/\*\///;s/^[^*]*\* *//' > $@
51 asciidoc
-b xhtml11
-d article
-f web.conf
$<
54 asciidoc
-b xhtml11
-d manpage
$<
57 asciidoc
-b docbook
-d manpage
$<
63 asciidoc
-b xhtml11
-d manpage
$<
66 asciidoc
-b docbook
-d manpage
$<
72 asciidoc
-b xhtml11
-d article
$<
75 asciidoc
-b docbook
-d article
$<
77 %.html-chunked
: %.xml