mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Makefile: Fix uninstall target
Running "make uninstall" does not remove all installed files, a situation which might cause link related issues if xen is re-installed in a different location. In order to make uninstall correctly remove the files it is best the process should be done recursively by mirroring each "install" target with an "uninstall" who removes the installed files. An exception to this rule is uninstalling the files produced by "qemu-xen-dir-remote" and "qemu-xen-traditional-dir", which are external to the project. These projects do not implement an "uninstall" target so the files have to be removed manually. Signed-off-by: Petre Pircalabu <ppircalabu@bitdefender.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
a3a87d27a3
commit
f2b40dabab
74 files changed
+517
-70
No files matched your search
+11
-2
@@ -6,6 +6,7 @@ all: build
|
||||
|
||||
PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
|
||||
PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS)
|
||||
INSTALL_LOG = build/installed_files.txt
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
@@ -16,12 +17,20 @@ install:
|
||||
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
||||
|
||||
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
|
||||
setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
|
||||
--force
|
||||
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:
|
||||
export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); $(PYTHON) test.py -b -u
|
||||
|
||||