aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/Makefile
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2006-12-23 11:24:10 +0000
committerEwan Mellor <ewan@xensource.com>2006-12-23 11:24:10 +0000
commit8ecdc794ab848076dec43732c026ec77f3a87520 (patch)
tree943b49a8c9d7f31cbba75b456373cb5cb9c005f6 /tools/python/Makefile
parent055785c1c8f543a6690b6da1fd9302ec4733f199 (diff)
downloadxen-8ecdc794ab848076dec43732c026ec77f3a87520.tar.gz
xen-8ecdc794ab848076dec43732c026ec77f3a87520.tar.bz2
xen-8ecdc794ab848076dec43732c026ec77f3a87520.zip
Added I18N support for Xen-API error codes.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/python/Makefile')
-rw-r--r--tools/python/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/python/Makefile b/tools/python/Makefile
index 6b84446ee6..3732c06aa9 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -7,16 +7,26 @@ all: build
.PHONY: build
build:
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
+ for file in `cd xen/xm; find messages -name xen-xm.po`; do \
+ dest=`echo "build/$$file" | \
+ sed -e 's#xen-xm.po#LC_MESSAGES/xen-xm.mo#'`; \
+ mkdir -p `dirname "$$dest"`; \
+ msgfmt -c -o "$$dest" "xen/xm/$$file"; \
+ done
.PHONY: install
ifndef XEN_PYTHON_NATIVE_INSTALL
-install: all
+install: install-messages
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
else
-install: all
+install: install-messages
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
endif
+install-messages: all
+ mkdir -p "$(DESTDIR)/usr/share/locale"
+ cp -R build/messages/* "$(DESTDIR)/usr/share/locale/"
+
.PHONY: test
test:
export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); python test.py -b -u