From f379b30a9712be6c847396e5267c5eef3951d978 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 31 Jan 2022 20:06:50 +0100 Subject: added uninstall make target (handle with care if using PREFIX=/usr!) --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 62e370a..6faa266 100644 --- a/Makefile +++ b/Makefile @@ -29,5 +29,17 @@ install-initcpio: install-doc: install -vDm 644 $(DOC_FILES) -t $(DOC_DIR) + +uninstall: uninstall-initcpio uninstall-doc -.PHONY: check install install-initcpio install-doc shellcheck shfmt +uninstall-initcpio: + -rm $(addprefix $(HOOKS_DIR)/, $(notdir $(HOOKS_FILES))) + -rmdir $(HOOKS_DIR) + -rm $(addprefix $(INSTALL_DIR)/, $(notdir $(INSTALL_FILES))) + -rmdir $(INSTALL_DIR) + +uninstall-doc: + -rm $(addprefix $(DOC_DIR)/, $(notdir $(DOC_FILES))) + -rmdir $(DOC_DIR) + +.PHONY: check install install-initcpio uninstall uninstall-initcpio install-doc shellcheck shfmt -- cgit v1.2.3-70-g09d2