diff options
| author | Marco Hinz <mh.codebro@gmail.com> | 2016-10-08 02:23:51 +0200 |
|---|---|---|
| committer | Marco Hinz <mh.codebro@gmail.com> | 2016-10-08 18:39:35 +0200 |
| commit | c13f72ee0a6600963a10e57155d2e814d56599e2 (patch) | |
| tree | 0cd3716997efe7b83e3afee5ca12f28e366407e4 /Makefile | |
| parent | 31f6334aa8f8093ddfd2fd3ecf9fc438ad62a792 (diff) | |
| download | rneovim-c13f72ee0a6600963a10e57155d2e814d56599e2.tar.gz rneovim-c13f72ee0a6600963a10e57155d2e814d56599e2.tar.bz2 rneovim-c13f72ee0a6600963a10e57155d2e814d56599e2.zip | |
Makefile: add PREFIX variable
We use a Makefile which in turn uses cmake. If we wanted to set the install
prefix for cmake, we had to do this so far:
make CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/tmp/nvim"
That's long and hard to remember. Following the conventions of other Makefiles,
this now works as well and is equivalent:
make PREFIX=/tmp/nvim
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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),) |