]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Makefile: add 'make uninstall'
authorSimon A. F. Lund <os@safl.dk>
Thu, 20 Oct 2022 10:09:44 +0000 (12:09 +0200)
committerSimon A. F. Lund <simon.lund@samsung.com>
Thu, 20 Oct 2022 11:01:31 +0000 (13:01 +0200)
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 <simon.lund@samsung.com>
Makefile

index d93bd3e6c7e80cc5bfbc7d5c265625ea880361ef..10d16f0891a7cdb9ffb14b2a71060b2e1a3ee0a3 100644 (file)
--- 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} $@