Re: [patch] iptables out-of-tree build directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 2008-05-12 01:15, Henrik Nordstrom wrote:

>The attached patch fixes iptables out-of-tree compiles which otherwise
>failed in extensions/ complaining about not finding xtables.h
>
>
>mkdir build
>cd build
>../iptables/configure
>make

Thanks for noticing!
-I../ is rather hackish, though. Following patch is the proper
thing (IMO):

===
commit 333c904234d9320aca2494cf86595b9639b03f3e
Author: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date:   Mon May 12 10:25:15 2008 +0200

    Makefile: fix out-of-topdir compilation
    
    Reported by: Henrik Nordstrom
    
    When xtables.h is not already found in /usr/include, compilation
    would fail when ${top_srcdir} != ${top_builddir}.
---
 extensions/GNUmakefile.in |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 31e6fb7..9c46ab1 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -1,5 +1,7 @@
 # -*- Makefile -*-
 
+top_builddir := @top_builddir@
+builddir     := @builddir@
 top_srcdir  := @top_srcdir@
 srcdir      := @srcdir@
 ksourcedir  := @ksourcedir@
@@ -16,7 +18,7 @@ LDFLAGS        := @LDFLAGS@
 regular_CFLAGS := @regular_CFLAGS@
 kinclude_CFLAGS := @kinclude_CFLAGS@
 
-AM_CFLAGS      := ${regular_CFLAGS} -I${top_srcdir}/include ${kinclude_CFLAGS}
+AM_CFLAGS      := ${regular_CFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CFLAGS}
 AM_DEPFLAGS     = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
 
 ifeq (${V},)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux