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, [email protected] 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: [email protected]
> "Those that do not understand UNIX are condemned to reinvent it, poorly"
>   - Henry Spencer



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to