diff Makefile @ 2240:56fddd98fef5

merge with crew.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 09 May 2006 14:40:13 -0700
parents 457e4247315d
children 76be4e66ddc8
line wrap: on
line diff
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,34 @@
-# This Makefile is only used by developers.
+PREFIX=/usr/local
+export PREFIX
 PYTHON=python
 
-all:
+all: local build doc
+
+local:
 	$(PYTHON) setup.py build_ext -i
 
-install:
-	@echo "Read the file README for install instructions."
+build:
+	$(PYTHON) setup.py build
+
+doc:
+	$(MAKE) -C doc
 
 clean:
 	-$(PYTHON) setup.py clean --all # ignore errors of this command
 	find . -name '*.py[co]' -exec rm -f '{}' ';'
 	$(MAKE) -C doc clean
 
-dist:	tests doc
+install: all
+	$(PYTHON) setup.py install --prefix="$(PREFIX)" --force
+	cd doc && $(MAKE) $(MFLAGS) install
+
+install-home: all
+	$(PYTHON) setup.py install --home="$(HOME)" --force
+	cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
+
+dist:	tests dist-notests
+
+dist-notests:	doc
 	TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest
 
 tests:
@@ -21,9 +37,6 @@ tests:
 test-%:
 	cd tests && $(PYTHON) run-tests.py $@
 
-doc:
-	$(MAKE) -C doc
 
+.PHONY: all local build doc clean install install-home dist dist-notests tests
 
-.PHONY: all clean dist tests doc
-