ia64/xen-unstable

view tools/python/Makefile @ 13568:dd55107d4a67

Fix failure to localise xm by preventing cd from writing to stdout
which gets incorrectly captured as a value for the bash for loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Jan 22 17:07:16 2007 +0000 (2007-01-22)
parents 89d4e80cd1b7
children ff81ea60bc98
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 .PHONY: all
5 all: build
7 .PHONY: build
8 build:
9 CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
10 if which $(MSGFMT) >/dev/null ; then \
11 for file in `cd ./xen/xm; find messages -name xen-xm.po`; do \
12 dest=`echo "build/$$file" | \
13 sed -e 's#xen-xm.po#LC_MESSAGES/xen-xm.mo#'`; \
14 mkdir -p `dirname "$$dest"`; \
15 $(MSGFMT) -c -o "$$dest" "xen/xm/$$file"; \
16 done; \
17 fi
19 .PHONY: install
20 ifndef XEN_PYTHON_NATIVE_INSTALL
21 install: install-messages
22 CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
23 else
24 install: install-messages
25 CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
26 endif
28 install-messages: all
29 if which $(MSGFMT) >/dev/null ; then \
30 mkdir -p "$(DESTDIR)/usr/share/locale"; \
31 cp -R build/messages/* "$(DESTDIR)/usr/share/locale/"; \
32 fi
34 .PHONY: test
35 test:
36 export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); python test.py -b -u
38 .PHONY: clean
39 clean:
40 rm -rf build *.pyc *.pyo *.o *.a *~