]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
Makefile: Fix uninstall target
authorPetre Pircalabu <ppircalabu@bitdefender.com>
Thu, 27 Jul 2017 17:08:27 +0000 (20:08 +0300)
committerWei Liu <wei.liu2@citrix.com>
Fri, 28 Jul 2017 16:47:42 +0000 (17:47 +0100)
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>
74 files changed:
Makefile
docs/Makefile
m4/stubdom.m4
stubdom/Makefile
tools/Makefile
tools/Rules.mk
tools/blktap2/Makefile
tools/blktap2/control/Makefile
tools/blktap2/drivers/Makefile
tools/blktap2/include/Makefile
tools/blktap2/lvm/Makefile
tools/blktap2/vhd/Makefile
tools/blktap2/vhd/lib/Makefile
tools/console/Makefile
tools/debugger/gdbsx/Makefile
tools/debugger/kdd/Makefile
tools/examples/Makefile
tools/firmware/Makefile
tools/flask/Makefile
tools/flask/policy/Makefile.common
tools/flask/utils/Makefile
tools/fuzz/Makefile
tools/fuzz/libelf/Makefile
tools/fuzz/x86_instruction_emulator/Makefile
tools/golang/Makefile
tools/golang/xenlight/Makefile
tools/helpers/Makefile
tools/hotplug/FreeBSD/Makefile
tools/hotplug/Linux/Makefile
tools/hotplug/Linux/systemd/Makefile
tools/hotplug/Makefile
tools/hotplug/NetBSD/Makefile
tools/hotplug/common/Makefile
tools/include/Makefile
tools/libfsimage/Makefile
tools/libfsimage/Rules.mk
tools/libfsimage/common/Makefile
tools/libfsimage/ext2fs-lib/Makefile
tools/libfsimage/ext2fs/Makefile
tools/libfsimage/fat/Makefile
tools/libfsimage/iso9660/Makefile
tools/libfsimage/reiserfs/Makefile
tools/libfsimage/ufs/Makefile
tools/libfsimage/xfs/Makefile
tools/libfsimage/zfs/Makefile
tools/libs/Makefile
tools/libs/call/Makefile
tools/libs/devicemodel/Makefile
tools/libs/evtchn/Makefile
tools/libs/foreignmemory/Makefile
tools/libs/gnttab/Makefile
tools/libs/toollog/Makefile
tools/libvchan/Makefile
tools/libxc/Makefile
tools/libxl/Makefile
tools/memshr/Makefile
tools/misc/Makefile
tools/ocaml/Makefile
tools/ocaml/libs/Makefile
tools/ocaml/test/Makefile
tools/ocaml/xenstored/Makefile
tools/pygrub/Makefile
tools/python/Makefile
tools/tests/Makefile
tools/xcutils/Makefile
tools/xenmon/Makefile
tools/xenpaging/Makefile
tools/xenpmd/Makefile
tools/xenstat/Makefile
tools/xenstat/libxenstat/Makefile
tools/xenstat/xentop/Makefile
tools/xenstore/Makefile
tools/xentrace/Makefile
tools/xl/Makefile

index 0b5f57dabd3c006123712359da01e69ca979028a..1d43044033035daff854688ca4667291ab5c4541 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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
index e064de0b776529101ee5952706de7be80d49e2f5..942247202a2b2070cac64189b13e14c87cf03a90 100644 (file)
@@ -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)
index f4b4cefa743f8a639fd7fa05843e2f1af7e3f5d0..6aa488b8e229dabbe107cfe115b5f2ac7e5ae824 100644 (file)
@@ -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"
index 5055e313d6e141daf5aa217beebe81a860325c85..39067c8aa0030f2833dd1b757be9b0e1c1a53002 100644 (file)
@@ -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
 #######
index 496428e3a918cda49b9bace50d4d412eb18008f1..11ad42c83d62de552bb5e726b7d0b997234e90f0 100644 (file)
@@ -77,43 +77,10 @@ install:
 uninstall: D=$(DESTDIR)
 uninstall:
        [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) $(D)$(XEN_CONFIG_DIR).old-`date +%s` || true
-       rm -rf $(D)$(CONFIG_DIR)/init.d/xendomains $(D)$(CONFIG_DIR)/init.d/xend
-       rm -rf $(D)$(CONFIG_DIR)/init.d/xencommons $(D)$(CONFIG_DIR)/init.d/xen-watchdog
-       rm -f  $(D)$(CONFIG_DIR)/udev/rules.d/xen-backend.rules
-       rm -f  $(D)$(CONFIG_DIR)/udev/rules.d/xend.rules
-       rm -f  $(D)$(SYSCONFIG_DIR)/xendomains
-       rm -f  $(D)$(sbindir)/xendomains
-       rm -f  $(D)$(SYSCONFIG_DIR)/xencommons
-       rm -rf $(D)$(XEN_LIB_DIR)
-       rm -rf $(D)$(XEN_LIB_STORED)
-       rm -rf $(D)$(XEN_RUN_STORED)
-       rm -rf $(D)$(PKG_INSTALLDIR)
-       rm -rf $(D)$(bindir)/cpuperf-perfcntr $(D)$(bindir)/cpuperf-xen
-       rm -rf $(D)$(bindir)/xc_shadow
-       rm -rf $(D)$(bindir)/pygrub
-       rm -rf $(D)$(bindir)/setsize $(D)$(bindir)/tbctl
-       rm -rf $(D)$(bindir)/xsls
-       rm -rf $(D)$(bindir)/xenstore* $(D)$(bindir)/xentrace*
-       rm -rf $(D)$(bindir)/xen-detect $(D)$(bindir)/xencons
-       rm -rf $(D)$(bindir)/xenpvnetboot $(D)$(bindir)/qemu-*-xen
-       rm -rf $(D)$(includedir)/xenctrl* $(D)$(includedir)/xenguest.h
-       rm -rf $(D)$(includedir)/xs_lib.h $(D)$(includedir)/xs.h
-       rm -rf $(D)$(includedir)/xenstore-compat/xs_lib.h $(D)$(includedir)/xenstore-compat/xs.h
-       rm -rf $(D)$(includedir)/xenstore_lib.h $(D)$(includedir)/xenstore.h
-       rm -rf $(D)$(includedir)/xen
-       rm -rf $(D)$(includedir)/_libxl* $(D)$(includedir)/libxl*
-       rm -rf $(D)$(includedir)/xenstat.h $(D)$(includedir)/xentoollog.h
-       rm -rf $(D)$(libdir)/libxenctrl* $(D)$(libdir)/libxenguest*
-       rm -rf $(D)$(libdir)/libxenstore* $(D)$(libdir)/libxlutil*
-       rm -rf $(D)$(libdir)/python/xen $(D)$(libdir)/python/grub
-       rm -rf $(D)$(LIBEXEC)
-       rm -rf $(D)$(sbindir)/setmask
-       rm -rf $(D)$(sbindir)/xen* $(D)$(sbindir)/netfix $(D)$(sbindir)/xm
-       rm -rf $(D)$(SHAREDIR)/doc/xen
+       rm -rf $(D)$(libdir)/xen
        rm -rf $(D)$(SHAREDIR)/xen
        rm -rf $(D)$(SHAREDIR)/qemu-xen
-       rm -rf $(D)$(MAN1DIR)/xen*
-       rm -rf $(D)$(MAN8DIR)/xen*
+       $(MAKE) subdirs-uninstall
 
 .PHONY: clean
 clean: subdirs-clean
@@ -221,6 +188,9 @@ subdir-clean-qemu-xen-traditional-dir:
        set -e; if test -d qemu-xen-traditional-dir/.; then \
                $(MAKE) -C qemu-xen-traditional-dir clean; \
        fi
+subdir-uninstall-qemu-xen-traditional-dir:
+       rm -f $(D)$(bindir)/qemu-nbd*
+       rm -f $(D)$(bindir)/qemu-img*
 
 # External target: qemu-xen
 qemu-xen-dir-find:
@@ -317,6 +287,8 @@ subdir-clean-qemu-xen-dir:
                $(MAKE) -C qemu-xen-build clean; \
        fi
 
+subdir-uninstall-qemu-xen-dir: ;
+
 subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony
        $(MAKE) -C debugger/gdbsx clean
 
@@ -326,6 +298,8 @@ subdir-install-debugger/gdbsx: .phony
 subdir-all-debugger/gdbsx: .phony
        $(MAKE) -C debugger/gdbsx all
 
+subdir-uninstall-debugger/gdbsx: .phony
+       $(MAKE) -C debugger/gdbsx uninstall
 
 subdir-clean-debugger/kdd subdir-distclean-debugger/kdd: .phony
        $(MAKE) -C debugger/kdd clean
@@ -333,6 +307,9 @@ subdir-clean-debugger/kdd subdir-distclean-debugger/kdd: .phony
 subdir-install-debugger/kdd: .phony
        $(MAKE) -C debugger/kdd install
 
+subdir-uninstall-debugger/kdd: .phony
+       $(MAKE) -C debugger/kdd uninstall
+
 subdir-all-debugger/kdd: .phony
        $(MAKE) -C debugger/kdd all
 
index f55fb669b8726b41ed5c459d69d023ad4e17c7b9..4592601db162c86d93e2929c2eacfa6d0d3149d5 100644 (file)
@@ -233,12 +233,12 @@ headers.chk:
        done >$@.new
        mv $@.new $@
 
-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
index 94200dc105b4747ce8c947bc5d738a0e97391afa..f4758ef756c51ca801fe5f9b355b16fe22e60ac1 100644 (file)
@@ -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-%
index 0d731f75b5bfda52d048c4eff0ce1ec9df41a22d..c1682836c9f52db1a780e2615d10d294b46d62bd 100644 (file)
@@ -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)
index 5328c402055970173c7eff1e861b93636415f72f..f610ddb51211ce945803b91664ae48869988ef70 100644 (file)
@@ -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
index 66e8a1ebdab4575218549e04475630e28f3f67de..c8e2d26180c69b72698b7195b3c16d452de99c1d 100644 (file)
@@ -8,6 +8,8 @@ all:
 install:
        $(INSTALL_DIR) -p $(DESTDIR)$(includedir)
 
+.PHONY: uninstall
+.uninstall:
 
 .PHONY: clean
 clean:
index 7d5f8eab061a5632d45cf76824824d4afaf47137..72fea0a4c35634155aaefd6480ed5e10ccad211c 100644 (file)
@@ -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)
index fabd6654b321be4560e66ff4d0495c1c36265c1b..e60b7afbe439bef758393de10c7223c16c6178ef 100644 (file)
@@ -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)
index ab2d6482b561178054cb333a8d8d5fac765e3274..3bf603ef174ef4fe23ae74a88735d6cc2c46bbb6 100644 (file)
@@ -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)
index c8b030038bb811e11d78e82d4e32d1449ca8c89a..abe77b2f58d97ecbf96e16640a32dfafa85b0f73 100644 (file)
@@ -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)
index 4ed6d76410a230ad70b8306587676765bbac8db0..723a2743cc94b203283faa69fa7ced0e9516f151 100644 (file)
@@ -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 $@ $^
 
index f3a597ddbc39350da2b47a5d0f122bfbe333e0d0..bcec440a7ac1471550ab0f597ab406c72fb19302 100644 (file)
@@ -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
index 87dd7603cc0702249dd3821b1503de40c0e6b3a2..f86ed3a2717f22745dee690016d00d1cd8878324 100644 (file)
@@ -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:
 
index 8562f547bca813ca56b10816fce77eb095e7bf20..868b506920450ca2c6e4a9a40c23dfbb326f24c5 100644 (file)
@@ -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
 
index a31cc16def601adbaf3dfdafeea21db9748e34cf..335ee2a090e123cfe3461d12a660d68553cda846 100644 (file)
@@ -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-%
 
index bb85ded4f5f31b88c3ef45b7ab6c922a5e2bad05..bea5ba4b6a407b13a9c2d9b089e9c85f90f40072 100644 (file)
@@ -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
index 91a53b44b83fcdc9cb73e26d403571fc10cba0b9..fc047e9fd53bc0289d315a62f0dfe408d4362825 100644 (file)
@@ -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)
index 986fbb87eadbd9b93935d7f1256a06206dd73829..85213dc8959ff7a0018960af3a4817bebe3b9961 100644 (file)
@@ -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-%
index 6cdc31eeb5a32d23c00187bd38c5ab6af62f48de..9eb30ee40c097d466373b19b13fb1c1e7ccdfd8a 100644 (file)
@@ -36,5 +36,7 @@ clean:
 .PHONY: install
 install: all
 
+.PHONY: uninstall
+
 .PHONY: afl
 afl: afl-libelf-fuzzer
index 6e3fa1e37aac0573bde1be4117963a60a8ca6c30..a3f6b2c75408e9d613e1e169a1904910ec83248d 100644 (file)
@@ -51,5 +51,7 @@ clean:
 .PHONY: install
 install: all
 
+.PHONY: uninstall
+
 .PHONY: afl
 afl: afl-harness
index 47a923599443c2a03f9aa66d588ad1e111fc33a4..aba11ebc391a02d34e4bc053df82997fb1c349de 100644 (file)
@@ -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
index a4a1a5b0c04670acd0a40838b85319fd459256b5..88202a6d5dce92545eea4328961dfb93ebd447cc 100644 (file)
@@ -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)
index 5017350f4757fa89253c914c8bf05f1f7ccf98a4..fcfca462a61689ff0fff6382198d5fafc47a6465 100644 (file)
@@ -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
index bd7a86fa07db650e2bac124b74cdae5e4119bcef..de9928cd863641e97d1e7d8cb2488d74651c2f64 100644 (file)
@@ -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:
 
index 29280cbaefd5675fbe90ea11c68a138e14cb7003..d4c3cdc43969820aeb9824a0b9abb0e91f8b43a9 100644 (file)
@@ -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
 
index 7d24bbedea6b0c821870607977cd7fbc59e8c9a7..a5d41d86ef45ff0cbe7795f989a72f5a2df2dbd7 100644 (file)
@@ -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 $@.tmp
        for mod in $(LINUX_BACKEND_MODULES) ; do \
index c1a82c1118a28a8e30691c3346ab749e10213a9c..4cf6cc03d787158c994da588ce1ab87cf8731cd4 100644 (file)
@@ -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-%
index d01aabf8c8502182f3f75d4c9a149f490614161a..6926885ab888cf5347da560a593328ceed1741cb 100644 (file)
@@ -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:
 
index b53b55cdcadcac3ea91cba429d3f48a228eb6f04..ef48bfacc956aa5ec5a61c8a5acc485796e3559b 100644 (file)
@@ -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)
index db0f03017678d85a14ad12bd0428ec26d501b8bd..666510530eef95d496b6cee55b583ae6e0456be4 100644 (file)
@@ -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
index 69fd18a82032aed65cfbde4aebeafd543e10de60..da0decac160474d620412a6ea2b71add9f295737 100644 (file)
@@ -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
index a0c6504947114f60e4e5dbb32e21c1f72f3e1eda..ee7de4457ef55436347a4fc2ef97b3a88e7ba90b 100644 (file)
@@ -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)
 
index 4840bc2ec7a2a1b50acd5278c93737f1c856ea01..af6f67e5c79eecbbc20a239e1fab04eb96f94622 100644 (file)
@@ -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)
 
index 0e00fde0e17e458e03d3e01919a3468d5c72f79e..431a79068ea50f3d996043451b9f9a68e0760d1d 100644 (file)
@@ -15,4 +15,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index 8ff4c71a1c13fecc0ebb51bc7dba4ac360ceef90..c62ae359ac339f63869737bd2206b524bc9d7e86 100644 (file)
@@ -10,4 +10,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index 2911a0e0e7cfb13c4c3ea1d03d284e0ef2d33c32..7ee5e7588ded2cccfa8c0558a9c96d6801e65c01 100644 (file)
@@ -10,4 +10,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index 4096cafa0c1db76653c5ab284a6785355c9183c3..bc86baf2c0263655607e32f8c6709820602d9c84 100644 (file)
@@ -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
index 57f286b25655340b31b9961647a252c319f19c3b..5acfedf25ee6e8b8739c4392b1db93661cf49d22 100644 (file)
@@ -10,4 +10,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index c1371080f5283e95d040d8c68138b1a17712f45d..f32b9178bd9fea2195b9a36edff3498cab501bff 100644 (file)
@@ -10,4 +10,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index 65800074044962ff06e658bc8608a2a3bd9b3089..54eeb6e35e646b74852bcbbdb1a977efd750d958 100644 (file)
@@ -10,4 +10,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index 4b9f131a5747aacb1dc7d7b37d70c88ab3cc1f54..084e5ec08d2f5b957578fa0c5e4fb733999f02e5 100644 (file)
@@ -34,4 +34,7 @@ all: fs-all
 .PHONY: install
 install: fs-install
 
+.PHONY: uninstall
+uninstall: fs-uninstall
+
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
index deae4aee78f5dbcabd66713112efb648b98ec7c7..2035873fff7cbe923c55b1e87ad6d3e098a90eda 100644 (file)
@@ -9,4 +9,4 @@ SUBDIRS-y += call
 SUBDIRS-y += foreignmemory
 SUBDIRS-y += devicemodel
 
-all clean install distclean: %: subdirs-%
+all clean install distclean uninstall: %: subdirs-%
index 30f84378d7b7221499b0a3e10d1dfc5d08ce8be4..bd3d1f06254c68f21e1f4e49996a17e5299834ba 100644 (file)
@@ -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
index 81fa5a4ac4a9e3a31175c25d2da1ed661fa9107d..e41fd208fa382bbd2fe042fa2b333d923c319252 100644 (file)
@@ -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
index cbd42193ec376bce354f1c746382b52f4ee29620..c9537ffdb475f3cfa2f9b2c5b7a5b0e074f1d8e8 100644 (file)
@@ -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
index 5e93ee7d9593501a0f985a453f5046c317b349f5..b110076621a1688e63e306d74a05a697359f1fbb 100644 (file)
@@ -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
index 88b3683dc25fdb872e4c432a2f26d60b93a28b4d..3363bd55cb81de928c2f9c41bca22db443dbf74d 100644 (file)
@@ -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
index 7361194d1fbfef638d2a7c17dcf4b6e44d244ac9..01619ec65c10c67162e660944ea6ddd37437b406 100644 (file)
@@ -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
index 70c92bda15397255911bb735a80716f0d3d73983..277c1c061a508b881f8682336cc6e02e4c6609c2 100644 (file)
@@ -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)
index 28b18577e1781dc81ca8575d59615151b21dcd3e..83e3416309ef97e26df3e0e20ae6e607b83684a9 100644 (file)
@@ -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
index 2ffb78f5c4750d3da1d9138fb0780ac47a2b52e0..082af8f716dafad10502130689cd21a48f420b27 100644 (file)
@@ -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)
index ce86f20f009055a79968a72114946d07a1e42036..cb5ea6133838ab13de99088be343b6ad6e17027e 100644 (file)
@@ -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)
index c1113b9632f98f7417ad0c23c0fc3ae821e268cf..54f6e2ef53cafd701e46480508d05069dcb66372 100644 (file)
@@ -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)
index cfa931a4d01f84847aca3c1ebdbe4dfb1aeea16b..66f2d6b1310fcf2e1b051a884ffb396fffe73e1a 100644 (file)
@@ -18,6 +18,9 @@ all: subdirs-all
 .PHONY: install
 install: subdirs-install
 
+.PHONY: uninstall
+uninstall: subdirs-uninstall
+
 .PHONY: clean
 clean: subdirs-clean
 
index f7c3c0e64613be5d73e841c647754f4bc9f0a99f..7e7c27e2d5c276be505ba8e58df7169084dcab7c 100644 (file)
@@ -13,6 +13,9 @@ all: subdirs-all
 .PHONY: install
 install: subdirs-install
 
+.PHONY: uninstall
+uninstall: subdirs-uninstall
+
 .PHONY: clean
 clean: subdirs-clean
 
index 30a304b6d1d2f2c9354751b19c7c5decb7b9d33e..256c830c512ba1aa097ebcbf43ba542280fddf0e 100644 (file)
@@ -50,4 +50,6 @@ bins: $(PROGRAMS)
 
 install:
 
+uninstall:
+
 include $(OCAML_TOPLEVEL)/Makefile.rules
index d23883683d30a5496f5992c0a5101a82d502ab48..68d35c483ad0404d4b6816f79b5421569e83906b 100644 (file)
@@ -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)
index a31849078ce9cd04b70a65a06361c24699df5aca..3a6074b7e571ec95cf4b63971a644eb508ed6b90 100644 (file)
@@ -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
index da08f46fb8b86d498be7d0fd5912ac0de9921405..e7a3c5131acf4dcf2f067a5659f2d2e28f1ba651 100644 (file)
@@ -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
index 639776130b68f2e5cb85cac8fbea496dcdd2a81c..7162945121bdc04ef099f92a7193e20dfd5105eb 100644 (file)
@@ -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:
index e127af8c2eaac7cb76da2115d24e7ef48c763b79..6bc9062d53f70b49e6561ac2bc417b62d33bf1ae 100644 (file)
@@ -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:
index 98056f24de6f61e622c445fb0553c9c3bce9d7eb..537c17651b90e401753f54b22ece475eb85f9e92 100644 (file)
@@ -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)
index 64876b3a2017ce65c2ffbfd5080a0b2bf0f54c0e..ba083caaf90bf832c0ec886763ac3b0818276060 100644 (file)
@@ -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:
index 55e8fc5f0f5a74341c1444b27b5186eac12d6aee..e0d0697ee0d5b753252e72836d554b4bc80d8af3 100644 (file)
@@ -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)
 
index 90d033a78c1a44eec31183ff1015c949cd82687a..b300f31289b1025ea39d9948ac83cada5d33f813 100644 (file)
@@ -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-%
index 9d6649d46644a08f01f595a2cfdd9531fa3a5c35..4b94d8175792455350b890961533fb23fdc7538f 100644 (file)
@@ -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
index 2275ccda8e9a0826c7723cc532aecaf272a59e93..2e156f14fd48d759fa1378a84e74bf5beb087265 100644 (file)
@@ -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
index 773d646539f5d66c8d4c4f5b20124a34687d3127..108c9421faa3904bf695f1a63c866bbf0df94dc6 100644 (file)
@@ -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)
index c8c36a8c4e6382967d66aea2aa5de2d6dfdb3960..bcd8f5b1b6aaeb7ecdfeff50090aef9f37b7de74 100644 (file)
@@ -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)
index e16f87747dec23785953ed8a8b8c7b91b870b45a..c8688992f30e8e905ed017bc7241bcbb397e9059 100644 (file)
@@ -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)