Mercurial > hg
comparison doc/Makefile @ 2233:3840cefa5222
Added install target.
author | wilde@trapperkeeper.sha-bang.de |
---|---|
date | Tue, 09 May 2006 17:05:49 +0200 |
parents | 9ef0850b9b68 |
children | 3bdeca8946a6 |
comparison
equal
deleted
inserted
replaced
2232:ef3c039e7ab8 | 2233:3840cefa5222 |
---|---|
1 SOURCES=$(wildcard *.[0-9].txt) | 1 SOURCES=$(wildcard *.[0-9].txt) |
2 MAN=$(SOURCES:%.txt=%) | 2 MAN=$(SOURCES:%.txt=%) |
3 HTML=$(SOURCES:%.txt=%.html) | 3 HTML=$(SOURCES:%.txt=%.html) |
4 PREFIX=/usr/local | |
5 MANDIR=$(PREFIX)/man | |
6 INSTALL=install -c | |
4 | 7 |
5 all: man html | 8 all: man html |
6 | 9 |
7 man: $(MAN) | 10 man: $(MAN) |
8 | 11 |
21 asciidoc -d manpage -b docbook $*.txt | 24 asciidoc -d manpage -b docbook $*.txt |
22 | 25 |
23 %.html: %.txt | 26 %.html: %.txt |
24 asciidoc -b html4 $*.txt || asciidoc -b html $*.txt | 27 asciidoc -b html4 $*.txt || asciidoc -b html $*.txt |
25 | 28 |
29 install: man | |
30 for i in $(MAN) ; do \ | |
31 subdir=`echo $$i | sed -n 's/.\+\(\.[0-9]\)$$/man\1/p'` ; \ | |
32 mkdir -p $(MANDIR)/$$subdir ; \ | |
33 $(INSTALL) $$i $(MANDIR)/$$subdir ; \ | |
34 done | |
35 | |
26 clean: | 36 clean: |
27 $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt | 37 $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt |