[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Makefiles, $(AS) $(ASFLAGS) - simple-minded question
From: |
Anton Erasmus |
Subject: |
Re: [avr-gcc-list] Makefiles, $(AS) $(ASFLAGS) - simple-minded question |
Date: |
Sun, 24 Feb 2008 15:26:11 +0200 |
On 23 Feb 2008 at 23:12, Dave N6NZ wrote:
>
>
> Anton Erasmus wrote:
> > Normally .S (Upper case S) should be processed by avr-gcc and not by
> > avr-as.
> > .S files are first pre-processed by the normal C processor.
>
> I see that now from some other documentation that I found.
>
> >
> > avr-gcc have no concept of $(ASFLAGS) or any other make definition.
> Not quite true... there is a list of environment variables that the gcc
> driver consults. It turns out ASFLAGS is not one of them, even if it
> does get exported, which is the root of my question.
Make variables are not environment variables. One can define variables in the
environment, which then can be used by make, but variables defined in make
are not necessarily visible in the environment from which the make file was
executed.
Also make variable are evaluated only when needed, not when first found in the
make file.
Also the same variable in a make file can have a different value depending on
when it is
used.
O'Reilly publishes a very nice book "Managing projects with gnu make". This is
an excellent
book which explains the sometime odd behaviour of make variables very well.
Regards
Anton Erasmus--
A J Erasmus