aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2021-08-25 19:11:22 -0700
committerAndrew G. Morgan <morgan@kernel.org>2021-08-25 19:11:22 -0700
commit7a75dbc2bb0cc46666572845704b1764ab38a4bc (patch)
tree91dd252bc2223cb8e5d45f33d4477bd9e972cb8a
parent6715a509015d2143dad0df92f2b12d3317b2cdcf (diff)
downloadlibcap-7a75dbc2bb0cc46666572845704b1764ab38a4bc.tar.gz
Absorb some of archlinux's Make.Rule customizations.
These allow overriding of the sbin target directory with make sbindir=xxx or make sbin=xxx We've recently made some CPPFLAGS changes, so I'm not going to disturb those further this iteration. Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r--Make.Rules10
1 files changed, 9 insertions, 1 deletions
diff --git a/Make.Rules b/Make.Rules
index 8adaaa5..dbf70ec 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -21,6 +21,14 @@ ifndef lib
lib=$(shell ldd /usr/bin/ld|egrep "ld-linux|ld.so"|cut -d/ -f2)
endif
+ifndef sbin
+sbin=sbin
+endif
+
+ifdef sbindir
+sbin=$(sbindir)
+endif
+
ifdef prefix
exec_prefix=$(prefix)
lib_prefix=$(exec_prefix)
@@ -37,7 +45,7 @@ endif
# Target directories
MANDIR=$(man_prefix)/man
-SBINDIR=$(exec_prefix)/sbin
+SBINDIR=$(exec_prefix)/$(sbin)
INCDIR=$(inc_prefix)/include
LIBDIR=$(lib_prefix)/$(lib)
PKGCONFIGDIR=$(LIBDIR)/pkgconfig