RE: why does command echo \\\foobar print \\foobar
"Mark Galeck (CW)" <[email protected]>
| Newsgroups | gmane.comp.gnu.make.windows |
|---|---|
| Message-ID | <49DA8B716852DE4CA0B749102D55CC7A96AC5B1775@HQ-EXCH-6.corp.brocade.com> |
OK, so let me hazard a "rule". With GNU make on Windows, in the middle of a rule command, and when the command is not "built-in", then "\" is an escape character. In particular, when parsing left-to-right, "\\" will escape itself and pass "\". However, to be compatible with Windows paths, "\" will not escape the next character, if it could be the beginning of a file or directory name, so "\foobar" will pass "foobar". (Now this still leaves us what happens when the next character is not \ and not a beginning of a filename, but that is of no concern to me right now) Does this sound about right and can I expect this rule should always work? >It does that only when it does not invoke builtin commands.