build: fix handling of install prefix with CMAKE_EXTRA_FLAGS (#10530)

Append `CMAKE_INSTALL_PREFIX` to any given `CMAKE_EXTRA_FLAGS` always.

Regressed in 5031e3298.

Fixes https://github.com/neovim/neovim/issues/10524.
This commit is contained in:
Daniel Hahler 2019-07-17 16:38:11 +02:00 committed by GitHub
parent 58dd5fcc01
commit b41507927b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ CMAKE_INSTALL_PREFIX := $(shell echo $(CMAKE_EXTRA_FLAGS) | 2>/dev/null \
grep -o 'CMAKE_INSTALL_PREFIX=[^ ]\+' | cut -d '=' -f2)
endif
ifneq (,$(CMAKE_INSTALL_PREFIX))
CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)
override CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)
checkprefix:
@if [ -f build/.ran-cmake ]; then \