Document file history rev limiting
[tig] / Makefile
... / ...
CommitLineData
1PREFIX = $(HOME)
2LDFLAGS = -lcurses
3CFLAGS = '-DVERSION="$(VERSION)"' -Wall
4DFLAGS = -g -DDEBUG
5PROGS = tig
6DOCS = tig.1.txt tig.1.html tig.1
7VERSION = $(shell git-describe)
8
9all: $(PROGS)
10all-debug: $(PROGS)
11all-debug: CFLAGS += $(DFLAGS)
12docs: $(DOCS)
13
14install: all
15 for prog in $(PROGS); do \
16 install $$prog $(PREFIX)/bin; \
17 done
18
19install-docs: docs
20 for doc in $(DOCS); do \
21 case "$$doc" in \
22 *.1) install $$doc $(PREFIX)/man/man1 ;; \
23 esac \
24 done
25
26clean:
27 rm -f $(PROGS) $(DOCS) core
28
29spell-check:
30 aspell --lang=en --check tig.1.txt
31
32.PHONY: all docs install clean
33
34tig: tig.c
35
36tig.1.txt: tig.c
37 sed -n '/\/\*\*/,/\*\*\//p' < $< | \
38 sed 's/.*\*\*\///' | \
39 sed '/^[^*]*\*\*/d' | \
40 sed 's/\*\///;s/^[^*]*\* *//' > $@
41
42%.1.html : %.1.txt
43 asciidoc -b xhtml11 -d manpage $<
44
45%.1.xml : %.1.txt
46 asciidoc -b docbook -d manpage $<
47
48%.1 : %.1.xml
49 xmlto man $<