aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <github@thequod.de>2019-02-17 21:41:42 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-02-17 21:41:42 +0100
commit6b827bb6646c213b8ad5ee6c1c87dcfd84f4bc29 (patch)
tree902423a099d20c3b1f42412ade92fc62e4d6e059
parent33ce70c8833a4ee0422b8865c7438fe6676cdd6c (diff)
downloadrneovim-6b827bb6646c213b8ad5ee6c1c87dcfd84f4bc29.tar.gz
rneovim-6b827bb6646c213b8ad5ee6c1c87dcfd84f4bc29.tar.bz2
rneovim-6b827bb6646c213b8ad5ee6c1c87dcfd84f4bc29.zip
build: checkprefix: skip if empty #9624
This regressed in 3b473bb14f9f452461016c7042949a23499df629: ``` % make 'CMAKE_BUILD_TYPE=RelWithDebInfo' 'CMAKE_EXTRA_FLAGS=-DCMAKE_INSTALL_PREFIX=/vim-build/neovim/neovim/master -DENABLE_JEMALLOC=OFF' 'DEPS_CMAKE_FLAGS=-DUSE_BUNDLED=OFF' error: CMAKE_INSTALL_PREFIX '/vim-build/neovim/neovim/master' does not match cached value '' Run this command, then try again: cmake build -DCMAKE_INSTALL_PREFIX=/vim-build/neovim/neovim/master make: *** [Makefile:169: checkprefix] Error 1 ``` It was checking before for non-empty also [1]. 1: https://github.com/neovim/neovim/pull/9621/files#diff-b67911656ef5d18c4ae36cb6741b7965L22
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ba10a156b0..6921209fdb 100644
--- a/Makefile
+++ b/Makefile
@@ -167,7 +167,7 @@ lint: check-single-includes clint testlint lualint
checkprefix:
@cached_prefix=$$($(CMAKE_PRG) -L -N build | 2>/dev/null grep 'CMAKE_INSTALL_PREFIX' | cut -d '=' -f2); \
- if [ -n "$(CMAKE_INSTALL_PREFIX)" ] && ! [ "$(CMAKE_INSTALL_PREFIX)" = "$$cached_prefix" ]; then \
+ if [ -n "$(CMAKE_INSTALL_PREFIX)" ] && [ -n "$$cached_prefix" ] && ! [ "$(CMAKE_INSTALL_PREFIX)" = "$$cached_prefix" ]; then \
printf "\nerror: CMAKE_INSTALL_PREFIX '$(CMAKE_INSTALL_PREFIX)' does not match cached value '%s'\n" "$$cached_prefix"; \
printf " Run this command, then try again:\n"; \
printf " cmake build -DCMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)\n"; \