Commit 6a51c7ec authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: Allow to install in custom dirs

There is no way to redefine install paths into
some custom ones (say plain /usr). Fix it by
using conditional inits.
Reported-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 871da9a1
...@@ -11,20 +11,20 @@ endif ...@@ -11,20 +11,20 @@ endif
export E Q export E Q
# Installation paths # Installation paths
PREFIX := /usr/local PREFIX ?= /usr/local
SBINDIR := $(PREFIX)/sbin SBINDIR ?= $(PREFIX)/sbin
MANDIR := $(PREFIX)/share/man MANDIR ?= $(PREFIX)/share/man
SYSTEMDUNITDIR := $(PREFIX)/lib/systemd/system/ SYSTEMDUNITDIR ?= $(PREFIX)/lib/systemd/system/
LOGROTATEDIR := $(PREFIX)/etc/logrotate.d/ LOGROTATEDIR ?= $(PREFIX)/etc/logrotate.d/
LIBDIR := $(PREFIX)/lib LIBDIR ?= $(PREFIX)/lib
# For recent Debian/Ubuntu with multiarch support # For recent Debian/Ubuntu with multiarch support
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \
-qDEB_HOST_MULTIARCH 2>/dev/null) -qDEB_HOST_MULTIARCH 2>/dev/null)
ifneq "$(DEB_HOST_MULTIARCH)" "" ifneq "$(DEB_HOST_MULTIARCH)" ""
LIBDIR := $(PREFIX)/lib/$(DEB_HOST_MULTIARCH) LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
# For most other systems # For most other systems
else ifeq "$(shell uname -m)" "x86_64" else ifeq "$(shell uname -m)" "x86_64"
LIBDIR := $(PREFIX)/lib64 LIBDIR ?= $(PREFIX)/lib64
endif endif
INCLUDEDIR := $(PREFIX)/include/criu INCLUDEDIR ?= $(PREFIX)/include/criu
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment