[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2019-12-26 Thread Paul D. Smith
Update of bug #41246 (project make): Item Group:None => Enhancement ___ Reply to this item at: ___

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-03-02 Thread Paul Smith
On Thu, 2014-02-27 at 10:53 +0900, Mike Hommey wrote: I have no problems with your original patch. I think I said that right there and then. If Paul agrees, I will commit it. Paul? I'll reiterate my position that (a) I've seen nothing showing that it's inherently impossible for make to

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-03-02 Thread Eli Zaretskii
From: Paul Smith psm...@gnu.org Cc: Eli Zaretskii e...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net Date: Sun, 02 Mar 2014 10:52:33 -0500 I'll reiterate my position that (a) I've seen nothing showing that it's inherently impossible for make to figure out for itself what the right thing

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-06 Thread Eli Zaretskii
Date: Thu, 6 Feb 2014 16:01:06 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net I gave multiple examples already. It doesn't require backslashes to be a problem. Here's another one: $ cat EOF foo.mk default:

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-06 Thread Mike Hommey
On Thu, Feb 06, 2014 at 10:45:39AM +0200, Eli Zaretskii wrote: Date: Thu, 6 Feb 2014 16:01:06 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net I gave multiple examples already. It doesn't require backslashes to be a problem. Here's

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-06 Thread Eli Zaretskii
Date: Thu, 6 Feb 2014 18:54:33 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net The point is, batch shell mode only flag is advertized in config.h as being the workaround for the broken sh -c. I'd like that workaround to be available at

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Eli Zaretskii
Date: Wed, 5 Feb 2014 16:30:25 +0900 From: Mike Hommey m...@glandium.org Cc: Eli Zaretskii e...@gnu.org, bug-make@gnu.org I agree about using backslashes as directory separators, that obviously cannot work in /bin/sh, even on Windows. Actually, with msys sh, it works. But Make doesn't

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Eli Zaretskii
Date: Wed, 5 Feb 2014 16:33:47 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bo...@kolpackov.net, bug-make@gnu.org On Tue, Feb 04, 2014 at 06:54:36PM +0200, Eli Zaretskii wrote: Why are you using backslashes in file names when your shell is a Unixy shell? That makes

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Mike Hommey
On Wed, Feb 05, 2014 at 05:42:17PM +0200, Eli Zaretskii wrote: Date: Wed, 5 Feb 2014 16:30:25 +0900 From: Mike Hommey m...@glandium.org Cc: Eli Zaretskii e...@gnu.org, bug-make@gnu.org I agree about using backslashes as directory separators, that obviously cannot work in /bin/sh,

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Eli Zaretskii
Date: Thu, 6 Feb 2014 05:58:08 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net But the thing is there is still inconsistency in how things end up being invoked whether - make calls them directly - make uses sh -c - make uses sh

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Mike Hommey
On Wed, Feb 05, 2014 at 11:10:11PM +0200, Eli Zaretskii wrote: Date: Thu, 6 Feb 2014 05:58:08 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net But the thing is there is still inconsistency in how things end up being invoked whether

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Mike Hommey
On Thu, Feb 06, 2014 at 06:23:46AM +0900, Mike Hommey wrote: On Wed, Feb 05, 2014 at 11:10:11PM +0200, Eli Zaretskii wrote: Date: Thu, 6 Feb 2014 05:58:08 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net But the thing is there is

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Eli Zaretskii
Date: Thu, 6 Feb 2014 06:23:46 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net On Wed, Feb 05, 2014 at 11:10:11PM +0200, Eli Zaretskii wrote: Date: Thu, 6 Feb 2014 05:58:08 +0900 From: Mike Hommey m...@glandium.org Cc:

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Eli Zaretskii
Date: Thu, 6 Feb 2014 06:31:15 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net Except when make is built with BATCH_MODE_SHELL_ONLY. Which is needed when sh -c fucks up with double quotes. And, more importantly, it's the first two

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-05 Thread Mike Hommey
On Thu, Feb 06, 2014 at 07:44:11AM +0200, Eli Zaretskii wrote: Date: Thu, 6 Feb 2014 06:23:46 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bug-make@gnu.org, bo...@kolpackov.net On Wed, Feb 05, 2014 at 11:10:11PM +0200, Eli Zaretskii wrote: Date: Thu, 6 Feb 2014

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-04 Thread Eli Zaretskii
Date: Tue, 4 Feb 2014 13:34:31 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, bo...@kolpackov.net, bug-make@gnu.org On Sat, Feb 01, 2014 at 11:29:19AM +0200, Eli Zaretskii wrote: From: Paul Smith psm...@gnu.org Cc: Mike Hommey m...@glandium.org, mh+savan...@glandium.org,

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-04 Thread Paul Smith
On Tue, 2014-02-04 at 18:54 +0200, Eli Zaretskii wrote: Another issue is with backslashes in paths. For example: $ cat EOF foo.mk foo: grep foo foo\\bar EOF (Note the is just there to trigger sh -c) This executes sh -c grep foo foo\\bar, which fails with:

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-04 Thread Eli Zaretskii
From: Paul Smith psm...@gnu.org Cc: Mike Hommey m...@glandium.org, bug-make@gnu.org Date: Tue, 04 Feb 2014 12:28:53 -0500 But I do see a problem above; what if the literal file 'foo\bar' (a file with a backslash in the name) existed? Such a file cannot exist on Windows: the backslash

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-04 Thread Daniel Herring
On Tue, 4 Feb 2014, Eli Zaretskii wrote: From: Paul Smith psm...@gnu.org Cc: Mike Hommey m...@glandium.org, bug-make@gnu.org Date: Tue, 04 Feb 2014 12:28:53 -0500 But I do see a problem above; what if the literal file 'foo\bar' (a file with a backslash in the name) existed? Such a file

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-04 Thread Mike Hommey
On Tue, Feb 04, 2014 at 12:28:53PM -0500, Paul Smith wrote: On Tue, 2014-02-04 at 18:54 +0200, Eli Zaretskii wrote: Another issue is with backslashes in paths. For example: $ cat EOF foo.mk foo: grep foo foo\\bar EOF (Note the is just there to trigger sh

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-04 Thread Mike Hommey
On Tue, Feb 04, 2014 at 06:54:36PM +0200, Eli Zaretskii wrote: Why are you using backslashes in file names when your shell is a Unixy shell? That makes little sense to me, and I don't see why Make on Windows should support such use. Unixy shells are supposed to get Unixy file names with

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-03 Thread Mike Hommey
On Sat, Feb 01, 2014 at 11:29:19AM +0200, Eli Zaretskii wrote: From: Paul Smith psm...@gnu.org Cc: Mike Hommey m...@glandium.org, mh+savan...@glandium.org, bo...@kolpackov.net, bug-make@gnu.org Date: Fri, 31 Jan 2014 10:59:13 -0500 My question, or _challenge_ if you like, is

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-02-01 Thread Eli Zaretskii
From: Paul Smith psm...@gnu.org Cc: Mike Hommey m...@glandium.org, mh+savan...@glandium.org, bo...@kolpackov.net, bug-make@gnu.org Date: Fri, 31 Jan 2014 10:59:13 -0500 My question, or _challenge_ if you like, is whether we can find a way to know, without any hints from the user,

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-31 Thread Mike Hommey
Follow-up Comment #10, bug #41246 (project make): This is a different approach to the problem, as suggested by Paul: this triggers batch mode shell when there are double quotes in the recipe. Note this doesn't quite work around all the problems that the previous patch did solve when adding

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-31 Thread Eli Zaretskii
Date: Fri, 31 Jan 2014 09:14:32 + From: Mike Hommey invalid.nore...@gnu.org This is a different approach to the problem, as suggested by Paul: this triggers batch mode shell when there are double quotes in the recipe. This cannot be automatic, as we have deliberately made the double

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-31 Thread Eli Zaretskii
Date: Fri, 31 Jan 2014 22:15:56 +0900 From: Mike Hommey m...@glandium.org Cc: psm...@gnu.org, mh+savan...@glandium.org, bo...@kolpackov.net, bug-make@gnu.org On Fri, Jan 31, 2014 at 11:37:47AM +0200, Eli Zaretskii wrote: Date: Fri, 31 Jan 2014 09:14:32 + From: Mike Hommey

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-31 Thread Mike Hommey
On Fri, Jan 31, 2014 at 11:37:47AM +0200, Eli Zaretskii wrote: Date: Fri, 31 Jan 2014 09:14:32 + From: Mike Hommey invalid.nore...@gnu.org This is a different approach to the problem, as suggested by Paul: this triggers batch mode shell when there are double quotes in the recipe.

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-31 Thread Paul Smith
On Fri, 2014-01-31 at 16:55 +0200, Eli Zaretskii wrote: An option as command line argument, or as a special target as the original patch did? The former, as Paul objected to the latter. I didn't object, per se. I just prefer my tools to DTRT in all cases without me having to use any

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-18 Thread Paul D. Smith
Follow-up Comment #5, bug #41246 (project make): I'm not sure I like the idea of this being a special target in this way. It's also possible that something like this COULD be used on UNIX systems; there are limits to the size of command lines that can be invoked. On newer systems like Linux

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-18 Thread David Boyce
On Sat, Jan 18, 2014 at 4:17 PM, Paul D. Smith invalid.nore...@gnu.org wrote: There are limits to the size of command lines that can be invoked. On newer systems like Linux that limit is pretty large (I think it's 16K or so on Linux) but it exists, and on other systems it's much less. It's

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-18 Thread Mike Hommey
Follow-up Comment #6, bug #41246 (project make): The command line size limit is in the order of several megabytes nowadays on Linux. It used to be much less, though. Arguably, if this was a wanted feature, you would likely have heard people complain when the command line size limit was lower.

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-18 Thread Mike Hommey
Follow-up Comment #7, bug #41246 (project make): I just realized I said something very wrong: BATCH_MODE_ONLY_SHELL is not all all like ONESHELL. It still runs a shell per recipe line. Sorry for the confusion. ___ Reply to this item at:

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-18 Thread Paul D. Smith
Follow-up Comment #8, bug #41246 (project make): I understood that difference; that's why I said The downside of this is that ONESHELL actually behaves differently. However often this doesn't matter so much, particularly on Windows where the rules about what operations impact the parent's

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-18 Thread Paul D. Smith
Follow-up Comment #9, bug #41246 (project make): Also we do sometimes see people complaining about this, where they can't invoke commands because the command line is too long. There are various tricks out there for chunking make variable values containing lots and lots of words into smaller

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-17 Thread Eli Zaretskii
Follow-up Comment #2, bug #41246 (project make): The changes seem simple enough and non-controversial. However, this introduces a new special target, .BATCH_MODE_SHELL (why not .BATCH_MODE_ONLY_SHELL, btw?), which should at least be documented in the manual. Paul, do you agree with adding a new

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-17 Thread Paul D. Smith
Follow-up Comment #3, bug #41246 (project make): Not being familiar with the various different options for shell behavior on Windows, can someone describe for me what BATCH_MODE_ONLY_SHELL does? Does is overlap with ONESHELL? If not is it a feature that might be useful to people on non-Windows

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-17 Thread Mike Hommey
Follow-up Comment #4, bug #41246 (project make): why not .BATCH_MODE_ONLY_SHELL, btw? Apart from making it the same as the macro, the only feels too much for a target name. I don't care that much for the name, though, your pick. which should at least be documented in the manual. Would you

[bug #41246] Allow to switch shell batch mode at runtime instead of build time

2014-01-15 Thread Mike Hommey
Follow-up Comment #1, bug #41246 (project make): I happen to have not been logged in when I submitted, but this bug and patch are mine :) ___ Reply to this item at: http://savannah.gnu.org/bugs/?41246