Definitions of INSTALL

Marc Espie espie@quatramaran.ens.fr
Mon Apr 2 16:22:00 GMT 2001


In article <20010331125021.A951@lauras.lt> you write:
>
>> The toplevel Makefile.in hardcodes INSTALL to be the install-sh shell
>> script, whereas gcc/Makefile.in uses @INSTALL@ detected by configure.  
>> Why the difference?
>
>I was going to make a patch which passes down INSTALL top level only if it is
>overriden from command line, like I've done with RANLIB. If I understand
>things correctly, this mess is just a side effect of putting gcc source
>into Cygnus tree.

If you have something which looks like a posix make, variables passed
on the command lines are passed to submakes. You actually have to actively
avoid that if you don't want that effect. In fact, doing
${MAKE} INSTALL=something
from within a Makefile is plainly obnoxious, as it overrides whatever
setting the guy who invoked the Makefile was wanting.

You could try something like:
: ${INSTALL:-something} && ${MAKE} INSTALL=${INSTALL}
which at least only passes down INSTALL=something if INSTALL was not already
set...

Note that some non-posix makes (notably old bsd make) don't pass variables
set on the command line to submakes.

These usually need to be accommodated for but, in my opinion, not by losing
the very valuable feature that posix make provides in this case.
There's a very good reason why those variables are passed to submakes...



More information about the Gcc mailing list