This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: nls patches - need help with make machinery
- To: martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: Re: nls patches - need help with make machinery
- From: Marc Espie <espie at quatramaran dot ens dot fr>
- Date: Thu, 15 Jun 2000 03:19:45 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <20000603232454.A15290@Jeffreys.suse.de>
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.