Code

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