[Top][All Lists]

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

Re: Make behaviour changes with new kernel?

From: Sam Ravnborg
Subject: Re: Make behaviour changes with new kernel?
Date: Tue, 22 Sep 2009 19:23:34 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Aug 15, 2009 at 05:17:23PM -0700, julvr wrote:
> OK, after some more investigation, it looks like this boils down to whether
> EXTRA_CFLAGS is recursivly expanded or simply expanded...  But again, I'm a
> bit out of my depth in this:  In the kernel, there are several places where
> you see
> and others where you see
> EXTRA_CFLAGS := xxxx
> (usb/storage/Makefile and fs/ntfs/Makefile for example)and then a whole lot
> of += modifiers...   So if you have both of these in your make-path, which
> one takes precedence?

In the kernel we handle directories individually.
And we have in a file that is seen by make _before_ your Makefile the following:


So if you do "+=" then make see this as a simple assignment.

> julvr wrote:
> > 
> > I am trying to compile a driver for the latest linux kernel, and I ran
> > into a difference on how the old and new kernels run sub-makefiles, and
> > I'm curious as to why.  I have a makefile similar to the following:
> > 
> > 
> > include submakfile
> > VAR1 += somevalue

Looks like you try to do something that is more complex than what any of
the in-kernel users do.
In other words - consider if you can simplify this.

Sometimes the best choise is to split it up so you have a clean 2.6
Makefile (name it Kbuild and kbuild will pick it up automagically).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]