build: move copy of linux headers to private directory

libnl3 contains a private copy of some kernel header files.

Normally, users are expected to install libnl and specify
-I$PREFIX/include/libnl3 as include path. As the private kernel
header files are not installed, this works fine.

However, it can be convenient to build against the libnl source
directory, without installing libnl. In this case, the private kernel
header files shaddow the system provided ones. This is undesired.

Move these files to a different directory to avoid this clash.

http://lists.infradead.org/pipermail/libnl/2014-September/001645.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Haller 2014-09-24 07:49:34 +02:00
parent 1e3f316081
commit d6f761bc4e
37 changed files with 35 additions and 31 deletions

View File

@ -120,37 +120,37 @@ nobase_libnlinclude_HEADERS += \
endif
noinst_HEADERS = \
linux/fib_rules.h \
linux/genetlink.h \
linux/gen_stats.h \
linux/if_addr.h \
linux/if_arp.h \
linux/if_ether.h \
linux/if.h \
linux/if_bridge.h \
linux/if_link.h \
linux/if_tunnel.h \
linux/if_vlan.h \
linux/ip.h \
linux/ip_mp_alg.h \
linux/ipv6.h \
linux/can/netlink.h \
linux/neighbour.h \
linux/netfilter.h \
linux/netfilter/nf_conntrack_common.h \
linux/netfilter/nfnetlink_compat.h \
linux/netfilter/nfnetlink_conntrack.h \
linux/netfilter/nfnetlink.h \
linux/netfilter/nfnetlink_log.h \
linux/netfilter/nfnetlink_queue.h \
linux/netlink.h \
linux/pkt_cls.h \
linux/tc_act/tc_mirred.h \
linux/pkt_sched.h \
linux/rtnetlink.h \
linux/snmp.h \
linux/xfrm.h \
linux/tc_ematch/tc_em_meta.h \
linux-private/linux/fib_rules.h \
linux-private/linux/genetlink.h \
linux-private/linux/gen_stats.h \
linux-private/linux/if_addr.h \
linux-private/linux/if_arp.h \
linux-private/linux/if_ether.h \
linux-private/linux/if.h \
linux-private/linux/if_bridge.h \
linux-private/linux/if_link.h \
linux-private/linux/if_tunnel.h \
linux-private/linux/if_vlan.h \
linux-private/linux/ip.h \
linux-private/linux/ip_mp_alg.h \
linux-private/linux/ipv6.h \
linux-private/linux/can/netlink.h \
linux-private/linux/neighbour.h \
linux-private/linux/netfilter.h \
linux-private/linux/netfilter/nf_conntrack_common.h \
linux-private/linux/netfilter/nfnetlink_compat.h \
linux-private/linux/netfilter/nfnetlink_conntrack.h \
linux-private/linux/netfilter/nfnetlink.h \
linux-private/linux/netfilter/nfnetlink_log.h \
linux-private/linux/netfilter/nfnetlink_queue.h \
linux-private/linux/netlink.h \
linux-private/linux/pkt_cls.h \
linux-private/linux/tc_act/tc_mirred.h \
linux-private/linux/pkt_sched.h \
linux-private/linux/rtnetlink.h \
linux-private/linux/snmp.h \
linux-private/linux/xfrm.h \
linux-private/linux/tc_ematch/tc_em_meta.h \
netlink-private/genl.h \
netlink-private/netlink.h \
netlink-private/socket.h \

View File

@ -2,6 +2,7 @@
AM_CPPFLAGS = \
-Wall \
-I${top_srcdir}/include/linux-private \
-I${top_srcdir}/include \
-I${top_builddir}/include \
-I${builddir}/route \

View File

@ -3,6 +3,7 @@
SUBDIRS = lib
AM_CPPFLAGS = \
-I${top_srcdir}/include/linux-private \
-I${top_srcdir}/include \
-I${top_builddir}/include \
-D_GNU_SOURCE \

View File

@ -1,6 +1,7 @@
# -*- Makefile -*-
AM_CPPFLAGS = \
-I${top_srcdir}/include/linux-private \
-I${top_srcdir}/include \
-I${top_builddir}/include \
-D_GNU_SOURCE \

View File

@ -7,6 +7,7 @@ if ENABLE_UNIT_TESTS
AM_CPPFLAGS = \
-Wall \
-I${top_srcdir}/include/linux-private \
-I${top_srcdir}/include \
-I${top_builddir}/include \
-D_GNU_SOURCE \