Re: make "addtree" function doesn't look right

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

 



On Tue, Nov 20, 2007 at 06:14:22AM -0500, Robert P. J. Day wrote:
> On Tue, 20 Nov 2007, Sam Ravnborg wrote:
> 
> > On Tue, Nov 20, 2007 at 05:52:16AM -0500, Robert P. J. Day wrote:
> > >
> > >   (as an aside, my apologies for the recent, nitpicky posts but i've
> > > decided to understand the build structure once and for all and, well,
> > > i am all about the nitpick. :-)
> > >
> > >   from scripts/Kbuild.include:
> > > ...
> > > # Prefix -I with $(srctree) if it is not an absolute path.
> > > addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)
> > > ...
> > >
> > > just from the comment, i would have thought then that if i passed,
> > > say, the string "-Ia -I/b", the result should be "-I$(srctree)/a
> > > -I/b", no?  in short, non-fully-qualified entries should be
> > > fully-qualified, while those already filly qualified should be left
> > > untouched, correct?
> >
> > addtree are supposed to be passed only one option - see how it is used
> > just a few lines below.
> > And note - addtree is a purely internal function to Kbuild - it is not
> > supposed to be used outside Kbuild.include.
> 
> ok, but still, that routine doesn't just prefix that -I option with
> $(srctree), it adds a second fully-qualified entry, so that if it is
> passed, say, "-Ifred", what you get back is "-I/src/fred -Ifred" --
> in short, an *additional* entry, not just a *different* entry.
> 
> it may be that that's what you want, but it's certainly not obvious
> from the comment above it.  at the very least, that comment should be
> tweaked, no?
It is what we want - so yes the comment should be updated.
And the comment for the flags function should explain why
we do this - why this is needed to support separate output
directory.

	Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux