Added install target.
--- 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
--- 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