From: Simon A. F. Lund Date: Thu, 20 Oct 2022 10:09:44 +0000 (+0200) Subject: Makefile: add 'make uninstall' X-Git-Tag: v2.2~14^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=234a92c266d0a71810528be271dcf18a8e6db040;p=users%2Fsagi%2Fnvme-cli.git Makefile: add 'make uninstall' An uninstall option, in addition to RPM install/uninstall, is arguably quite convenient. Yet, Makefiles usually do not provide an 'uninstall' target since that would require recording an installation manifest and custom logic for removal. However, meson has an internal feature doing precisely that. This change invokes the meson uninstall feature via "make uninstall". Signed-off-by: Simon A. F. Lund --- diff --git a/Makefile b/Makefile index d93bd3e6..10d16f08 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,10 @@ endif install dist: ${BUILD-DIR} cd ${BUILD-DIR} && meson $@ +.PHONY: uninstall +uninstall: + cd ${BUILD-DIR} && meson --internal uninstall + .PHONY: test test: ${BUILD-DIR} ninja -C ${BUILD-DIR} $@