All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: selinux@tycho.nsa.gov, nicolas.iooss@m4x.org, sds@tycho.nsa.gov
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: [PATCH v4 15/15] build: setup buildpaths if DESTDIR is specified
Date: Wed, 24 Jan 2018 10:27:36 +0100	[thread overview]
Message-ID: <20180124092736.8432-16-marcus.folkesson@gmail.com> (raw)
In-Reply-To: <20180124092736.8432-1-marcus.folkesson@gmail.com>

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 6da7f7b7..c238dbc8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+PREFIX ?= /usr
 OPT_SUBDIRS ?= dbus gui mcstrans python restorecond sandbox semodule-utils
 SUBDIRS=libsepol libselinux libsemanage checkpolicy secilc policycoreutils $(OPT_SUBDIRS)
 PYSUBDIRS=libselinux libsemanage
@@ -19,10 +20,14 @@ else
 endif
 
 ifneq ($(DESTDIR),)
-	CFLAGS += -I$(DESTDIR)/usr/include
-	LDFLAGS += -L$(DESTDIR)/usr/lib
+	LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
+	LIBSEPOLA ?= $(LIBDIR)/libsepol.a
+
+	CFLAGS += -I$(DESTDIR)$(PREFIX)/include
+	LDFLAGS += -L$(DESTDIR)$(PREFIX)/lib -L$(LIBDIR)
 	export CFLAGS
 	export LDFLAGS
+	export LIBSEPOLA
 endif
 
 all install relabel clean test indent:
-- 
2.15.1

      parent reply	other threads:[~2018-01-24  9:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24  9:27 Rework of Makefiles Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 01/15] libsepol: build: follow standard semantics for DESTDIR and PREFIX Marcus Folkesson
2018-01-24 21:29   ` Nicolas Iooss
2018-01-31 11:40     ` Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 02/15] libselinux: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 03/15] libsemanage: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 04/15] checkpolicy: " Marcus Folkesson
2018-01-24 22:04   ` Nicolas Iooss
2018-01-31 11:58     ` Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 05/15] gui: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 06/15] mcstrans: " Marcus Folkesson
2018-01-24 21:48   ` Nicolas Iooss
2018-01-31 11:43     ` Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 07/15] policycoreutils: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 08/15] python: " Marcus Folkesson
2018-01-24 22:06   ` Nicolas Iooss
2018-01-24  9:27 ` [PATCH v4 09/15] python: build: move modules from platform-specific to platform-shared Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 10/15] restorecond: build: follow standard semantics for DESTDIR and PREFIX Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 11/15] sandbox: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 12/15] secilc: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 13/15] semodule-utils: " Marcus Folkesson
2018-01-24  9:27 ` [PATCH v4 14/15] dbus: " Marcus Folkesson
2018-01-24  9:27 ` Marcus Folkesson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180124092736.8432-16-marcus.folkesson@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=nicolas.iooss@m4x.org \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.