X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=b019480cbf03ea91c6ed3629e337eb2ef899fe33;hb=3906f1deb51d64e57d39dd02192b691ddb83628b;hp=b6d125abfc634ce92e4d8aa873c1e7be88b02ad7;hpb=24d16d18acab3da7bccc3e09df4927e9cf2d3246;p=plcapi.git diff --git a/Makefile b/Makefile index b6d125a..b019480 100644 --- a/Makefile +++ b/Makefile @@ -4,24 +4,53 @@ # Mark Huang # Copyright (C) 2005 The Trustees of Princeton University # -# $Id: plcsh,v 1.3 2006/01/09 19:57:24 mlhuang Exp $ +# $Id: Makefile,v 1.7 2006/11/08 23:27:52 mlhuang Exp $ # # Metafiles INIT := PLC/__init__.py PLC/Methods/__init__.py # Other stuff -SUBDIRS := doc +SUBDIRS := doc php php/xmlrpc + +# autoconf compatible variables +DESTDIR := /plc/root +datadir := /usr/share +bindir := /usr/bin + +PWD := $(shell pwd) all: $(INIT) $(SUBDIRS) + python setup.py build + # Install in the current directory so that we can import it + cd psycopg2 && \ + python setup.py build && \ + python setup.py install --install-lib=$(PWD) + +install: + python setup.py install \ + --install-purelib=$(DESTDIR)/$(datadir)/plc_api \ + --install-scripts=$(DESTDIR)/$(datadir)/plc_api \ + --install-data=$(DESTDIR)/$(datadir)/plc_api + (cd psycopg2 && \ + python setup.py install --install-lib=$(DESTDIR)/$(datadir)/plc_api) + install -D -m 755 php/xmlrpc/xmlrpc.so $(DESTDIR)/$(shell php-config --extension-dir)/xmlrpc.so $(SUBDIRS): %: $(MAKE) -C $@ clean: - find . -name '*.pyc' -execdir rm -f {} + + find . -name '*.pyc' | xargs rm -f rm -f $(INIT) for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir clean ; done + python setup.py clean && rm -rf build + cd psycopg2 && python setup.py clean && rm -rf build + +index: $(INIT) + +tags: + find . '(' -name '*.py' -o -name '*.sql' -o -name '*.php' -o -name Makefile ')' | xargs etags + # All .py files in PLC/ PLC := $(filter-out %/__init__.py, $(wildcard PLC/*.py)) @@ -47,4 +76,4 @@ endif force: -.PHONY: force clean $(SUBDIRS) +.PHONY: all install force clean index tags $(SUBDIRS)