Re: Quoting special characters (was: Re: Possible solution for special characters in makefile paths)
Frank Heckenbach <[email protected]>
| Newsgroups | gmane.comp.gnu.make.devel |
|---|---|
| Message-ID | <[email protected]> |
David A. Wheeler wrote: > > > > Assume there are two files, "foo bar" and "ba\z qu'x". What > > > > does/should happen here? > > > > > > $wildcard could return «foo\ bar ba\\z\ qu\'x» (without the outer > > > quotes) or some such. > > Another approach is for it to return > «foo barTABba\z qu'x» where TAB is the \t character. > The TAB character is also permitted in most Unix-like filesystems, > but practically no one except attackers actually USES this functionality. > This approach is not tied to any particular shell scripting syntax, and > it means that the individual filenames are pristine. But variables don't contain only filenames (and make has no way to even know in many cases what a variable's contents are meant to be). Other strings stored in variables may easily contain tabs, most obviously perhaps ... makefile fragments (consider define...endef). Besides, I don't see how TAB is better than a rarer control character. (I suggested 1-6 and 16-25 as candidates, Paul's original proposal also used 1.) As soon as we do something like this, make needs to en-/decode, and that's the same amount of work with TAB or another character.