This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why CFLAGS works but not name_CFLAGS sometimes?



On dinsdag, mei 6, 2003, at 07:24 Europe/Amsterdam, <cs@gnumatica.com> wrote:


Is there a reason sometimes name_CFLAGS
does not work and you must just do CFLAGS because
just CFLAGS by itself works???

This could be the case if you want to overrule an option in name_CFLAGS that is also in CFLAGS (for instance change the optimization setting).
Because automake compiles with '$(CC) ... $(name_CFLAGS) $(CFLAGS) ...' an option in name_CFLAGS will be overruled by the option in CFLAGS. At least for gcc (but AFAIK this is the same for any compiler/linker) the last option has the highest precedence. The same holds for CPPFLAGS and LDFLAGS.
However, there is one exception, which is the '-I' and '-L' options (in that case the first occurance has higher precedence).


Is this what you meant? Otherwise sent an example of what went wrong exactly.

Regards,
Sander




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]