about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-11 11:15:41 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-11 11:18:22 +0100
commitf9a184c2b9a73097a8e0e29c111b7234d54fc22d (patch)
tree02a9384c462b27a3c92c95bb37c54924662ae544
parent10002a45e821b83d1dc0348b25de0c40e841b4ed (diff)
downloadchawan-f9a184c2b9a73097a8e0e29c111b7234d54fc22d.tar.gz
Makefile: clean up libexecdir on uninstall
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 94acb6a2..6a9e46d8 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ LIBEXECDIR ?= '$${%CHA_BIN_DIR}/../libexec/chawan'
 # If overridden, take libexecdir that was specified.
 # Otherwise, just install to libexec/chawan.
 ifeq ($(LIBEXECDIR),'$${%CHA_BIN_DIR}/../libexec/chawan')
-LIBEXECDIR_CHAWAN = $(DESTDIR)$(PREFIX)/libexec/chawan
+LIBEXECDIR_CHAWAN = "$(DESTDIR)$(PREFIX)/libexec/chawan"
 else
 LIBEXECDIR_CHAWAN = $(LIBEXECDIR)/chawan
 endif
@@ -117,7 +117,7 @@ manpage: $(OBJDIR)/man/cha-config.5 $(OBJDIR)/man/cha-mailcap.5 \
 install:
 	mkdir -p "$(DESTDIR)$(PREFIX)/bin"
 	install -m755 "$(OUTDIR_BIN)/cha" "$(DESTDIR)$(PREFIX)/bin"
-	# intentionally not quoted
+	@# intentionally not quoted
 	mkdir -p $(LIBEXECDIR_CHAWAN)/cgi-bin
 	install -m755 "$(OUTDIR_LIBEXEC)/gopher2html" $(LIBEXECDIR_CHAWAN)
 	install -m755 "$(OUTDIR_LIBEXEC)/gmi2html" $(LIBEXECDIR_CHAWAN)
@@ -137,6 +137,12 @@ install:
 .PHONY: uninstall
 uninstall:
 	rm -f "$(DESTDIR)$(PREFIX)/bin/cha"
+	@# intentionally not quoted
+	rm -f $(LIBEXECDIR_CHAWAN)/gopher2html
+	rm -f $(LIBEXECDIR_CHAWAN)/gmi2html
+	rm -f $(LIBEXECDIR_CHAWAN)/cgi-bin/gmifetch
+	rm -f $(LIBEXECDIR_CHAWAN)/cgi-bin/cha-finger
+	rmdir $(LIBEXECDIR_CHAWAN)/cgi-bin && rmdir $(LIBEXECDIR_CHAWAN) || true
 	rm -f "$(DESTDIR)$(MANPREFIX5)/cha-config.5"
 	rm -f "$(DESTDIR)$(MANPREFIX5)/cha-mailcap.5"
 	rm -f "$(DESTDIR)$(MANPREFIX5)/cha-mime.types.5"