diff -r ef3c039e7ab8 -r 3840cefa5222 doc/Makefile --- a/doc/Makefile Tue May 09 17:03:00 2006 +0200 +++ b/doc/Makefile Tue May 09 17:05:49 2006 +0200 @@ -1,6 +1,9 @@ SOURCES=$(wildcard *.[0-9].txt) MAN=$(SOURCES:%.txt=%) HTML=$(SOURCES:%.txt=%.html) +PREFIX=/usr/local +MANDIR=$(PREFIX)/man +INSTALL=install -c all: man html @@ -23,5 +26,12 @@ %.html: %.txt asciidoc -b html4 $*.txt || asciidoc -b html $*.txt +install: man + for i in $(MAN) ; do \ + subdir=`echo $$i | sed -n 's/.\+\(\.[0-9]\)$$/man\1/p'` ; \ + mkdir -p $(MANDIR)/$$subdir ; \ + $(INSTALL) $$i $(MANDIR)/$$subdir ; \ + done + clean: $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt