On Saturday 18 July 2009 19:07:13 Garrett Cooper wrote:
> On Sat, Jul 18, 2009 at 3:22 PM, Mike Frysinger wrote:
> > On Saturday 18 July 2009 17:25:58 Garrett Cooper wrote:
> >> On Wed, Jul 15, 2009 at 9:37 AM, Mike Frysinger wrote:
> >> > On Sunday 12 July 2009 01:49:52 Garrett Cooper wrote:
> >> >> +# Avoid overwriting definitions in leaf callers.
> >> >> +CPPFLAGS     ?= @CPPFLAGS@ -I$(includedir)
> >> >> +CFLAGS               ?= @CFLAGS@
> >> >> +LDLIBS               ?= @LIBS@
> >> >> +LDFLAGS              ?= @LDFLAGS@ -L$(libdir)
> >> >
> >> > this looks like it'll cause problems if you set these in your
> >> > environment export CPPFLAGS='' CFLAGS='-pipe' LDFLAGS=''
> >> > make
> >> >
> >> > i would use $(origin ...) to determine whether the variables are
> >> > coming from the leaf Makefile
> >>
> >> Ah, yes. Excellent point.
> >>
> >> So what's the appropriate protocol then:
> >>
> >> If set in environment, ignore?
> >> Or:
> >> If set in Makefile, ignore?
> >
> > if it's set in the env, the "?=" should already handle that.  i cant
> > think of a reason for the leaf makefiles to be settings default flags ...
> > do you have an example in mind ?
>
> Yes, actually. The problem with the current system is that we keep on
> using +=, which bloats the CFLAGS / LDFLAGS / LDLIBS, etc
> unnecessarily, so if we get 5 levels deep we end up with a line like:
>
> gcc -I../../../../../include -I../../../../include -I../../../include
> -I../../include -I../include
>
> etc.
>
> Now that's just plain silly and we'll run into ceilings very quickly
> with long argument lines, plus it'll slow down gcc / binutils with the
> search path.

well that should be addressed independently.  have the .mk export some 
variable like LTP_BUILD_INITIALIZED = yes, and then stick all of these 
defaults and appends behind that.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to