aboutsummaryrefslogtreecommitdiffstats
path: root/xen/Makefile
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2012-08-31 10:42:08 +0100
committerIan Campbell <Ian.Campbell@citrix.com>2012-08-31 10:42:08 +0100
commit22cc8b199feb383716df43db3c6dea80d8f84bc0 (patch)
treefae5a492b1c3087e86c9df5d6005f4f822a34228 /xen/Makefile
parentc6c1fd29e93566c2ddf6e2e0c040444b82918d28 (diff)
downloadxen-22cc8b199feb383716df43db3c6dea80d8f84bc0.tar.gz
xen-22cc8b199feb383716df43db3c6dea80d8f84bc0.tar.bz2
xen-22cc8b199feb383716df43db3c6dea80d8f84bc0.zip
uninstall: do not remove kernels or modules on uninstall.
The pattern used is very broad and will delete any kernel with xen in its filename, likewise modules, including those which come packages from the distribution etc. I don't think this was ever the right thing to do but it is doubly wrong now that Xen does not even build or install a kernel by default. Push cleanup of the installed hypervisor down into xen/Makefile so that it can cleanup exactly what it actually installs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Looks-good: Jan Beulich <JBeulich@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/Makefile')
-rw-r--r--xen/Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/xen/Makefile b/xen/Makefile
index b135034434..824f442700 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -20,8 +20,8 @@ default: build
.PHONY: dist
dist: install
-.PHONY: build install clean distclean cscope TAGS tags MAP gtags
-build install debug clean distclean cscope TAGS tags MAP gtags::
+.PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags
+build install uninstall debug clean distclean cscope TAGS tags MAP gtags::
$(MAKE) -f Rules.mk _$@
.PHONY: _build
@@ -48,6 +48,21 @@ _install: $(TARGET).gz
fi; \
fi
+.PHONY: _uninstall
+_uninstall: D=$(DESTDIR)
+_uninstall: T=$(notdir $(TARGET))
+_uninstall:
+ rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION).gz
+ rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).gz
+ rm -f $(D)/boot/$(T)-$(XEN_VERSION).gz
+ rm -f $(D)/boot/$(T).gz
+ rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION)
+ rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi
+ rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi
+ rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi
+ rm -f $(D)$(EFI_DIR)/$(T).efi
+ rm -f $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi
+
.PHONY: _debug
_debug:
objdump -D -S $(TARGET)-syms > $(TARGET).s