@@ -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
@@ -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)
@@ -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"
@@ -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
#######
@@ -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
@@ -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
@@ -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-%
@@ -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)
@@ -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
@@ -8,6 +8,8 @@ all:
install:
$(INSTALL_DIR) -p $(DESTDIR)$(includedir)
+.PHONY: uninstall
+.uninstall:
.PHONY: clean
clean:
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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 $@ $^
@@ -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
@@ -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:
@@ -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
@@ -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-%
@@ -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
@@ -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)
@@ -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-%
@@ -36,5 +36,7 @@ clean:
.PHONY: install
install: all
+.PHONY: uninstall
+
.PHONY: afl
afl: afl-libelf-fuzzer
@@ -51,5 +51,7 @@ clean:
.PHONY: install
install: all
+.PHONY: uninstall
+
.PHONY: afl
afl: afl-harness
@@ -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
@@ -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)
@@ -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
@@ -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:
@@ -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
@@ -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 \
@@ -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-%
@@ -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:
@@ -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)
@@ -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
@@ -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
@@ -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)
@@ -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)
@@ -15,4 +15,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -10,4 +10,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -10,4 +10,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -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
@@ -10,4 +10,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -10,4 +10,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -10,4 +10,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -34,4 +34,7 @@ all: fs-all
.PHONY: install
install: fs-install
+.PHONY: uninstall
+uninstall: fs-uninstall
+
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
@@ -9,4 +9,4 @@ SUBDIRS-y += call
SUBDIRS-y += foreignmemory
SUBDIRS-y += devicemodel
-all clean install distclean: %: subdirs-%
+all clean install distclean uninstall: %: subdirs-%
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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
@@ -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)
@@ -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)
@@ -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)
@@ -18,6 +18,9 @@ all: subdirs-all
.PHONY: install
install: subdirs-install
+.PHONY: uninstall
+uninstall: subdirs-uninstall
+
.PHONY: clean
clean: subdirs-clean
@@ -13,6 +13,9 @@ all: subdirs-all
.PHONY: install
install: subdirs-install
+.PHONY: uninstall
+uninstall: subdirs-uninstall
+
.PHONY: clean
clean: subdirs-clean
@@ -50,4 +50,6 @@ bins: $(PROGRAMS)
install:
+uninstall:
+
include $(OCAML_TOPLEVEL)/Makefile.rules
@@ -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)
@@ -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
@@ -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
@@ -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:
@@ -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:
@@ -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)
@@ -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:
@@ -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)
@@ -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-%
@@ -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
@@ -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
@@ -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)
@@ -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)
@@ -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)
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> --- 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(-)