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
>
> EXTRA_CFLAGS = xxx
>
> 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:
EXTRA_CFLAGS :=
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).
Sam
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make