bug-make
[Top][All Lists]
Advanced

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

Re: [PING] [PATCH] Escape space in path to $SHELL


From: Paul Smith
Subject: Re: [PING] [PATCH] Escape space in path to $SHELL
Date: Wed, 12 Jul 2023 11:19:32 -0400
User-agent: Evolution 3.48.3 (by Flathub.org)

On Wed, 2023-07-12 at 17:11 +0200, Torbjorn SVENSSON wrote:
> > * src/job.c (construct_command_argv_internal): Escape space in
> > $SHELL

Unfortunately this is so simple.  Currently the spaces in the SHELL
variable are not escaped, and things like this work:

    SHELL := /bin/sh -x

and do what you expect.  Or, perhaps you use a different shell than
/bin/sh and you add options that way.

I fully agree with you that it is not great that we have this, plus
.SHELLFLAGS, plus poor support for whitespace in pathnames (including
in the path of the SHELL program) but it is what it is.

My suspicion is that this non-backward-compatible change will break
some number of makefiles.

I would prefer to avoid doing this until we can make a comprehensive
and complete set of changes around show shells are managed and invoked,
so that we don't need to make backward-incompatible changes across
multiple releases (if they are needed).

In short, the fact that GNU Make doesn't work well with pathnames
containing whitespace is not limited to targets and prerequisites: it's
also true for programs that make invokes including the value of SHELL.



reply via email to

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