aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2015-01-24 16:24:16 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2015-01-24 16:42:54 +0100
commit10fc979567d23480f5a3e1fb8437d1a0fdd53c0b (patch)
tree939617d90a9cd07b53d8190005cc6cd31e748e25 /Makefile
parent7df57aa10b1d31fd90887c238cfeeedaff700552 (diff)
Pass INSTALL_PREFIX to cmake
This allows to install to a location other than /usr/local without invoking cmake manually.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index baa6859..6f2af0c 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ BENCHINP?=README.md
JSMODULES=$(wildcard js/lib/*.js)
VERSION?=$(SPECVERSION)
RELEASE?=CommonMark-$(VERSION)
+INSTALL_PREFIX?=/usr/local
.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site npm debug mingw archive tarball ziparchive testtarball testziparchive testlib bench astyle
@@ -33,7 +34,10 @@ $(BUILDDIR): $(SRCDIR)/html_unescape.h $(SRCDIR)/case_fold_switch.inc
@cmake --version > /dev/null || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1)
mkdir -p $(BUILDDIR); \
cd $(BUILDDIR); \
- cmake .. -G "$(GENERATOR)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
+ cmake .. \
+ -G "$(GENERATOR)" \
+ -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
+ -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX)
install: $(BUILDDIR)
make -C $(BUILDDIR) install