# HG changeset patch # User wilde@trapperkeeper.sha-bang.de # Date 1147187149 -7200 # Node ID 3840cefa5222b756d656be721009c14962e1a8be # Parent ef3c039e7ab81d82f7adfd0755f531ebf7ca3e38 Added install target. diff -r ef3c039e7ab8 -r 3840cefa5222 Makefile --- a/Makefile Tue May 09 17:03:00 2006 +0200 +++ b/Makefile Tue May 09 17:05:49 2006 +0200 @@ -1,11 +1,13 @@ -# This Makefile is only used by developers. +PREFIX=/usr/local +export PREFIX PYTHON=python all: $(PYTHON) setup.py build_ext -i -install: - @echo "Read the file README for install instructions." +install: all + $(PYTHON) setup.py install --home="$(PREFIX)" + cd doc && $(MAKE) $(MFLAGS) install clean: -$(PYTHON) setup.py clean --all # ignore errors of this command 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