tools: fix make uninstall
authorOlaf Hering <olaf@aepfle.de>
Wed, 1 Oct 2014 16:41:03 +0000 (18:41 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 6 Oct 2014 14:50:54 +0000 (15:50 +0100)
The uninstall target does not know about the paths it removes because
the toplevel Makefile does not include the required files.

Move the commands to tools/Makefile because all files come from subdirs
in tools/ anyway. Drop the removal of $(XEN_RUN_DIR) because it gets
created at runtime. Drop the removal of systemd related files because
the wildcard matches everything.

The proper fix is to remove the files and directories in the Makefiles
which install them. But this version is the least intrusive change at
this point.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Makefile
tools/Makefile

index 3b9bf7ac40f287cbe7139015df1f1c4141962221..bf8028a331ff76882dc0ecfa8271991d9a1f6616 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -232,19 +232,7 @@ help:
 .PHONY: uninstall
 uninstall: D=$(DESTDIR)
 uninstall:
-       [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) $(D)$(XEN_CONFIG_DIR).old-`date +%s` || true
        $(MAKE) -C xen uninstall
-       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 -f  $(D)$(XEN_SYSTEMD_DIR)/*.service
-       rm -f  $(D)$(XEN_SYSTEMD_DIR)/*.mount
-       rm -f  $(D)$(XEN_SYSTEMD_MODULES_LOAD)/*.conf
-       rm -rf $(D)$(XEN_RUN_DIR)* $(D)/var/lib/xen*
        make -C tools uninstall
        rm -rf $(D)/boot/tboot*
 
index 00f539ac2cc1779aac1ccbc2b658b43d598f5e7f..99e5694af8d8b6f2b4bda7fdbec3e0e2ec7c17aa 100644 (file)
@@ -67,6 +67,15 @@ install: subdirs-install
 .PHONY: uninstall
 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)/var/lib/xen*
        rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen
        rm -rf $(D)$(BINDIR)/xc_shadow
        rm -rf $(D)$(BINDIR)/pygrub