about summary refs log tree commit diff
path: root/mk/lib.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-14T00·47+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-12-14T00·47+0100
commit14955c297de82e964ea5bf44f8aaf543d4cae33a (patch)
tree264740d66d805dbbb82c03146830a2a022569d88 /mk/lib.mk
parent68b47178730a95871eba4aa4df19a845c8e5a947 (diff)
parent36c67860363c93eb00cf5b8e2ad34f6f775e6901 (diff)
Merge commit '36c67860363c93eb00cf5b8e2ad34f6f775e6901'
Diffstat (limited to 'mk/lib.mk')
-rw-r--r--mk/lib.mk24
1 files changed, 23 insertions, 1 deletions
diff --git a/mk/lib.mk b/mk/lib.mk
index 56e162d5007c..ba1fb3a2a989 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -14,17 +14,40 @@ dist-files :=
 OS = $(shell uname -s)
 
 
+# Hack to define a literal space.
+space :=
+space +=
+
+
+# Hack to define a literal newline.
+define newline
+
+
+endef
+
+
 # Default installation paths.
 prefix ?= /usr/local
 libdir ?= $(prefix)/lib
 bindir ?= $(prefix)/bin
 libexecdir ?= $(prefix)/libexec
 datadir ?= $(prefix)/share
+jardir ?= $(datadir)/java
 localstatedir ?= $(prefix)/var
 sysconfdir ?= $(prefix)/etc
 mandir ?= $(prefix)/share/man
 
 
+# Initialise support for build directories.
+builddir ?=
+
+ifdef builddir
+  buildprefix = $(builddir)/
+else
+  buildprefix =
+endif
+
+
 # Pass -fPIC if we're building dynamic libraries.
 BUILD_SHARED_LIBS ?= 1
 
@@ -39,7 +62,6 @@ ifeq ($(BUILD_SHARED_LIBS), 1)
   SET_RPATH_TO_LIBS ?= 1
 endif
 
-
 # Pass -g if we want debug info.
 BUILD_DEBUG ?= 1