[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make 3.80 works, make 3.81 only works with SHELL=
From: |
Paul Smith |
Subject: |
Re: make 3.80 works, make 3.81 only works with SHELL= |
Date: |
Thu, 26 Apr 2007 00:37:05 -0400 |
On Wed, 2007-04-25 at 23:05 -0400, Marty Leisner wrote:
> There's a line
> SHELL="/bin/sh"
> in the makefile...
This is illegal.
Make is not the shell; it does not strip quotes like the shell does.
Quoting is not "harmless" in make. These two variables:
FOO = A
BAR = "A"
are very different; FOO is set to the single character string A, while
BAR is set to the three character string "A".
For SHELL, if you set it to /bin/sh then make will invoke /bin/sh to run
commands, which will work. If you set SHELL to "/bin/sh", then make
will try to invoke the command "/bin/sh" (including the quotes), which
of course doesn't exist.
Now, in reality neither make 3.80 or 3.81 does precisely the right thing
here; however, 3.81 is closer to what should happen: the command should
fail to run at all unless you have created the program "/bin/sh" on your
system (including the quotes).
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist