diff mbox

libselinux/utils/Makefile: Fix in tree compilation

Message ID 1470314646-29805-1-git-send-email-bigon@debian.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Laurent Bigonville Aug. 4, 2016, 12:44 p.m. UTC
From: Laurent Bigonville <bigon@bigon.be>

Some tools need the sepol/sepol.h header
---
 libselinux/utils/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Steve Lawrence Aug. 4, 2016, 1 p.m. UTC | #1
On 08/04/2016 08:44 AM, Laurent Bigonville wrote:
> From: Laurent Bigonville <bigon@bigon.be>
> 
> Some tools need the sepol/sepol.h header

Applied. Thanks!

- Steve

> ---
>  libselinux/utils/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
> index cf7af52..8497cb4 100644
> --- a/libselinux/utils/Makefile
> +++ b/libselinux/utils/Makefile
> @@ -3,6 +3,7 @@ PREFIX ?= $(DESTDIR)/usr
>  LIBDIR ?= $(PREFIX)/lib
>  USRBINDIR ?= $(PREFIX)/sbin
>  SBINDIR ?= $(DESTDIR)/sbin
> +INCLUDEDIR ?= $(PREFIX)/include
>  
>  MAX_STACK_SIZE=8192
>  CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissing-include-dirs \
> @@ -23,7 +24,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
>            -fasynchronous-unwind-tables -fdiagnostics-show-option -funit-at-a-time \
>            -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
>            -Werror -Wno-aggregate-return -Wno-redundant-decls
> -override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
> +override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(EMFLAGS)
>  LDLIBS += -L../src -lselinux -L$(LIBDIR)
>  
>  TARGETS=$(patsubst %.c,%,$(wildcard *.c))
>
diff mbox

Patch

diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
index cf7af52..8497cb4 100644
--- a/libselinux/utils/Makefile
+++ b/libselinux/utils/Makefile
@@ -3,6 +3,7 @@  PREFIX ?= $(DESTDIR)/usr
 LIBDIR ?= $(PREFIX)/lib
 USRBINDIR ?= $(PREFIX)/sbin
 SBINDIR ?= $(DESTDIR)/sbin
+INCLUDEDIR ?= $(PREFIX)/include
 
 MAX_STACK_SIZE=8192
 CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissing-include-dirs \
@@ -23,7 +24,7 @@  CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
           -fasynchronous-unwind-tables -fdiagnostics-show-option -funit-at-a-time \
           -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
           -Werror -Wno-aggregate-return -Wno-redundant-decls
-override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
+override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(EMFLAGS)
 LDLIBS += -L../src -lselinux -L$(LIBDIR)
 
 TARGETS=$(patsubst %.c,%,$(wildcard *.c))