mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
This file hasn't been touched since it was introduced in 2005 (c/s 0c6f36628)
and has a wildly obsolete shebang for Python 2.3. Most importantly for us is
that it isn't Python 3 compatible.
Drop the file entirely. Since the 2.3 days, automatic discovery of tests has
been included in standard functionality. Rewrite the test rule to use
"$(PYTHON) -m unittest discover" which is equivelent.
Dropping test.py drops the only piece of ZPL-2.0 code in the tree. Drop the
ancillary files, and adjust COPYING to match.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Reviewed-by: Lars Kurth <lars.kurth@citrix.com>
48 lines
1.2 KiB
Makefile
48 lines
1.2 KiB
Makefile
XEN_ROOT = $(CURDIR)/../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
|
|
PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS)
|
|
INSTALL_LOG = build/installed_files.txt
|
|
|
|
.PHONY: build
|
|
build:
|
|
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build
|
|
|
|
.PHONY: install
|
|
install:
|
|
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
|
|
|
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
|
|
setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
|
|
--root="$(DESTDIR)" --force
|
|
|
|
$(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
|
|
$(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(LIBEXEC_BIN)/verify-stream-v2
|
|
rm -f $(DESTDIR)$(LIBEXEC_BIN)/convert-legacy-stream
|
|
if [ -e $(INSTALL_LOG) ]; then \
|
|
cat $(INSTALL_LOG) | xargs -i rm -f $(DESTDIR)/{}; \
|
|
fi
|
|
|
|
.PHONY: test
|
|
test:
|
|
LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore) $(PYTHON) -m unittest discover
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
find . \( -name "*.py[ocd]" -o -name "*~" -o -name "_*.[hc]" \) -delete
|
|
rm -rf build/
|
|
rm -f $(DEPS_RM)
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
|
|
-include $(DEPS_INCLUDE)
|