nls patches - need help with make machinery

Marc Espie espie@quatramaran.ens.fr
Wed Jun 14 18:20:00 GMT 2000


In article < 200006032205.AAA07086@loewis.home.cs.tu-berlin.de > you write:

>INTLLIBS = @INTLLIBS@
>
>and then add this to all places in ch/Makefile.in where INTLLIBS is
>added in the cp Makefile (i.e. LIBS and LIBDEPS).

>P.S. What is the rationale for indirecting every configure variable
>through a Makefile variable?

It's a not-well-known, fairly useful trick.
If you enter

make CFLAGS=-O2

then the value you give on make's command line overrides what's in 
the Makefile (granted, this does not work for recursive builds).
(not to be confused with 'CFLAGS=-O2 make', in /bin/sh, which does set
the env variable CFLAGS, which does NOT override whatever is in the Makefile)

If you simply have 
LIBS=-lfoo -lintl -l${DASDWE}
and you want to override -lintl (say, with specialbuild/libintl.a to test
something), you have to override LIBS.
Whereas
make INTLLIBS=specialbuild/libintl.a
is simpler and faster.

The large advantage of not having to edit the Makefile is that of course,
you won't forget to edit it back later.


More information about the Gcc mailing list