help-make
[Top][All Lists]
Advanced

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

Re: Odd effects from setting SHELL?


From: Philip Guenther
Subject: Re: Odd effects from setting SHELL?
Date: Mon, 25 Jun 2007 12:34:34 -0600

On 6/25/07, Christian Convey <address@hidden> wrote
...
Most users of the makefiles had no problems, but most users also had
csh as their default shells.  I have bash as a default shell, and I
had problems.  Specifically, lines like this:

   makedepend >& /dev/null

I said to myself, "That looks like valid csh redirection, but invalid
bash redirection.  I  bet that's the problem.

As an extension, some versions of bash treat ">&word" as ">word 2>&1"
if 'word' doesn't expand to one or more digits or to just a hyphen.
Check your system's manpage and experiment a bit...


So what puzzles me is that I was seeming to get a build error that was
shell-specific.  Yet I see plenty of information from man pages, folks
like you, etc. that say I should never be seeing shell-specific build
errors.

Make will use /bin/sh by default when invoking commands, but by
default it does *not* override the value of SHELL in the environment
of the commands.  Indeed, if you don't explicitly set SHELL in the
makefile, then ${SHELL} will expand to the shell of the user invoking
make.  So, any rules that explicitly use ${SHELL} or that invoke
commands that use SHELL internally may behave differently for
different users.


Philip Guenther




reply via email to

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