[Top][All Lists]

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

Re: make environment

From: John Graham-Cumming
Subject: Re: make environment
Date: Wed, 11 May 2005 10:15:06 -0400

On Tue, 2005-05-10 at 14:32 -0700, Adam Heinz wrote:
> Why is make substituting in a default $SHELL?

GNU Make sets SHELL and doesn't take it from the environment.  Here's
the explanation from the GNU Make manual:

"Unlike most variables, the variable `SHELL' is never set from the
environment.  This is because the `SHELL' environment variable is used
to specify your personal choice of shell program for interactive use.
It would be very bad for personal choices like this to affect the
functioning of makefiles.  *Note Variables from the Environment:
Environment.  However, on MS-DOS and MS-Windows the value of `SHELL' in
the environment *is* used, since on those systems most users do not set
this variable, and therefore it is most likely set specifically to be
used by `make'.  On MS-DOS, if the setting of `SHELL' is not suitable
for `make', you can set the variable `MAKESHELL' to the shell that
`make' should use; this will override the value of `SHELL'."

There's a long discussion of SHELL on the various platforms in the GNU
Make documentation:

You can override GNU Make's behaviour if you need to by setting SHELL in
a Makefile.

John Graham-Cumming

GNU Make Standard Library:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]