selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build: Make sure SHLIBDIR respects PREFIX
@ 2025-09-25 17:26 Rahul Sandhu
  2025-10-06 16:46 ` Stephen Smalley
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Sandhu @ 2025-09-25 17:26 UTC (permalink / raw)
  To: selinux; +Cc: Rahul Sandhu

Not respecting PREFIX can pollute the environment in various build
configurations. LIBDIR already respects it, so we may as well make
SHLIBDIR respect PREFIX too. Fixes #494 on Github[1].

[1] https://github.com/SELinuxProject/selinux/issues/494

Signed-off-by: Rahul Sandhu <nvraxn@gmail.com>
---
 libselinux/src/Makefile | 2 +-
 libsepol/src/Makefile   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 261c22d4..c855e759 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -10,7 +10,7 @@ PKG_CONFIG ?= pkg-config
 # Installation directories.
 PREFIX ?= /usr
 LIBDIR ?= $(PREFIX)/lib
-SHLIBDIR ?= /lib
+SHLIBDIR ?= $(PREFIX)/lib
 INCLUDEDIR ?= $(PREFIX)/include
 PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
 PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile
index a1aed072..f8574d70 100644
--- a/libsepol/src/Makefile
+++ b/libsepol/src/Makefile
@@ -2,7 +2,7 @@
 PREFIX ?= /usr
 INCLUDEDIR ?= $(PREFIX)/include
 LIBDIR ?= $(PREFIX)/lib
-SHLIBDIR ?= /lib
+SHLIBDIR ?= $(PREFIX)/lib
 RANLIB ?= ranlib
 CILDIR ?= ../cil
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-06 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25 17:26 [PATCH] build: Make sure SHLIBDIR respects PREFIX Rahul Sandhu
2025-10-06 16:46 ` Stephen Smalley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).