[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Make file to recursivly generate code for morethan o
Re: [avr-gcc-list] Make file to recursivly generate code for morethan one target ?
Thu, 3 Jun 2004 14:51:00 -0700
Since the recipes for make are executed by whatever shell is configured you
can simply stick that shell script in the rule and pretend make is doing the
looping when in fact it's really the shell.
script line 1\
script line 2\
Make would call itself with the same makefile.
----- Original Message -----
From: "Geoffrey Wossum" <address@hidden>
Sent: Thursday, June 03, 2004 2:07 PM
Subject: Re: [avr-gcc-list] Make file to recursivly generate code for
morethan one target ?
> On Thursday 03 June 2004 3:54 pm, Anton Erasmus wrote:
> > On 2004/06/02 at 04:45 Sander Pool wrote:
> > >An easy way would be to wrap your makefile into a shell script that
> > >the
> > >MCU type and calls make as often as required ?
> > I would prefer not to use a shell script, as I am sure that one can do
> > with only the makefile itself.
> I use a shell script to build my multiple AVR target applications. I make
> different build directories for each target, and then call make with the
> appropriate -mmcu flag.
> The point is is that the shell script is easy. Here, I'll right an
> right now for you:
> arches="atmega16 atmega32"
> for arch in $arches ; do
> rm -Rf build-$arch
> mkdir build-$arch
> cd build-$arch
> make MCU_CFLAGS="-mmcu=$arch" -f ../Makefile
> cd ..
> See, easy. Sure, you could do it entirely in make, but somehow I don't
> it would as short, as simple, or as easy to maintain as this.
> Geoffrey Wossum
> Software Engineer
> Long Range Systems - http://www.pager.net
> avr-gcc-list mailing list