tech-toolchain archive

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

Re: Per-shell override of path names in make(1)



On Thu, 07 Feb 2008, David Laight wrote:
> The SHELL make/env variable lets you set the shell make should use for
> all its commands.  This can to be a full path.

At run time, make doesn't use $SHELL for anything, AFAIK.  At build
time, configure scripts or the like may choose a value to pass as
DEFSHELL_CUSTOM (via "-D" options to the compiler), and make will then
use that as the default shell for everything it does at run time.

For example, src/build.sh sets HOST_SH, src/tools/make/configure sets
BSHELL, and src/tools/make/buildmake.sh[.in] passes -DDEFSHELL_CUSTOM
to the compiler.  Similarly, pkgsrc/bootstrap/bootstrap may pass
--with-defshell to pkgsrc/devel/bmake's configure script, and that
passes -DDEFSHELL_CUSTOM to the compiler.

> I think the tables are used to sort out how make should drive the
> various shells (eg when trying to use a single shell to execute a
> group of commands).
> As such it should be using the 'basename' of $SHELL to determine
> which table to use.

Yes, it does that if you put ".SHELL: name=csh" in a Makefile.  Who does
that, and do we really need to keep supporting it?

--apb (Alan Barrett)



Home | Main Index | Thread Index | Old Index