Makefile: CMAKE_INSTALL_PREFIX: skip parsing CMAKE_EXTRA_FLAGS if set (#10374)

Fixes:

>  Recursive variable 'CMAKE_EXTRA_FLAGS' references itself (eventually).  Stop.
This commit is contained in:
Daniel Hahler 2019-06-30 01:29:10 +02:00 committed by GitHub
parent 0364f517bb
commit 72ae0a6e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,8 @@ CMAKE_EXTRA_FLAGS ?=
# CMAKE_INSTALL_PREFIX
# - May be passed directly or as part of CMAKE_EXTRA_FLAGS.
# - `checkprefix` target checks that it matches the CMake-cached value. #9615
ifneq (,$(CMAKE_EXTRA_FLAGS))
CMAKE_INSTALL_PREFIX ?= $(shell echo $(CMAKE_EXTRA_FLAGS) | 2>/dev/null \
ifneq (,$(CMAKE_INSTALL_PREFIX)$(CMAKE_EXTRA_FLAGS))
CMAKE_INSTALL_PREFIX := $(shell echo $(CMAKE_EXTRA_FLAGS) | 2>/dev/null \
grep -o 'CMAKE_INSTALL_PREFIX=[^ ]\+' | cut -d '=' -f2)
endif
ifneq (,$(CMAKE_INSTALL_PREFIX))