diff options
author | Matthieu Crapet <mcrapet@gmail.com> | 2014-03-28 14:11:15 +0100 |
---|---|---|
committer | Andrew G Morgan <morgan@kernel.org> | 2014-04-01 20:49:01 -0700 |
commit | 3c22870c762f7925b5ff143d76f9affbade275ba (patch) | |
tree | c3673008ec652c36cdd2d87c61658c4f382d6595 | |
parent | 84fb6007dcc7f6b6da9f6dab77a487c22b6c7beb (diff) | |
download | libcap-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>
-rw-r--r-- | Make.Rules | 3 | ||||
-rw-r--r-- | libcap/Makefile | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -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 diff --git a/libcap/Makefile b/libcap/Makefile index 20ab00f..80ccf3c 100644 --- a/libcap/Makefile +++ b/libcap/Makefile @@ -28,7 +28,7 @@ GPERF_OUTPUT = _caps_output.gperf all: $(MINLIBNAME) $(STALIBNAME) libcap.pc -ifeq ($(shell gperf --version > /dev/null 2>&1 && echo yes),yes) +ifeq ($(BUILD_GPERF),yes) USE_GPERF_OUTPUT = $(GPERF_OUTPUT) INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT) endif |