aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-10-08 20:38:32 -0400
committerGitHub <noreply@github.com>2016-10-08 20:38:32 -0400
commit27ced483cc9cc5f25dafde5e354159c7675c8f44 (patch)
tree3fd570ef81e991619ec8792f9863f23e8b697207
parent26a6ed55c6cf9d8ec2f2a52a787dfea7fba4fe8b (diff)
parentc13f72ee0a6600963a10e57155d2e814d56599e2 (diff)
downloadrneovim-27ced483cc9cc5f25dafde5e354159c7675c8f44.tar.gz
rneovim-27ced483cc9cc5f25dafde5e354159c7675c8f44.tar.bz2
rneovim-27ced483cc9cc5f25dafde5e354159c7675c8f44.zip
Merge pull request #5447 from mhinz/makefile/add-prefix
Makefile: add PREFIX variable
-rw-r--r--Makefile4
-rw-r--r--contrib/local.mk.example2
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8fdf007260..ef4b9cdcb5 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,10 @@ CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
echo "Unix Makefiles")
+ifneq (,$(PREFIX))
+ CMAKE_FLAGS += -DCMAKE_INSTALL_PREFIX:PATH="$(PREFIX)"
+endif
+
ifeq (,$(BUILD_TOOL))
ifeq (Ninja,$(BUILD_TYPE))
ifneq ($(shell cmake --help 2>/dev/null | grep Ninja),)
diff --git a/contrib/local.mk.example b/contrib/local.mk.example
index a0b2d034e1..6959107ea2 100644
--- a/contrib/local.mk.example
+++ b/contrib/local.mk.example
@@ -2,7 +2,7 @@
# Individual entries must be uncommented to take effect.
# 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:
# CMAKE_EXTRA_FLAGS="-DCMAKE_C_FLAGS=-ftrapv -Wlogical-op"