help-make
[Top][All Lists]
Advanced

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

RE: variables-as-targets driving me insane


From: Luke Shumaker
Subject: RE: variables-as-targets driving me insane
Date: Mon, 04 Oct 2010 00:46:38 -0400

No problem!

Also, don't forget to CC the mailing list for posterity.

~ LukeShu

On Mon, 2010-10-04 at 15:43 +1100, address@hidden wrote:
> That's brilliant! Works 100% - I knew I was missing something simple; thanks 
> for the tip.
> 
> Cheers,
> Matt van de Werken.
> ________________________________________
> From: Luke Shumaker address@hidden
> Sent: Saturday, October 02, 2010 8:13 AM
> To: Van De Werken, Matt (CESRE, Pullenvale)
> Cc: address@hidden
> Subject: RE: variables-as-targets driving me insane
> 
> Don't do that.  Try this:
> 
> ifneq ($(filter avrlib avrtest,$(MAKECMDGOALS)),)
> PLATFORM=avr
> endif
> 
> ifneq ($(filter dylib,$(MAKECMDGOALS)),)
> PLATFORM=osx
> endif
> 
> ### end ###
> 
> This does make the assumption that the only way to make the dylib,
> avrlib, and avrtest targets is to specify them on the command line; that
> no other targets depend on them.  This can easily be fixed by adding any
> of these targets into the test.
> 
> ~ LukeShu
> 
> On Fri, 2010-10-01 at 14:35 +1000, address@hidden wrote:
> > I guess as with most things of this nature, "it's a feature, not a
> > bug". I have worked around the problem by assigning the PLATFORM
> > variable in the make invokation, ie:
> >
> > # make PLATFORM=avr avrlib
> >
> > It works fine now, and is a small price to pay as against the cost of
> > reengineering my Makefile.
> >
> > Thanks to all who responded,
> >
> > Cheers,
> > --
> > Matt van de Werken
> > Electronics Engineer
> > Mining Geoscience, CSIRO Earth Science and Resource Engineering
> > 1 Technology Ct   Pullenvale   QLD   4069
> > P: 07 3327 4142  F: 07 3327 4455  M: 0400 538 608
> > E: address@hidden
> > "Those that do not understand UNIX are condemned to reinvent it, poorly"
> >   - Henry Spencer
> 
> 





reply via email to

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