Exploration
[tig] / Makefile
1 LDFLAGS = -lcurses
2 CFLAGS  = -g
3 PROGS   = cgit
4 DOCS    = cgit.1.txt cgit.1 cgit.1.html
5
6 all: $(PROGS)
7 docs: $(DOCS)
8
9 install: all
10         for prog in $(PROGS); do \
11                 install $$prog $(HOME)/bin; \
12         done
13
14 clean:
15         rm -f $(PROGS) $(DOCS)
16
17 cgit: cgit.c
18
19 cgit.1.txt: cgit.c
20         sed -n '/\*\*/,/\*\*/p' < $< | \
21         sed '/\*\*/d' | \
22         sed -n 's/^ \* *//p' > $@
23
24 %.1.html : %.1.txt
25         asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
26
27 %.1.xml : %.1.txt
28         asciidoc -b docbook -d manpage -f asciidoc.conf $<
29
30 %.1 : %.1.xml
31         xmlto man $<