Re: Quoting special characters (was: Re: Possible solution for special characters in makefile paths)

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.make.devel
Message-ID <[email protected]>
> Date: Tue, 25 Feb 2014 20:41:36 +0100
> Cc: [email protected]
> From: Frank Heckenbach <[email protected]>
> 
> > I think we will need to provide a quoting function, something like a
> > wrapper for the gnulib's quotearg module,
> 
> I agree. Though as discussed elsewhere, I'd prefer for make to
> support full shell-style quoting, thus $(quote) could just add ''
> and escape embedded ' characters.

When Make produces file names, like in a call to $wildcard, it should
apply quoting automatically, I think.  But we will still need a
function for the users to quote those parts of the commands which need
quoting.  This is for those cases where the string didn't come from
Make, but was produced by some string manipulation, where Make cannot
possibly track all the quotes that get added or removed.

> And of course, $(quote) (either version) would be POSIX sh
> specific. Users of other shells could write their own quote
> functions (or make might provide some common alternatives under
> other names).

The latter, I guess.  It's not hard, so why not do it?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.