aboutsummaryrefslogtreecommitdiff
path: root/Make.Rules
diff options
context:
space:
mode:
authorMatthieu Crapet <mcrapet@gmail.com>2014-03-28 14:11:15 +0100
committerAndrew G Morgan <morgan@kernel.org>2014-04-01 20:49:01 -0700
commit3c22870c762f7925b5ff143d76f9affbade275ba (patch)
treec3673008ec652c36cdd2d87c61658c4f382d6595 /Make.Rules
parent84fb6007dcc7f6b6da9f6dab77a487c22b6c7beb (diff)
downloadlibcap-3c22870c762f7925b5ff143d76f9affbade275ba.tar.gz
Make.Rules: add gperf detection and fix INDENT test
Move gperf detection from libcap/Makefile to Make.Rules to be more cross-environment friendly. Fix INDENT test (dollar sign must be doubled): http://www.gnu.org/software/make/manual/make.html#Variables-in-Recipes Signed-off-by: Matthieu Crapet <mcrapet@gmail.com> Signed-off-by: Andrew G Morgan <morgan@kernel.org>
Diffstat (limited to 'Make.Rules')
-rw-r--r--Make.Rules3
1 files changed, 2 insertions, 1 deletions
diff --git a/Make.Rules b/Make.Rules
index ec1c474..882b033 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -61,13 +61,14 @@ WARNINGS=-Wall -Wwrite-strings \
-Wnested-externs -Winline -Wshadow
LD=$(CC) -Wl,-x -shared
LDFLAGS := #-g
+BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
SYSTEM_HEADERS = /usr/include
INCS=$(topdir)/libcap/include/sys/capability.h
LDFLAGS += -L$(topdir)/libcap
CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
-INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
+INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
LIBATTR := yes