[Top][All Lists]

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

Re: multi-line commands with quoted SHELL

From: Petr Machata
Subject: Re: multi-line commands with quoted SHELL
Date: Wed, 07 Mar 2007 20:03:34 +0100
User-agent: Thunderbird (X11/20070302)

Paul Smith wrote:
The problem is that when SHELL contains quotations etc., /bin/sh is invoked, and whole command is passed through that. But the outer shell then destroys the backslash-newline sequences. The solution is to singly-quote these. The attached patch against make 3.81 does this.

Hm.  Personally I think this is an error and should not be handled, even
as it is currently handled.

Yes, that did cross my mind, but then I though maybe there is some requirement e.g. on side of posix.

If the user sets:

        SHELL = "/bin/sh"

in my opinion make should try to invoke the program
'"/bin/sh"' (including the quotes).  Having a quoted value of SHELL
invoked using /bin/sh -c (with another level of "indirectness") is, in
my opinion, wrong.

I can only assume this behavior of trying to manage quotes in the value
of SHELL is due to some bizarre behavior of some long-forgotten make
that GNU make tried to duplicate.

Probably. I went ahead and opened the bug at savannah, so that it's possible to track and mark resolutions appropriately:


reply via email to

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