avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Makefiles, $(AS) $(ASFLAGS) - simple-minded question


From: Dave N6NZ
Subject: Re: [avr-gcc-list] Makefiles, $(AS) $(ASFLAGS) - simple-minded question
Date: Sun, 24 Feb 2008 09:23:02 -0800
User-agent: Thunderbird 1.5 (X11/20051201)



Anton Erasmus wrote:
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.

YES YES YES OF COURSE!!!! AND I AM SHOUTING!!!!

I understand all these trivial basics. I first wrote a makefile over 30 years ago. The points is, they *can* be exported, and since I am writing makefiles that are called from other makefiles, I have exported variables to communicate between them. As it turns out, I decided not to export ASMFLAGS for other reasons. And I found the definitive documentation needed to avoid collisions.

I was only asking the *very* simple question of how to determine if I would collide with the gcc driver. Which is well documented, once I found the right place to look. You do realize gcc is not a monolithic executable?

*grump*

-dave


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



_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list






reply via email to

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