From e8f06569465bf8c99a8b1538044ab8df274758da Mon Sep 17 00:00:00 2001
From: daurnimator <quae@daurnimator.com>
Date: Sun, 5 Aug 2018 14:27:44 +1000
Subject: Makefile: add uninstall target

---
 Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index a96091ee..d365454a 100644
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,12 @@ luarocks-admin: config.unix
 # Regular install
 # ----------------------------------------
 
-install: $(DESTDIR)$(bindir)/luarocks $(DESTDIR)$(bindir)/luarocks-admin $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua $(patsubst src/%, $(DESTDIR)$(luadir)/%, $(LUAROCKS_FILES))
+INSTALL_FILES = $(DESTDIR)$(bindir)/luarocks \
+	$(DESTDIR)$(bindir)/luarocks-admin \
+	$(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua \
+	$(patsubst src/%, $(DESTDIR)$(luadir)/%, $(LUAROCKS_FILES))
+
+install: $(INSTALL_FILES)
 
 $(DESTDIR)$(bindir)/luarocks: ./build/luarocks
 	$(INSTALL) -D "$<" "$@"
@@ -103,6 +108,9 @@ $(DESTDIR)$(luadir)/luarocks/%.lua: src/luarocks/%.lua
 $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in
 	$(INSTALL_DATA) -D "$<" "$@"
 
+uninstall:
+	rm -rf $(INSTALL_FILES)
+
 # ----------------------------------------
 # Binary build
 # ----------------------------------------
-- 
cgit v1.2.3-55-g6feb