Primitive option parsing; rendering generalizations
[tig] / Makefile
... / ...
CommitLineData
1LDFLAGS = -lcurses
2CFLAGS = -g '-DVERSION="$(VERSION)"' -Wall
3PROGS = tig
4DOCS = tig.1.txt tig.1 tig.1.html
5VERSION = $(shell git-describe)
6
7all: $(PROGS)
8docs: $(DOCS)
9
10install: all
11 for prog in $(PROGS); do \
12 install $$prog $(HOME)/bin; \
13 done
14
15clean:
16 rm -f $(PROGS) $(DOCS)
17
18.PHONY: all docs install clean
19
20tig: tig.c
21
22tig.1.txt: tig.c
23 sed -n '/\/\*\*/,/\*\*\//p' < $< | \
24 sed 's/.*\*\*\///' | \
25 sed '/^[^*]*\*\*/d' | \
26 sed 's/\*\///;s/^[^*]*\* *//' > $@
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 $<