mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
which gets incorrectly captured as a value for the bash for loop. Signed-off-by: Keir Fraser <keir@xensource.com>
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
XEN_ROOT = ../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build:
|
|
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
|
|
if which $(MSGFMT) >/dev/null ; then \
|
|
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; \
|
|
fi
|
|
|
|
.PHONY: install
|
|
ifndef XEN_PYTHON_NATIVE_INSTALL
|
|
install: install-messages
|
|
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
|
|
else
|
|
install: install-messages
|
|
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
|
|
endif
|
|
|
|
install-messages: all
|
|
if which $(MSGFMT) >/dev/null ; then \
|
|
mkdir -p "$(DESTDIR)/usr/share/locale"; \
|
|
cp -R build/messages/* "$(DESTDIR)/usr/share/locale/"; \
|
|
fi
|
|
|
|
.PHONY: test
|
|
test:
|
|
export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); python test.py -b -u
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf build *.pyc *.pyo *.o *.a *~
|