]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Makefile: add 'make uninstall'
authorSimon A. F. Lund <os@safl.dk>
Thu, 20 Oct 2022 10:09:49 +0000 (12:09 +0200)
committerSimon A. F. Lund <simon.lund@samsung.com>
Thu, 20 Oct 2022 11:02:15 +0000 (13:02 +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 9e79fc2cab0c828d16525ceead72f0bd446ec438..768338a5d69399637ba3396460e4d06abcad4973 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} $@