Re: [PATCH] fix include paths when the kernel source and build directory are different

Jan Kiszka
2009-06-08T08:31:34Z

James Pike wrote:
> Use correct architecture includes when kernel source and build directory
> are different.
> Signed-off-by: James Pike <james@chilon.net>
>
> diff --git a/Makefile b/Makefile
> index 95e4c81..ad08c45 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -27,8 +27,9 @@ all:: prerequisite
> # include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat
> $(MAKE) -C $(KERNELDIR) M=`pwd` \
> LINUXINCLUDE="-I`pwd`/include -Iinclude \
> - $(if $(KERNELSOURCEDIR),-Iinclude2 -I$(KERNELSOURCEDIR)/include) \
> - -Iarch/${ARCH_DIR}/include -I`pwd`/include-compat \
> + $(if $(KERNELSOURCEDIR),\
> + -Iinclude2 -I$(KERNELSOURCEDIR)/include -I$(KERNELSOURCEDIR)/arch/${ARCH_DIR}/include, \
> + -Iarch/${ARCH_DIR}/include) -I`pwd`/include-compat \
> -include include/linux/autoconf.h \
> -include `pwd`/$(ARCH_DIR)/external-module-compat.h $(module_defines)" \
> "$$@"

Just confirmed: Required when building against home-brewed kernels with
split source/binaries. Avi, please merge.

Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

Jan