Merge pull request #5447 from mhinz/makefile/add-prefix

Makefile: add PREFIX variable
This commit is contained in:
James McCoy 2016-10-08 20:38:32 -04:00 committed by GitHub
commit 27ced483cc
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,10 @@ CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \ BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
echo "Unix Makefiles") echo "Unix Makefiles")
ifneq (,$(PREFIX))
CMAKE_FLAGS += -DCMAKE_INSTALL_PREFIX:PATH="$(PREFIX)"
endif
ifeq (,$(BUILD_TOOL)) ifeq (,$(BUILD_TOOL))
ifeq (Ninja,$(BUILD_TYPE)) ifeq (Ninja,$(BUILD_TYPE))
ifneq ($(shell cmake --help 2>/dev/null | grep Ninja),) ifneq ($(shell cmake --help 2>/dev/null | grep Ninja),)

View File

@ -2,7 +2,7 @@
# Individual entries must be uncommented to take effect. # Individual entries must be uncommented to take effect.
# By default, the installation prefix is '/usr/local'. # By default, the installation prefix is '/usr/local'.
# CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=/usr/local/nvim-latest # PREFIX := /usr/local/nvim-latest
# These CFLAGS can be used in addition to those specified in CMakeLists.txt: # These CFLAGS can be used in addition to those specified in CMakeLists.txt:
# CMAKE_EXTRA_FLAGS="-DCMAKE_C_FLAGS=-ftrapv -Wlogical-op" # CMAKE_EXTRA_FLAGS="-DCMAKE_C_FLAGS=-ftrapv -Wlogical-op"