From c0896bdd20b2b4ac7f1183835e2d8c99d6bb29fe Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 25 Aug 2011 10:20:01 -0700 Subject: [PATCH] bugtool: Uninstall plugins on "make uninstall". This works toward making "make distcheck" succeed. --- utilities/bugtool/automake.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk index 7d8d136e..622e5aaf 100644 --- a/utilities/bugtool/automake.mk +++ b/utilities/bugtool/automake.mk @@ -23,6 +23,18 @@ bugtool-install-data-local: $(MKDIR_P) "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \ $(INSTALL_DATA) "$(srcdir)/$$plugin" "$(DESTDIR)$(bugtoolpluginsdir)/$$stem"; \ done + +UNINSTALL_LOCAL += bugtool-uninstall-local +bugtool-uninstall-local: + for plugin in $(bugtool_plugins); do \ + stem=`echo "$$plugin" | sed 's,utilities/bugtool/plugins/,,'`; \ + rm -f "$(DESTDIR)$(bugtoolpluginsdir)/$$stem"; \ + done + for plugin in $(bugtool_plugins); do \ + stem=`echo "$$plugin" | sed 's,utilities/bugtool/plugins/,,'`; \ + dir=`expr "$$stem" : '\(.*\)/[^/]*$$'`; \ + rmdir "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \ + done; exit 0 endif EXTRA_DIST += \ -- 2.30.2