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