aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-08 15:12:38 +0200
committerGitHub <noreply@github.com>2023-04-08 15:12:38 +0200
commit6801befcc5c038e17625cd93e69a533f811fa9f2 (patch)
tree9d3dd14dba9d941d4d3a536504911950bedc4328
parent747264320c6d8c022fdcb3c9b22f81c9e472e571 (diff)
downloadrneovim-6801befcc5c038e17625cd93e69a533f811fa9f2.tar.gz
rneovim-6801befcc5c038e17625cd93e69a533f811fa9f2.tar.bz2
rneovim-6801befcc5c038e17625cd93e69a533f811fa9f2.zip
build(uninstall): don't build if installation manifest not found
Due to the way neovim project is set up, running `make uninstall` would previously build neovim in order to determine whether neovim was installed. Instead, check if installation manifest file exists and if not then skip building entirely.
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0b2a693e36..b0b0a800f0 100644
--- a/Makefile
+++ b/Makefile
@@ -131,9 +131,17 @@ functionaltest-lua: | nvim
FORMAT=formatc formatlua format
LINT=lintlua lintsh lintc clang-tidy lintcommit lint
TEST=functionaltest unittest
-generated-sources benchmark uninstall $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
+generated-sources benchmark $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
$(CMAKE_PRG) --build build --target $@
+uninstall:
+ifneq (,$(wildcard build/install_manifest.txt))
+ $(CMAKE_PRG) --build build --target $@
+else
+ @echo Install manifest file not found. You need to build and install \
+ neovim to generate the manifest file.
+endif
+
test: $(TEST)
iwyu: build/.ran-cmake