tools: fix uninstall: tests/x86_emulator, Linux hotplug
authorChristopher Clark <christopher.w.clark@gmail.com>
Mon, 20 Aug 2018 18:42:30 +0000 (11:42 -0700)
committerWei Liu <wei.liu2@citrix.com>
Tue, 21 Aug 2018 08:02:20 +0000 (09:02 +0100)
Fixing top-level "make uninstall":

tools/tests/x86_emulator is missing an uninstall target, which causes
failure. Trivial to add one since it installs nothing, so do that.

Linux hotplug uninstall returns success but doesn't actually remove what
it installed. The Makefile variables are obfuscating incorrect logic, so
strip them out and match existing code for xen-watchdog which does work.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
tools/hotplug/Linux/Makefile
tools/tests/x86_emulator/Makefile

index d4c3cdc43969820aeb9824a0b9abb0e91f8b43a9..3b51fe4a62c6d89ac4abbd2e0048957cca89a4ed 100644 (file)
@@ -1,16 +1,6 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-# Init scripts.
-XENDOMAINS_INITD = init.d/xendomains
-XENDOMAINS_LIBEXEC = xendomains
-XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
-
-XENCOMMONS_INITD = init.d/xencommons
-XENCOMMONS_SYSCONFIG = init.d/sysconfig.xencommons
-
-XENDRIVERDOMAIN_INITD = init.d/xendriverdomain
-
 # Xen script dir and scripts to go there.
 XEN_SCRIPTS = vif-bridge
 XEN_SCRIPTS += vif-route
@@ -56,24 +46,23 @@ install-initd:
        [ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
        [ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR)
        [ -d $(DESTDIR)$(LIBEXEC_BIN) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-       $(INSTALL_PROG) $(XENDOMAINS_LIBEXEC) $(DESTDIR)$(LIBEXEC_BIN)
-       $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(INITD_DIR)
-       $(INSTALL_DATA) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(SYSCONFIG_DIR)/xendomains
-       $(INSTALL_PROG) $(XENCOMMONS_INITD) $(DESTDIR)$(INITD_DIR)
-       $(INSTALL_DATA) $(XENCOMMONS_SYSCONFIG) $(DESTDIR)$(SYSCONFIG_DIR)/xencommons
-       $(INSTALL_PROG) $(XENDRIVERDOMAIN_INITD) $(DESTDIR)$(INITD_DIR)
+       $(INSTALL_DATA) init.d/sysconfig.xendomains $(DESTDIR)$(SYSCONFIG_DIR)/xendomains
+       $(INSTALL_DATA) init.d/sysconfig.xencommons $(DESTDIR)$(SYSCONFIG_DIR)/xencommons
+       $(INSTALL_PROG) xendomains $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PROG) init.d/xendomains $(DESTDIR)$(INITD_DIR)
+       $(INSTALL_PROG) init.d/xencommons $(DESTDIR)$(INITD_DIR)
+       $(INSTALL_PROG) init.d/xendriverdomain $(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))
+       rm -f $(DESTDIR)$(INITD_DIR)/xendriverdomain
+       rm -f $(DESTDIR)$(INITD_DIR)/xencommons
+       rm -f $(DESTDIR)$(INITD_DIR)/xendomains
+       rm -f $(DESTDIR)$(LIBEXEC_BIN)/xendomains
+       rm -f $(DESTDIR)$(SYSCONFIG_DIR)/xencommons
+       rm -f $(DESTDIR)$(SYSCONFIG_DIR)/xendomains
 
 .PHONY: install-scripts
 install-scripts:
index dec81c33b2e73803e4461cafa0d612cf4596a54b..61956e59c6fa574d5b216bc06a5f78906d4e8f41 100644 (file)
@@ -123,8 +123,8 @@ clean:
 .PHONY: distclean
 distclean: clean
 
-.PHONY: install
-install:
+.PHONY: install uninstall
+install uninstall:
 
 x86_emulate:
        [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@