Commit | Line | Data |
---|---|---|
800a900c | 1 | LDFLAGS = -lcurses |
05f1685b | 2 | CFLAGS = -g |
a7bc4b14 JF |
3 | PROGS = cgit |
4 | DOCS = cgit.1.txt cgit.1 cgit.1.html | |
800a900c | 5 | |
a7bc4b14 JF |
6 | all: $(PROGS) |
7 | docs: $(DOCS) | |
800a900c | 8 | |
05f1685b | 9 | install: all |
a7bc4b14 JF |
10 | for prog in $(PROGS); do \ |
11 | install $$prog $(HOME)/bin; \ | |
12 | done | |
05f1685b JF |
13 | |
14 | clean: | |
a7bc4b14 | 15 | rm -f $(PROGS) $(DOCS) |
05f1685b | 16 | |
800a900c | 17 | cgit: cgit.c |
a7bc4b14 JF |
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 $< |