All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT
@ 2007-07-14 20:15 Sven Wegener
  2007-07-15 14:34 ` Patrick McHardy
  0 siblings, 1 reply; 6+ messages in thread
From: Sven Wegener @ 2007-07-14 20:15 UTC (permalink / raw)
  To: netfilter-devel


[-- Attachment #1.1: Type: text/plain, Size: 383 bytes --]

Setting KERNEL_DIR to the build symlink in /lib/modules is wrong. The
build symlink points to the location of generated object files and the
extension tests use KERNEL_DIR to check the availability of certain
source files. The tests will fail, if build and source point to
different locations. Change KERNEL_DIR from build to source and
introduce KBUILD_OUTPUT for the build symink.

[-- Attachment #1.2: iptables-kbuild-output.patch --]
[-- Type: text/plain, Size: 900 bytes --]

Index: Makefile
===================================================================
--- Makefile	(revision 6905)
+++ Makefile	(working copy)
@@ -12,8 +12,11 @@
 TOPLEVEL_INCLUDED=YES
 
 ifndef KERNEL_DIR
-KERNEL_DIR="/lib/modules/$(shell uname -r)/build"
+KERNEL_DIR="/lib/modules/$(shell uname -r)/source"
 endif
+ifndef KBUILD_OUTPUT
+KBUILD_OUTPUT="/lib/modules/$(shell uname -r)/build"
+endif
 IPTABLES_VERSION:=1.3.8
 OLD_IPTABLES_VERSION:=1.3.7
 
@@ -37,7 +40,7 @@
 endif
 
 COPT_FLAGS:=-O2
-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG
+CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KBUILD_OUTPUT)/include -I$(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG
 
 ifdef NO_SHARED_LIBS
 CFLAGS += -DNO_SHARED_LIBS=1

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-15 16:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-14 20:15 [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT Sven Wegener
2007-07-15 14:34 ` Patrick McHardy
2007-07-15 15:31   ` Sven Wegener
2007-07-15 15:33     ` Patrick McHardy
2007-07-15 16:01       ` Sven Wegener
2007-07-15 16:03         ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.