aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xend/Makefile
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-03-14 18:23:01 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-03-14 18:23:01 +0000
commit0b9d367cf8677be6d54c6d80e393499c99398d2f (patch)
tree2ad2fcb1368dd2fde113ea96c85b00be135dd1e5 /tools/xend/Makefile
parenteefca814b7257774ff8a606b88155cbfa17af89b (diff)
downloadxen-0b9d367cf8677be6d54c6d80e393499c99398d2f.tar.gz
xen-0b9d367cf8677be6d54c6d80e393499c99398d2f.tar.bz2
xen-0b9d367cf8677be6d54c6d80e393499c99398d2f.zip
bitkeeper revision 1.795 (4054a3055ggg3MJTpSU1-ZFQRfQQ5g)
xend.py, setup.py: new file Many files: Rewritten the Xen control daemon in Python, with C extensions for the low-level bits. All our Python libraries now throw exceptions on error rather than returning error codes --- this will require our higher-level scripts to be updated at some point.
Diffstat (limited to 'tools/xend/Makefile')
-rw-r--r--tools/xend/Makefile31
1 files changed, 14 insertions, 17 deletions
diff --git a/tools/xend/Makefile b/tools/xend/Makefile
index 619f980975..de6aeb3982 100644
--- a/tools/xend/Makefile
+++ b/tools/xend/Makefile
@@ -1,27 +1,24 @@
-CC = gcc
-CFLAGS = -Wall -O3
-CFLAGS += -I../xc/lib -I../../xenolinux-sparse/include
-
-HDRS = $(wildcard *.h)
-OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
-
-BIN = xend
-
-all: $(BIN)
+all:
+ python setup.py build
install: all
- mkdir -p $(prefix)/usr/sbin
- cp $(BIN) $(prefix)/usr/sbin
- chmod 755 $(prefix)/usr/sbin/$(BIN)
+ if [ "$(prefix)" = "" ]; then python setup.py install; \
+ else python setup.py install --root "$(prefix)"; fi
+ install --mode=755 xend.py $(prefix)/usr/sbin
+ ln -sf xend.py $(prefix)/usr/sbin/xend
dist: all
- mkdir -p ../../../install/sbin
- cp $(BIN) ../../../install/sbin
- chmod 755 ../../../install/sbin/$(BIN)
+ mkdir -p ../../../../install/lib/python
+ for i in `find . -name 'xend_utils.so'` ; do \
+ install --mode=755 $$i ../../../../install/lib/python/`basename $$i` ; \
+ done
+ python -c 'import py_compile, sys; py_compile.compile("XenoUtil.py")'
+ install --mode=755 xend.py ../../../../install/sbin
+ ln -sf xend.py ../../../../install/sbin/xend
clean:
- $(RM) *.a *.so *.o *.rpm $(BIN)
+ rm -rf build *.pyc *.pyo *.a *.so *.o *~ *.rpm
$(BIN): $(OBJS)
$(CC) -o $@ $^ -L../xc/lib -lxc