Makefile: Fix uninstall target
PATCH 1/1 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.
--- Makefile | 22 +++++++++++-- docs/Makefile | 15 ++++++++- m4/stubdom.m4 | 2 ++ stubdom/Makefile | 31 ++++++++++++++++++ tools/Makefile | 47 +++++++--------------------- tools/Rules.mk | 4 +-- tools/blktap2/Makefile | 4 +-- tools/blktap2/control/Makefile | 10 +++++- tools/blktap2/drivers/Makefile | 5 ++- tools/blktap2/include/Makefile | 2 ++ tools/blktap2/lvm/Makefile | 4 ++- tools/blktap2/vhd/Makefile | 6 +++- tools/blktap2/vhd/lib/Makefile | 8 ++++- tools/console/Makefile | 5 +++ tools/debugger/gdbsx/Makefile | 4 +++ tools/debugger/kdd/Makefile | 4 +++ tools/examples/Makefile | 11 +++++++ tools/firmware/Makefile | 10 ++++++ tools/flask/Makefile | 4 +-- tools/flask/policy/Makefile.common | 5 ++- tools/flask/utils/Makefile | 4 +++ tools/fuzz/Makefile | 4 +-- tools/fuzz/libelf/Makefile | 2 ++ tools/fuzz/x86_instruction_emulator/Makefile | 2 ++ tools/golang/Makefile | 3 ++ tools/golang/xenlight/Makefile | 3 ++ tools/helpers/Makefile | 7 +++++ tools/hotplug/FreeBSD/Makefile | 13 ++++++++ tools/hotplug/Linux/Makefile | 19 +++++++++++ tools/hotplug/Linux/systemd/Makefile | 6 ++++ tools/hotplug/Makefile | 4 +-- tools/hotplug/NetBSD/Makefile | 13 ++++++++ tools/hotplug/common/Makefile | 8 +++++ tools/include/Makefile | 5 +++ tools/libfsimage/Makefile | 4 +-- tools/libfsimage/Rules.mk | 7 +++++ tools/libfsimage/common/Makefile | 9 ++++++ tools/libfsimage/ext2fs-lib/Makefile | 3 ++ tools/libfsimage/ext2fs/Makefile | 3 ++ tools/libfsimage/fat/Makefile | 3 ++ tools/libfsimage/iso9660/Makefile | 3 ++ tools/libfsimage/reiserfs/Makefile | 3 ++ tools/libfsimage/ufs/Makefile | 3 ++ tools/libfsimage/xfs/Makefile | 3 ++ tools/libfsimage/zfs/Makefile | 3 ++ tools/libs/Makefile | 2 +- tools/libs/call/Makefile | 9 ++++++ tools/libs/devicemodel/Makefile | 9 ++++++ tools/libs/evtchn/Makefile | 9 ++++++ tools/libs/foreignmemory/Makefile | 9 ++++++ tools/libs/gnttab/Makefile | 9 ++++++ tools/libs/toollog/Makefile | 9 ++++++ tools/libvchan/Makefile | 9 ++++++ tools/libxc/Makefile | 16 ++++++++++ tools/libxl/Makefile | 14 +++++++++ tools/memshr/Makefile | 4 ++- tools/misc/Makefile | 6 ++++ tools/ocaml/Makefile | 3 ++ tools/ocaml/libs/Makefile | 3 ++ tools/ocaml/test/Makefile | 2 ++ tools/ocaml/xenstored/Makefile | 4 +++ tools/pygrub/Makefile | 15 +++++++-- tools/python/Makefile | 13 ++++++-- tools/tests/Makefile | 4 ++- tools/xcutils/Makefile | 3 ++ tools/xenmon/Makefile | 6 ++++ tools/xenpaging/Makefile | 5 ++- tools/xenpmd/Makefile | 4 +++ tools/xenstat/Makefile | 4 +-- tools/xenstat/libxenstat/Makefile | 24 ++++++++++++++ tools/xenstat/xentop/Makefile | 8 +++-- tools/xenstore/Makefile | 30 ++++++++++++++++++ tools/xentrace/Makefile | 9 ++++++ tools/xl/Makefile | 5 +++ 74 files changed, 517 insertions(+), 70 deletions(-)
Makefile +19 -3
@@ -10,6 +10,7 @@ all: dist SUBSYSTEMS?=xen tools stubdom docs TARGS_DIST=$(patsubst %, dist-%, $(SUBSYSTEMS)) TARGS_INSTALL=$(patsubst %, install-%, $(SUBSYSTEMS)) +TARGS_UNINSTALL=$(patsubst %, uninstall-%, $(SUBSYSTEMS)) TARGS_BUILD=$(patsubst %, build-%, $(SUBSYSTEMS)) TARGS_CLEAN=$(patsubst %, clean-%, $(SUBSYSTEMS)) TARGS_DISTCLEAN=$(patsubst %, distclean-%, $(SUBSYSTEMS))
@@ -303,11 +304,26 @@ help: @echo ' [ this documentation is sadly not complete ]' # Use this target with extreme care! + +.PHONY: uninstall-xen +uninstall-xen: + $(MAKE) -C xen uninstall + +.PHONY: uninstall-tools +uninstall-tools: + $(MAKE) -C tools uninstall + +.PHONY: uninstall-stubdom +uninstall-stubdom: + $(MAKE) -C stubdom uninstall + +.PHONY: uninstall-docs +uninstall-docs: + $(MAKE) -C docs uninstall + .PHONY: uninstall uninstall: D=$(DESTDIR) -uninstall: - $(MAKE) -C xen uninstall - make -C tools uninstall +uninstall: uninstall-tools-public-headers $(TARGS_UNINSTALL) rm -rf $(D)/boot/tboot* .PHONY: xenversion
docs/Makefile +14 -1
@@ -92,7 +92,7 @@ distclean: clean # Top level install targets -.PHONY: man-pages install-man-pages clean-man-pages +.PHONY: man-pages install-man-pages clean-man-pages uninstall-man-pages # Metarules for generating manpages. Run with $(1) substitued for section define GENERATE_MANPAGE_RULES
@@ -165,10 +165,16 @@ install-man$(1)-pages: man$(1)-pages clean-man$(1)-pages: rm -rf man$(1) +# Uninstall +.PHONY: uninstall-man$(1)-pages +uninstall-man$(1)-pages: + rm -f $(addprefix $(DESTDIR)$(mandir)/man$(1)/, $(filter-out %.pod.$(1) %.markdown.$(1), $(notdir $(DOC_MAN$(1))))) + # Link buld/install/clean to toplevel rules man-pages: man$(1)-pages install-man-pages: install-man$(1)-pages clean-man-pages: clean-man$(1)-pages +uninstall-man-pages: uninstall-man$(1)-pages endef
@@ -183,6 +189,13 @@ install-html: html txt figs .PHONY: install install: install-man-pages install-html +.PHONY: uninstall-html +uninstall-html: + rm -rf $(DESTDIR)$(docdir) + +.PHONY: uninstall +uninstall: uninstall-man-pages uninstall-html + # Individual file build targets html/index.html: $(DOC_HTML) $(CURDIR)/gen-html-index INDEX $(PERL) -w -- $(CURDIR)/gen-html-index -i INDEX html $(DOC_HTML)
m4/stubdom.m4 +2 -0
@@ -46,6 +46,7 @@ $2=y STUBDOM_TARGETS="$STUBDOM_TARGETS $2" STUBDOM_BUILD="$STUBDOM_BUILD $1" STUBDOM_INSTALL="$STUBDOM_INSTALL install-$2" +STUBDOM_UNINSTALL="$STUBDOM_UNINSTALL install-$2" ]) AC_DEFUN([AX_DISABLE_STUBDOM], [
@@ -67,6 +68,7 @@ AC_DEFUN([AX_STUBDOM_FINISH], [ AC_SUBST(STUBDOM_TARGETS) AC_SUBST(STUBDOM_BUILD) AC_SUBST(STUBDOM_INSTALL) +AC_SUBST(STUBDOM_UNINSTALL) echo "Will build the following stub domains:" for x in $STUBDOM_BUILD; do echo " $x"
stubdom/Makefile +31 -0
@@ -606,6 +606,37 @@ install-vtpmmgr: vtpmmgr-stubdom $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)" $(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpmmgr/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpmmgr-stubdom.gz" +########### +# uninstall +########### + +ifeq (x$(STUBDOM_UNINSTALL),x) +STUBDOM_UNINSTALL=$(patsubst install-%,uninstall-%,$(STUBDOM_INSTALL)) +endif + +ifeq ($(STUBDOM_SUPPORTED),1) +uninstall: $(STUBDOM_UNINSTALL) +else +uninstall: +endif + +uninstall-ioemu: + rm -f $(DESTDIR)$(LIBEXEC_BIN)/stubdom-dm + rm -f $(DESTDIR)$(LIBEXEC_BIN)/stubdompath.sh + rm -f $(DESTDIR)$(XENFIRMWAREDIR)/ioemu-stubdom.gz + +uninstall-grub: + rm -f $(DESTDIR)$(XENFIRMWAREDIR)/pv-grub-$(XEN_TARGET_ARCH).gz + +uninstall-xenstore: + rm -f $(DESTDIR)$(XENFIRMWAREDIR)/xenstore-stubdom.gz + +uninstall-vtpm: + rm -f $(DESTDIR)$(XENFIRMWAREDIR)/vtpm-stubdom.gz + +uninstall-vtpmmgr: + rm -f $(DESTDIR)$(XENFIRMWAREDIR)/vtpmmgr-stubdom.gz + ####### # clean #######
tools/Makefile +12 -35
79 lines not on this page · raw message
tools/Rules.mk +2 -2
@@ -233,12 +233,12 @@ headers.chk: done >[email protected] mv [email protected] $@ -subdirs-all subdirs-clean subdirs-install subdirs-distclean: .phony +subdirs-all subdirs-clean subdirs-install subdirs-distclean subdirs-uninstall: .phony @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \ $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \ done -subdir-all-% subdir-clean-% subdir-install-%: .phony +subdir-all-% subdir-clean-% subdir-install-% subdir-uninstall-%: .phony $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@) subdir-distclean-%: .phony
tools/blktap2/Makefile +2 -2
@@ -16,5 +16,5 @@ clean: distclean: clean -.PHONY: all clean install distclean -all clean install distclean: %: subdirs-% +.PHONY: all clean install distclean uninstall +all clean install distclean uninstall: %: subdirs-%
tools/blktap2/control/Makefile +9 -1
@@ -92,8 +92,16 @@ clean: rm -f *~ rm -f xenblktapctl.pc +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenblktapctl.pc + rm -f $(DESTDIR)$(libdir)/$(LIBSONAME) + rm -f $(DESTDIR)$(libdir)/$(LIBNAME).so + rm -f $(addprefix $(DESTDIR)$(libdir)/, $(LIB_SHARED)) + rm -f $(addprefix $(DESTDIR)$(libdir)/, $(LIB_STATIC)) + rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(IBIN)) + distclean: clean -.PHONY: all build clean distclean install +.PHONY: all build clean distclean install uninstall -include $(DEPS)
tools/blktap2/drivers/Makefile +4 -1
@@ -105,9 +105,12 @@ install: all $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR) $(INSTALL_PROG) $(IBIN) $(LOCK_UTIL) $(QCOW_UTIL) $(DESTDIR)$(INST_DIR) +uninstall: + rm -f $(addprefix $(DESTDIR)$(INST_DIR)/, $(IBIN) $(LOCK_UTIL) $(QCOW_UTIL)) + clean: rm -rf .*.d *.o *~ xen TAGS $(IBIN) $(LIB) $(LOCK_UTIL) $(QCOW_UTIL) distclean: clean -.PHONY: clean install distclean +.PHONY: clean install distclean uninstall
tools/blktap2/include/Makefile +2 -0
@@ -8,6 +8,8 @@ all: install: $(INSTALL_DIR) -p $(DESTDIR)$(includedir) +.PHONY: uninstall +.uninstall: .PHONY: clean clean:
tools/blktap2/lvm/Makefile +3 -1
@@ -23,6 +23,8 @@ build: $(TEST) $(LVM-OBJS) install: all +uninstall: + lvm-util: lvm-util.o $(CC) -DLVM_UTIL $(LDFLAGS) -o lvm-util lvm-util.c
@@ -31,6 +33,6 @@ clean: distclean: clean -.PHONY: all build clean distclean install lvm-util +.PHONY: all build clean distclean install lvm-util uninstall -include $(DEPS)
tools/blktap2/vhd/Makefile +5 -1
@@ -41,11 +41,15 @@ install: all $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR) $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INST_DIR) +uninstall: + $(MAKE) subdirs-uninstall + rm -f $(addprefix $(DESTDIR)$(INST_DIR)/, $(IBIN)) + clean: subdirs-clean rm -rf *.o *~ $(DEPS) $(IBIN) distclean: clean -.PHONY: all build clean distclean install vhd-util vhd-update +.PHONY: all build clean distclean install uninstall vhd-util vhd-update -include $(DEPS)
tools/blktap2/vhd/lib/Makefile +7 -1
@@ -72,11 +72,17 @@ install: all ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR) ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so +uninstall: + rm -f $(DESTDIR)$(INST-DIR)/libvhd.so + rm -f $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR) + rm -f $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) + rm -f $(DESTDIR)$(INST-DIR)/libvhd.a + clean: rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD) distclean: clean -.PHONY: all build clean distclean install libvhd +.PHONY: all build clean distclean install libvhd uninstall -include $(DEPS)
tools/console/Makefile +5 -0
@@ -49,4 +49,9 @@ install: $(BIN) $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(LIBEXEC_BIN)/xenconsole + rm -f $(DESTDIR)$(sbindir)/xenconsoled + -include $(DEPS)
tools/debugger/gdbsx/Makefile +4 -0
@@ -21,6 +21,10 @@ install: all [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(INSTALL_PROG) gdbsx $(DESTDIR)$(sbindir)/gdbsx +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/gdbsx + gdbsx: gx/gx_all.a xg/xg_all.a $(CC) -o $@ $^
tools/debugger/kdd/Makefile +4 -0
@@ -25,3 +25,7 @@ distclean: clean install: all [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(INSTALL_PROG) kdd $(DESTDIR)$(sbindir)/kdd + +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/kdd
tools/examples/Makefile +11 -0
@@ -21,6 +21,9 @@ build: .PHONY: install install: all install-readmes install-configs +.PHONY: uninstall +uninstall: uninstall-readmes uninstall-configs + .PHONY: install-readmes install-readmes: [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
@@ -30,6 +33,10 @@ install-readmes: $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \ done +.PHONY: uninstall-readmes +uninstall-readmes: + rm -f $(addprefix $(DESTDIR)$(XEN_CONFIG_DIR)/, $(XEN_READMES)) + .PHONY: install-configs install-configs: $(XEN_CONFIGS) [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
@@ -41,6 +48,10 @@ install-configs: $(XEN_CONFIGS) $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \ done +.PHONY: uninstall-configs +uninstall-configs: + rm -f $(addprefix $(DESTDIR)$(XEN_CONFIG_DIR)/, $(XEN_CONFIGS)) + .PHONY: clean clean:
tools/firmware/Makefile +10 -0
@@ -49,6 +49,16 @@ ifeq ($(CONFIG_OVMF),y) $(INSTALL_DATA) ovmf-dir/ovmf.bin $(INST_DIR)/ovmf.bin endif +.PHONY: uninstall +uninstall: + rm -f $(addprefix $(INST_DIR)/, $(notdir $(TARGET))) +ifeq ($(CONFIG_SEABIOS),y) + rm -f $(INST_DIR)/seabios.bin +endif +ifeq ($(CONFIG_OVMF),y) + rm -f $(INST_DIR)/ovmf.bin +endif + .PHONY: clean clean: subdirs-clean
tools/flask/Makefile +2 -2
@@ -4,6 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk SUBDIRS-y := utils SUBDIRS-$(FLASK_POLICY) += policy -.PHONY: all clean install distclean -all clean install distclean: %: subdirs-% +.PHONY: all clean install distclean uninstall +all clean install distclean uninstall: %: subdirs-%
tools/flask/policy/Makefile.common +4 -1
@@ -118,6 +118,9 @@ install: $(POLICY_FILENAME) $(INSTALL_DIR) $(DESTDIR)/$(POLICY_LOADPATH) $(INSTALL_DATA) $^ $(DESTDIR)/$(POLICY_LOADPATH) +uninstall: + rm -f $(DESTDIR)/$(POLICY_LOADPATH)/$(POLICY_FILENAME) + $(POLICY_FILENAME): $(FLASK_BUILD_DIR)/policy.conf $(CHECKPOLICY) $(CHECKPOLICY_PARAM) $^ -o $@
@@ -129,4 +132,4 @@ clean: distclean: clean -.PHONY: all install clean distclean +.PHONY: all install clean distclean uninstall
tools/flask/utils/Makefile +4 -0
@@ -55,4 +55,8 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(sbindir) +.PHONY: uninstall +uninstall: + rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(CLIENTS)) + -include $(DEPS)
tools/fuzz/Makefile +2 -2
@@ -5,5 +5,5 @@ SUBDIRS-y := SUBDIRS-y += libelf SUBDIRS-y += x86_instruction_emulator -.PHONY: all clean distclean install -all clean distclean install: %: subdirs-% +.PHONY: all clean distclean install uninstall +all clean distclean install uninstall: %: subdirs-%
tools/fuzz/libelf/Makefile +2 -0
@@ -36,5 +36,7 @@ clean: .PHONY: install install: all +.PHONY: uninstall + .PHONY: afl afl: afl-libelf-fuzzer
tools/fuzz/x86_instruction_emulator/Makefile +2 -0
@@ -51,5 +51,7 @@ clean: .PHONY: install install: all +.PHONY: uninstall + .PHONY: afl afl: afl-harness
tools/golang/Makefile +3 -0
@@ -19,6 +19,9 @@ all build: subdirs-all .PHONY: install install: subdirs-install +.PHONY: uninstall +uninstall: subdirs-uninstall + .PHONY: clean clean: subdirs-clean $(RM) -r src pkg
tools/golang/xenlight/Makefile +3 -0
@@ -38,6 +38,9 @@ install: build $(INSTALL_DIR) $(DESTDIR)$(GOXL_INSTALL_DIR) $(INSTALL_DATA) $(XEN_GOPATH)$(GOXL_PKG_DIR)$(PKGSOURCES) $(DESTDIR)$(GOXL_INSTALL_DIR) +.PHONY: uninstall + rm -f $(addprefix $(DESTDIR)$(GOXL_INSTALL_DIR)/, $(PKGSOURCES)) + .PHONY: clean clean: $(RM) -r $(XEN_GOPATH)$(GOXL_PKG_DIR)
tools/helpers/Makefile +7 -0
@@ -41,6 +41,13 @@ ifeq ($(CONFIG_Linux),y) $(INSTALL_PROG) init-xenstore-domain $(DESTDIR)$(LIBEXEC_BIN) endif +.PHONY: uninstall +uninstall: +ifeq ($(CONFIG_Linux),y) + rm -f $(DESTDIR)$(LIBEXEC_BIN)/init-xenstore-domain +endif + rm -f $(DESTDIR)$(LIBEXEC_BIN)/xen-init-dom0 + .PHONY: clean clean: $(RM) -f *.o $(PROGS) $(DEPS) _paths.h
tools/hotplug/FreeBSD/Makefile +13 -0
@@ -17,6 +17,9 @@ build: .PHONY: install install: install-scripts install-rcd +.PHONY: uninstall +uninstall: uninstall-script uninstall-rcd + .PHONY: install-scripts install-scripts: $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
@@ -29,6 +32,11 @@ install-scripts: $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ done +.PHONY: uninstall-scripts +uninstall-scripts: + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPTS)) + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA)) + .PHONY: install-rcd install-rcd: $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
@@ -38,6 +46,11 @@ install-rcd: done $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(XEN_SCRIPT_DIR) +.PHONY: uninstall-rcd +uninstall-rcd: + rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XEN_RCD_PROG)) + rm -f $(DESTDIR)$(XEN_SCRIPT_DIR)/hotplugpath.sh + .PHONY: clean clean:
tools/hotplug/Linux/Makefile +19 -0
@@ -47,6 +47,9 @@ build: .PHONY: install install: install-initd install-scripts subdirs-install +.PHONY: uninstall +uninstall: uninstall-initd uninstall-scripts subdirs-uninstall + # See docs/misc/distro_mapping.txt for INITD_DIR location .PHONY: install-initd install-initd:
@@ -61,6 +64,17 @@ install-initd: $(INSTALL_PROG) $(XENDRIVERDOMAIN_INITD) $(DESTDIR)$(INITD_DIR) $(INSTALL_PROG) init.d/xen-watchdog $(DESTDIR)$(INITD_DIR) +.PHONY: uninstall-initd +uninstall-initd: + rm -f $(DESTDIR)$(INITD_DIR)/xen-watchdog + rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENDRIVERDOMAIN_INITD)) + rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENDRIVERDOMAIN_INITD)) + rm -f $(addprefix $(DESTDIR)$(SYSCONFIG_DIR)/xencommons/, $(XENCOMMONS_SYSCONFIG)) + rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENCOMMONS_INITD)) + rm -f $(addprefix $(DESTDIR)$(SYSCONFIG_DIR)/xendomains/, $(XENDOMAINS_SYSCONFIG)) + rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENDOMAINS_INITD)) + rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(XENDOMAINS_LIBEXEC)) + .PHONY: install-scripts install-scripts: [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
@@ -74,6 +88,11 @@ install-scripts: $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ done +.PHONY: uninstall-scripts +uninstall-scripts: + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPTS)) + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA)) + .PHONY: clean clean: subdirs-clean
tools/hotplug/Linux/systemd/Makefile +6 -0
@@ -38,6 +38,12 @@ install: $(ALL_XEN_SYSTEMD) $(INSTALL_DATA) *.mount $(DESTDIR)$(XEN_SYSTEMD_DIR) $(INSTALL_DATA) *.conf $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD)/*.conf + rm -f $(DESTDIR)$(XEN_SYSTEMD_DIR)/*.mount + rm -f $(DESTDIR)$(XEN_SYSTEMD_DIR)/*.service + $(XEN_SYSTEMD_MODULES): rm -f [email protected] for mod in $(LINUX_BACKEND_MODULES) ; do \
tools/hotplug/Makefile +2 -2
@@ -6,5 +6,5 @@ SUBDIRS-$(CONFIG_NetBSD) += NetBSD SUBDIRS-$(CONFIG_Linux) += Linux SUBDIRS-$(CONFIG_FreeBSD) += FreeBSD -.PHONY: all clean install distclean -all clean install distclean: %: subdirs-% +.PHONY: all clean install distclean uninstall +all clean install distclean uninstall: %: subdirs-%
tools/hotplug/NetBSD/Makefile +13 -0
@@ -19,6 +19,9 @@ build: .PHONY: install install: install-scripts install-rcd +.PHONY: uninstall +uninstall: uninstall-scripts uninstall-rcd + .PHONY: install-scripts install-scripts: $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
@@ -31,6 +34,11 @@ install-scripts: $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ done +.PHONY: uninstall-scripts +uninstall-scripts: + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPTS)) + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA)) + .PHONY: install-rcd install-rcd: $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
@@ -40,6 +48,11 @@ install-rcd: done $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh +.PHONY: uninstall-rcd +uninstall-rcd: + rm -f $(subst rc.d,$(DESTDIR)$(INITD_DIR),$(XEN_RCD_PROG)) + rm -f $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh + .PHONY: clean clean:
tools/hotplug/common/Makefile +8 -0
@@ -21,6 +21,9 @@ build: $(HOTPLUGPATH) .PHONY: install install: install-scripts +.PHONY: uninstall +uninstall: uninstall-scripts + .PHONY: install-scripts install-scripts: build [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
@@ -34,6 +37,11 @@ install-scripts: build $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ done +.PHONY: uninstall-scripts +uninstall-scripts: + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPTS)) + rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA)) + .PHONY: clean clean: rm -f $(HOTPLUGPATH)
tools/include/Makefile +5 -0
@@ -58,6 +58,11 @@ install: all $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(includedir)/xen/xsm +.PHONY: uninstall +uninstall: + echo "[FIXME] uninstall headers" + rm -rf $(DESTDIR)$(includedir)/xen + .PHONY: clean clean: rm -rf xen xen-xsm acpi
tools/libfsimage/Makefile +2 -2
@@ -9,8 +9,8 @@ else SUBDIRS-y += ext2fs endif -.PHONY: all clean install -all clean install: %: subdirs-% +.PHONY: all clean install uninstall +all clean install uninstall: %: subdirs-% .PHONY: distclean distclean: clean
tools/libfsimage/Rules.mk +7 -0
@@ -18,6 +18,13 @@ fs-install: fs-all $(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS) $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS) +.PHONY: fs-uninstall +fs-uninstall: + rm -f $(addprefix $(DESTDIR)$(FSDIR)/$(FS)/, $(FSLIB)) + if [ -d $(DESTDIR)$(FSDIR)/$(FS) ]; then \ + rmdir $(DESTDIR)$(FSDIR)/$(FS); \ + fi + $(FSLIB): $(PIC_OBJS) $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) $(APPEND_LDFLAGS)
tools/libfsimage/common/Makefile +9 -0
@@ -31,6 +31,15 @@ install: all $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir) $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(includedir)/fsimage_grub.h + rm -f $(DESTDIR)$(includedir)/fsimage_plugin.h + rm -f $(DESTDIR)$(includedir)/fsimage.h + rm -f $(DESTDIR)$(libdir)/libfsimage.so + rm -f $(DESTDIR)$(libdir)/libfsimage.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libfsimage.so.$(MAJOR).$(MINOR) + clean distclean:: rm -f $(LIB)
tools/libfsimage/ext2fs-lib/Makefile +3 -0
@@ -15,4 +15,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/ext2fs/Makefile +3 -0
@@ -10,4 +10,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/fat/Makefile +3 -0
@@ -10,4 +10,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/iso9660/Makefile +3 -0
@@ -10,6 +10,9 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + fsys_iso9660.c: iso9660.h include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/reiserfs/Makefile +3 -0
@@ -10,4 +10,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/ufs/Makefile +3 -0
@@ -10,4 +10,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/xfs/Makefile +3 -0
@@ -10,4 +10,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libfsimage/zfs/Makefile +3 -0
@@ -34,4 +34,7 @@ all: fs-all .PHONY: install install: fs-install +.PHONY: uninstall +uninstall: fs-uninstall + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
tools/libs/Makefile +1 -1
@@ -9,4 +9,4 @@ SUBDIRS-y += call SUBDIRS-y += foreignmemory SUBDIRS-y += devicemodel -all clean install distclean: %: subdirs-% +all clean install distclean uninstall: %: subdirs-%
tools/libs/call/Makefile +9 -0
@@ -75,6 +75,15 @@ install: build $(INSTALL_DATA) include/xencall.h $(DESTDIR)$(includedir) $(INSTALL_DATA) xencall.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xencall.pc + rm -f $(DESTDIR)$(includedir)/xencall.h + rm -f $(DESTDIR)$(libdir)/libxencall.so + rm -f $(DESTDIR)$(libdir)/libxencall.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxencall.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxencall.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libs/devicemodel/Makefile +9 -0
@@ -76,6 +76,15 @@ install: build $(INSTALL_DATA) include/xendevicemodel.h $(DESTDIR)$(includedir) $(INSTALL_DATA) xendevicemodel.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xendevicemodel.pc + rm -f $(DESTDIR)$(includedir)/xendevicemodel.h + rm -f $(DESTDIR)$(libdir)/libxendevicemodel.so + rm -f $(DESTDIR)$(libdir)/libxendevicemodel.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxendevicemodel.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxendevicemodel.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libs/evtchn/Makefile +9 -0
@@ -74,6 +74,15 @@ install: build $(INSTALL_DATA) include/xenevtchn.h $(DESTDIR)$(includedir) $(INSTALL_DATA) xenevtchn.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenevtchn.pc + rm -f $(DESTDIR)$(includedir)/xenevtchn.h + rm -f $(DESTDIR)$(libdir)/libxenevtchn.so + rm -f $(DESTDIR)$(libdir)/libxenevtchn.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenevtchn.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxenevtchn.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libs/foreignmemory/Makefile +9 -0
@@ -75,6 +75,15 @@ install: build $(INSTALL_DATA) include/xenforeignmemory.h $(DESTDIR)$(includedir) $(INSTALL_DATA) xenforeignmemory.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenforeignmemory.pc + rm -f $(DESTDIR)$(includedir)/xenforeignmemory.h + rm -f $(DESTDIR)$(libdir)/libxenforeignmemory.so + rm -f $(DESTDIR)$(libdir)/libxenforeignmemory.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenforeignmemory.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxenforeignmemory.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libs/gnttab/Makefile +9 -0
@@ -77,6 +77,15 @@ install: build $(INSTALL_DATA) include/xengnttab.h $(DESTDIR)$(includedir) $(INSTALL_DATA) xengnttab.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xengnttab.pc + rm -f $(DESTDIR)$(includedir)/xengnttab.h + rm -f $(DESTDIR)$(libdir)/libxengnttab.so + rm -f $(DESTDIR)$(libdir)/libxengnttab.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxengnttab.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxengnttab.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libs/toollog/Makefile +9 -0
@@ -69,6 +69,15 @@ install: build $(INSTALL_DATA) include/xentoollog.h $(DESTDIR)$(includedir) $(INSTALL_DATA) xentoollog.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uinstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xentoollog.pc + rm -f $(DESTDIR)$(includedir)/xentoollog.h + rm -f $(DESTDIR)$(libdir)/libxentoollog.so + rm -f $(DESTDIR)$(libdir)/libxentoollog.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxentoollog.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxentoollog.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libvchan/Makefile +9 -0
@@ -70,6 +70,15 @@ install: all $(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(libdir) $(INSTALL_DATA) xenvchan.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenvchan.pc + rm -f $(DESTDIR)$(libdir)/libxenvchan.a + rm -f $(DESTDIR)$(includedir)/libxenvchan.h + rm -f $(DESTDIR)$(libdir)/libxenvchan.so + rm -f $(DESTDIR)$(libdir)/libxenvchan.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenvchan.so.$(MAJOR).$(MINOR) + .PHONY: clean clean: $(RM) -f *.o *.opic *.so* *.a vchan-node1 vchan-node2 $(DEPS)
tools/libxc/Makefile +16 -0
@@ -203,6 +203,22 @@ install: build $(INSTALL_DATA) xencontrol.pc $(DESTDIR)$(PKG_INSTALLDIR) $(INSTALL_DATA) xenguest.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenguest.pc + rm -f $(DESTDIR)$(includedir)/xenguest.h + rm -f $(DESTDIR)$(libdir)/libxenguest.so + rm -f $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxenguest.a + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xencontrol.pc + rm -f $(DESTDIR)$(includedir)/xenctrl.h + rm -f $(DESTDIR)$(includedir)/xenctrl_compat.h + rm -f $(DESTDIR)$(libdir)/libxenctrl.so + rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxenctrl.a + .PHONY: TAGS TAGS: etags -t *.c *.h
tools/libxl/Makefile +14 -0
@@ -327,6 +327,20 @@ install: all $(INSTALL_DATA) xenlight.pc $(DESTDIR)$(PKG_INSTALLDIR) $(INSTALL_DATA) xlutil.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(addprefix $(DESTDIR)$(PKG_INSTALLDIR)/,xlutil.pc xenlight.pc) + rm -f $(addprefix $(DESTDIR)$(includedir)/,libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h) + rm -f $(DESTDIR)$(libdir)/libxlutil.a + rm -f $(DESTDIR)$(libdir)/libxlutil.so + rm -f $(DESTDIR)$(libdir)/libxlutil.so.$(XLUMAJOR) + rm -f $(DESTDIR)$(libdir)/libxlutil.so.$(XLUMAJOR).$(XLUMINOR) + rm -f $(DESTDIR)$(libdir)/libxenlight.a + rm -f $(DESTDIR)$(libdir)/libxenlight.so + rm -f $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(LIBEXEC_BIN)/libxl-save-helper + .PHONY: clean clean: $(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
tools/memshr/Makefile +3 -1
@@ -36,12 +36,14 @@ libmemshr.a: $(LIB-OBJS) install: all +uninstall: + clean: rm -rf *.a *.o *~ $(DEPS) .PHONY: distclean distclean: clean -.PHONY: all build clean install distclean +.PHONY: all build clean install distclean uninstall -include $(DEPS)
tools/misc/Makefile +6 -0
@@ -62,6 +62,12 @@ install: build $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(sbindir) $(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN) +.PHONY: uninstall +uninstall: + rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(INSTALL_PRIVBIN)) + rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(INSTALL_SBIN)) + rm -f $(addprefix $(DESTDIR)$(bindir)/, $(INSTALL_BIN)) + .PHONY: clean clean: $(RM) *.o $(TARGETS_BUILD) *~ $(DEPS)
tools/ocaml/Makefile +3 -0
@@ -18,6 +18,9 @@ all: subdirs-all .PHONY: install install: subdirs-install +.PHONY: uninstall +uninstall: subdirs-uninstall + .PHONY: clean clean: subdirs-clean
tools/ocaml/libs/Makefile +3 -0
@@ -13,6 +13,9 @@ all: subdirs-all .PHONY: install install: subdirs-install +.PHONY: uninstall +uninstall: subdirs-uninstall + .PHONY: clean clean: subdirs-clean
tools/ocaml/test/Makefile +2 -0
@@ -50,4 +50,6 @@ bins: $(PROGRAMS) install: +uninstall: + include $(OCAML_TOPLEVEL)/Makefile.rules
tools/ocaml/xenstored/Makefile +4 -0
@@ -90,6 +90,10 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) $(INSTALL_DATA) oxenstored.conf $(DESTDIR)$(XEN_CONFIG_DIR) +uninstall: + rm -f $(DESTDIR)$(XEN_CONFIG_DIR)/oxenstored.conf + rm -f $(DESTDIR)$(sbindir)/oxenstored + include $(OCAML_TOPLEVEL)/Makefile.rules genpath-target = $(call buildmakevars2module,paths.ml)
tools/pygrub/Makefile +12 -3
@@ -4,6 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS) +INSTALL_LOG = build/installed_files.txt .PHONY: all all: build
@@ -13,18 +14,26 @@ build: .PHONY: install install: all + $(INSTALL_DIR) $(DESTDIR)/$(bindir) CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ - setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ - --install-scripts=$(LIBEXEC_BIN) --force + setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ + --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ "`readlink -f $(DESTDIR)/$(bindir)`" != \ "`readlink -f $(LIBEXEC_BIN)`" ]; then \ ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \ fi +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)/$(bindir)/pygrub + if [ -e $(INSTALL_LOG) ]; then \ + cat $(INSTALL_LOG) | xargs -i rm -f $(DESTDIR)/{}; \ + fi + .PHONY: clean clean: - rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out $(DEPS) + rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out $(INSTALL_LOG) $(DEPS) .PHONY: distclean distclean: clean
tools/python/Makefile +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
tools/tests/Makefile +3 -1
@@ -14,7 +14,9 @@ SUBDIRS-$(CONFIG_X86) += x86_emulator SUBDIRS-y += xen-access SUBDIRS-y += xenstore -.PHONY: all clean install distclean +.PHONY: all clean install distclean uninstall all clean distclean: %: subdirs-% install: + +uninstall:
tools/xcutils/Makefile +3 -0
@@ -36,6 +36,9 @@ install: build $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(LIBEXEC_BIN) +.PHONY: uninstall +uninstall: + rm -f $(addprefix $(DESTDIR)$(LIBEXECDIR)/, $(PROGRAMS)) .PHONY: clean clean:
tools/xenmon/Makefile +6 -0
@@ -34,6 +34,12 @@ install: build $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(sbindir)/xentrace_setmask $(INSTALL_PROG) xenmon.py $(DESTDIR)$(sbindir)/xenmon.py +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/xenbaked + rm -f $(DESTDIR)$(sbindir)/xentrace_setmask + rm -f $(DESTDIR)$(sbindir)/xenmon.py + .PHONY: clean clean: $(RM) -f $(DEPS)
tools/xenpaging/Makefile +4 -1
@@ -28,12 +28,15 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(LIBEXEC_BIN) +uninstall: + rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(IBINS)) + clean: rm -f *.o *~ $(DEPS) xen TAGS $(IBINS) $(LIB) distclean: clean -.PHONY: clean install distclean +.PHONY: clean install distclean uninstall .PHONY: TAGS TAGS:
tools/xenpmd/Makefile +4 -0
@@ -21,6 +21,10 @@ clean: .PHONY: distclean distclean: clean +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/xenpmd + xenpmd: xenpmd.o Makefile $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
tools/xenstat/Makefile +2 -2
@@ -5,6 +5,6 @@ SUBDIRS := SUBDIRS += libxenstat SUBDIRS += xentop -.PHONY: all install clean distclean +.PHONY: all install clean distclean uninstall -all install clean distclean: %: subdirs-% +all install clean distclean uninstall: %: subdirs-%
tools/xenstat/libxenstat/Makefile +24 -0
@@ -81,6 +81,15 @@ install: all ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenstat.so $(INSTALL_DATA) xenstat.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenstat.pc + rm -f $(DESTDIR)$(libdir)/libxenstat.so + rm -f $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR).$(MINOR) + rm -f $(DESTDIR)$(libdir)/libxenstat.a + rm -f $(DESTDIR)$(includedir)/xenstat.h + PYLIB=bindings/swig/python/_xenstat.so PYMOD=bindings/swig/python/xenstat.py PYSRC=bindings/swig/python/_xenstat.c
@@ -97,6 +106,9 @@ all-bindings: perl-bindings python-bindings # The install-bindings target installs all the language bindings install-bindings: install-perl-bindings install-python-bindings +.PHONY: uninstall-bindings +uninstall-bindings: uninstall-perl-bindings uninstall-python-bindings + $(BINDINGS): $(SHLIB) $(SHLIB_LINKS) src/xenstat.h SWIG_FLAGS=-module xenstat -Isrc
@@ -118,10 +130,16 @@ install-python-bindings: $(PYLIB) $(PYMOD) $(INSTALL_PROG) $(PYLIB) $(DESTDIR)$(pythonlibdir)/_xenstat.so $(INSTALL_PROG) $(PYMOD) $(DESTDIR)$(pythonlibdir)/xenstat.py +.PHONY: uninstall-python-bindings +uninstall-python-bindings: + rm -f $(DESTDIR)$(pythonlibdir)/_xenstat.so + rm -f $(DESTDIR)$(pythonlibdir)/xenstat.py + ifeq ($(XENSTAT_PYTHON_BINDINGS),y) .PHONY: all all: python-bindings install: install-python-bindings +uninstall: uninstall-python-bindings endif # Perl bindings
@@ -143,12 +161,18 @@ install-perl-bindings: $(PERLLIB) $(PERLMOD) $(INSTALL_PROG) $(PERLLIB) $(DESTDIR)$(perllibdir)/xenstat.so $(INSTALL_PROG) $(PERLMOD) $(DESTDIR)$(perlmoddir)/xenstat.pm +.PHONY: uninstall-perl-bindings +uninstall-perl-bindings: + rm -f $(DESTDIR)$(perllibdir)/xenstat.so + rm -f $(DESTDIR)$(perlmoddir)/xenstat.pm + ifeq ($(XENSTAT_PERL_BINDINGS),y) .PHONY: all all: perl-bindings .PHONY: install install: install-perl-bindings +uninstall: uninstall-perl-bindings endif .PHONY: clean
tools/xenstat/xentop/Makefile +6 -2
@@ -14,8 +14,8 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk ifneq ($(XENSTAT_XENTOP),y) -.PHONY: all install xentop -all install xentop: +.PHONY: all install xentop uninstall +all install xentop uninstall: else CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat)
@@ -34,6 +34,10 @@ install: xentop $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/xentop + endif .PHONY: clean
tools/xenstore/Makefile +30 -0
@@ -173,6 +173,36 @@ endif ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(includedir)/xs_lib.h $(INSTALL_DATA) xenstore.pc $(DESTDIR)$(PKG_INSTALLDIR) +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xenstore.pc + rm -f $(DESTDIR)$(includedir)/xs_lib.h + rm -f $(DESTDIR)$(includedir)/xs.h + rm -f $(DESTDIR)$(includedir)/xenstore-compat/xs_lib.h + rm -f $(DESTDIR)$(includedir)/xenstore-compat/xs.h + rm -f $(DESTDIR)$(includedir)/xenstore_lib.h + rm -f $(DESTDIR)$(includedir)/xenstore.h + rm -f $(DESTDIR)$(libdir)/libxenstore.a + rm -f $(DESTDIR)$(libdir)/libxenstore.so + rm -f $(DESTDIR)$(libdir)/libxenstore.so.$(MAJOR) + rm -f $(DESTDIR)$(libdir)/libxenstore.so.$(MAJOR).$(MINOR) + rm -f $(addprefix $(DESTDIR)$(bindir)/, $(CLIENTS)) + rm -f $(DESTDIR)$(bindir)/xenstore + rm -f $(DESTDIR)$(bindir)/xenstore-control +ifeq ($(XENSTORE_XENSTORED),y) + rm -f $(DESTDIR)$(sbindir)/xenstored + if [ -d $(DESTDIR)$(XEN_LIB_STORED) ]; then \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)$(XEN_LIB_STORED); \ + fi +endif + if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat; \ + fi + +.PHONY: clients-uninstall +clients-uninstall: + rm -f $(addprefix $(DESTDIR)$(bindir)/, $(CLIENTS)) + .PHONY: clients-install clients-install: clients $(INSTALL_DIR) $(DESTDIR)$(bindir)
tools/xentrace/Makefile +9 -0
@@ -33,6 +33,15 @@ endif $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir) [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) +.PHONY: uninstall +uninstall: + rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN)) + rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS)) + rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN)) +ifneq ($(BIN),) + rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN)) +endif + .PHONY: clean clean: $(RM) *.a *.so *.o *.rpm $(BIN) $(SBIN) $(LIBBIN) $(DEPS)
tools/xl/Makefile +5 -0
@@ -44,6 +44,11 @@ install: all $(INSTALL_PROG) xl $(DESTDIR)$(sbindir) $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh + rm -f $(DESTDIR)$(sbindir)/xl + .PHONY: clean clean: $(RM) -f *.o xl _paths.h $(DEPS)
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 7 lines · Petre Pircalabu
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.
Quoted 6 lines
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 <[email protected]>
AFAICT this patch adds a bunch of uninstall targets, which shouldn't break existing code.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel