'make check' fails if there is a space in the filename
vincent at vinc17.net
Fri Nov 13 11:57:26 UTC 2015
On 2015-11-13 11:00:21 +0100, Niels Möller wrote:
> Vincent Lefevre <vincent at vinc17.net> writes:
> > 3. This is a very complex issue due to the way Bourne/POSIX-compatible
> > shells work, and it will probably never be fixed, in particular
> > because a proper fix would slow things down for everyone.
> My experience is that it's usually no big deal to write shell scripts
> with proper quoting to support filenames with spaces. Highly
> The larger problem is that make really wants space for a separator. Not
> sure if it's possible at all to do proper quoting in make, and if it's
> possible, it's not going to mix well with sh quoting.
The first issue is a practical consequence of the second one. Quoting
is not always used because the goal is to support list of filenames
as well (the only safe separator would be \0, but this may not be
supported by every tool).
IMHO, the cleanest solution would be to using % escaping like in URL's.
But this requires encoding/decoding at the right places. Not easy to
add for an existing complex software like libtool.
> And on top of that, there's Makefile conventions, like supporting
> CC="gcc -m32", which is used without sh-quoting the Makefile, and that's
> fundamentally incompatible with supporting CC="/tmp/a b/cc".
Yes. To support "/tmp/a b/cc", one could write CC="/tmp/a?b/cc", but
this is ambiguous and here in /tmp, not safe at all.
IMHO, if people want spaces in filenames, they should use something
like the non-break space (BTW, this was the RISC OS method to support
them in filenames).
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-bugs