From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Pike Subject: Re: [PATCH] fix include paths when the kernel source and build directory are different Date: Sat, 15 Aug 2009 23:33:33 +0100 Message-ID: <20090815223333.GA5126@dupont.ts-a> References: <20090603125840.GA16209@dupont.ts-a> <4A2CCEDD.6000006@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mail-ew0-f214.google.com ([209.85.219.214]:44852 "EHLO mail-ew0-f214.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752271AbZHOWdg (ORCPT ); Sat, 15 Aug 2009 18:33:36 -0400 Received: by ewy10 with SMTP id 10so2226575ewy.37 for ; Sat, 15 Aug 2009 15:33:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <4A2CCEDD.6000006@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: > This removes -Iarch/${ARCH_DIR}/include when KERNELSOURCEDIR is not > defined. What is the reason for this change? No you've interpreted the change wrong. The "else" part of the if clause ensures this is not removed. Here is how the make if call works: $(if ,,) What my patch does do is *add* this define in for the case when KERNELSOURCEDIR is defined, but at the correct source location. I'd like to ask again if anybody is testing this builds properly against an out of place kernel build, as I've needed these patches across several different machines running different distributions at work, so I'm very sceptical that it can work for many people, doesn't mean I'm right though.. Thanks, James On Mon, Jun 08, 2009 at 11:42:05AM +0300, Avi Kivity wrote: > James Pike wrote: > > Use correct architecture includes when kernel source and build directory > > are different. > > Signed-off-by: James Pike > > > > --- 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)" \ > > "$$@" > > > > > -- > error compiling committee.c: too many arguments to function >