From 3f33f75b7a440af4f3192785f7a2663b28203a59 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 7 Jul 2010 11:42:36 -0400 Subject: [PATCH] Add uninstall target --- Makefile.in | 5 +---- common/Makefile.in | 2 ++ compat/Makefile.in | 2 ++ doc/Makefile.in | 9 +++++++++ include/Makefile.in | 3 +++ plugins/sample/Makefile.in | 5 ++++- plugins/sample_group/Makefile.in | 5 ++++- plugins/sudoers/Makefile.in | 7 +++++++ src/Makefile.in | 5 +++++ 9 files changed, 37 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index fdca38b1d..fcbd91bfa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,7 +33,7 @@ SHELL = @SHELL@ all: config.status for d in $(SUBDIRS) $(SAMPLES); do (cd $$d && $(MAKE) $@) || break; done -install install-dirs install-binaries install-includes install-man install-plugin: config.status +install install-dirs install-binaries install-includes install-man install-plugin uninstall: config.status for d in $(SUBDIRS); do (cd $$d && $(MAKE) $@) || break; done autoconf: @@ -45,9 +45,6 @@ ChangeLog: check: @echo nothing to check -uninstall: - @echo uninstall not yet supported - config.status: @if [ ! -s config.status ]; then \ echo "Please run configure first"; \ diff --git a/common/Makefile.in b/common/Makefile.in index 978210846..1641fbed8 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -82,6 +82,8 @@ install-man: install-plugin: +uninstall: + check: @echo nothing to check diff --git a/compat/Makefile.in b/compat/Makefile.in index 705a66efe..e2907dc23 100644 --- a/compat/Makefile.in +++ b/compat/Makefile.in @@ -106,6 +106,8 @@ install-man: install-plugin: +uninstall: + check: @echo nothing to check diff --git a/doc/Makefile.in b/doc/Makefile.in index 86a99f8b7..3ea52ab9f 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -153,6 +153,15 @@ install-man: install-dirs install-plugin: +uninstall: + -rm -f $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) \ + $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu) \ + $(DESTDIR)$(mandirsu)/sudo_plugin.$(mansectsu) \ + $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu) \ + $(DESTDIR)$(mandirsu)/visudo.$(mansectsu) \ + $(DESTDIR)$(mandirform)/sudoers.$(mansectform) \ + $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform) + check: @echo nothing to check diff --git a/include/Makefile.in b/include/Makefile.in index 53a196cc9..73dd726c0 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -56,6 +56,9 @@ install-includes: install-dirs install-plugin: +uninstall: + -rm -f $(DESTDIR)$(prefix)/include/sudo_plugin.h + check: @echo nothing to check diff --git a/plugins/sample/Makefile.in b/plugins/sample/Makefile.in index 79d45e7ae..9cf829a8a 100644 --- a/plugins/sample/Makefile.in +++ b/plugins/sample/Makefile.in @@ -97,7 +97,10 @@ install-includes: install-man: install-plugin: install-dirs sample_plugin.la - $(LIBTOOL) --mode=install --quiet $(INSTALL) sample_plugin.la $(plugindir) + $(LIBTOOL) --mode=install --quiet $(INSTALL) sample_plugin.la $(DESDTDIR)/$(plugindir) + +uninstall: + -$(LIBTOOL) --mode=uninstall rm -f $(DESDTDIR)/$(plugindir)/sample_plugin.la check: @echo nothing to check diff --git a/plugins/sample_group/Makefile.in b/plugins/sample_group/Makefile.in index fe12ab85b..21b9739ca 100644 --- a/plugins/sample_group/Makefile.in +++ b/plugins/sample_group/Makefile.in @@ -99,7 +99,10 @@ install-includes: install-man: install-plugin: install-dirs sample_group.la - $(LIBTOOL) --mode=install --quiet $(INSTALL) sample_group.la $(plugindir) + $(LIBTOOL) --mode=install --quiet $(INSTALL) sample_group.la $(DESDTDIR)/$(plugindir) + +uninstall: + -$(LIBTOOL) --mode=uninstall rm -f $(DESDTDIR)/$(plugindir)/sample_group.la check: @echo nothing to check diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index bee451348..b3e4b6621 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -269,6 +269,13 @@ install-sudoers: install-dirs $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \ $(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers +uninstall: + -$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/sudoers.la + -rm -f $(DESTDIR)$(replaydir)/sudoreplay + -rm -f $(DESTDIR)$(visudodir)/visudo + -cmp $(DESTDIR)$(sudoersdir)/sudoers $(srcdir)/sudoers >/dev/null && \ + rm -f $(DESTDIR)$(sudoersdir)/sudoers + check: @echo nothing to check diff --git a/src/Makefile.in b/src/Makefile.in index 10d85c342..a8d95b6ad 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -141,6 +141,11 @@ install-noexec: install-dirs libsudo_noexec.la install-plugin: +uninstall: + -rm -f $(DESTDIR)$(bindir)/sudo $(DESTDIR)$(bindir)/sudoedit \ + $(DESTDIR)$(libexecdir)/sesh \ + $(DESTDIR)$(noexecdir)/$(noexecfile) \ + check: @echo nothing to check -- 2.40.0