Commit | Line | Data |
---|---|---|
800a900c | 1 | LDFLAGS = -lcurses |
b801d8b2 JF |
2 | CFLAGS = -g '-DVERSION="$(VERSION)"' -Wall |
3 | PROGS = tig | |
4 | DOCS = tig.1.txt tig.1 tig.1.html | |
5 | VERSION = $(shell git-describe) | |
800a900c | 6 | |
a7bc4b14 JF |
7 | all: $(PROGS) |
8 | docs: $(DOCS) | |
800a900c | 9 | |
05f1685b | 10 | install: all |
a7bc4b14 JF |
11 | for prog in $(PROGS); do \ |
12 | install $$prog $(HOME)/bin; \ | |
13 | done | |
05f1685b JF |
14 | |
15 | clean: | |
a7bc4b14 | 16 | rm -f $(PROGS) $(DOCS) |
05f1685b | 17 | |
b801d8b2 | 18 | .PHONY: all docs install clean |
a7bc4b14 | 19 | |
b801d8b2 JF |
20 | tig: tig.c |
21 | ||
22 | tig.1.txt: tig.c | |
b76c2afc JF |
23 | sed -n '/\/\*\*/,/\*\*\//p' < $< | \ |
24 | sed 's/.*\*\*\///' | \ | |
25 | sed '/^[^*]*\*\*/d' | \ | |
b801d8b2 | 26 | sed 's/\*\///;s/^[^*]*\* *//' > $@ |
a7bc4b14 JF |
27 | |
28 | %.1.html : %.1.txt | |
29 | asciidoc -b xhtml11 -d manpage -f asciidoc.conf $< | |
30 | ||
31 | %.1.xml : %.1.txt | |
32 | asciidoc -b docbook -d manpage -f asciidoc.conf $< | |
33 | ||
34 | %.1 : %.1.xml | |
35 | xmlto man $< |