X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=b019480cbf03ea91c6ed3629e337eb2ef899fe33;hb=3906f1deb51d64e57d39dd02192b691ddb83628b;hp=8ce40514702e15c1abc22021a05ce5d154739fe2;hpb=286e4963a987e2478baca5050e805516e2b7fbd0;p=plcapi.git diff --git a/Makefile b/Makefile index 8ce4051..b019480 100644 --- a/Makefile +++ b/Makefile @@ -4,26 +4,53 @@ # Mark Huang # Copyright (C) 2005 The Trustees of Princeton University # -# $Id: Makefile,v 1.2 2006/10/25 21:05:40 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 php +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 -index: PLC/__init__.py PLC/Methods/__init__.py # All .py files in PLC/ PLC := $(filter-out %/__init__.py, $(wildcard PLC/*.py)) @@ -49,4 +76,4 @@ endif force: -.PHONY: force clean $(SUBDIRS) +.PHONY: all install force clean index tags $(SUBDIRS)