> From: "J. David Bryan" <[EMAIL PROTECTED]> > Date: Fri, 17 Feb 2006 11:35:31 -0500 > CC: [email protected] > > Thank you for the explanation. However, it appears that cmd.exe actually > doesn't mind the extra quotes. I tried this from cmd.exe under both NT 4.0 > and XP: > > mkdir "b c" > echo Hello from subdir > "b c\msg.txt" > cmd /c "cd "b c" && type msg.txt" > > ...and "Hello from subdir" appeared.
Yes, I know about that. But you see, Make's code doesn't know about special quoting rules of CMD, it _does_ think that an embedded quote needs to be escaped. And that's what I was trying to explain: doing this without batch files brings additional complications in the code that generates the command line to be passed to the programs invoked by Make. > My initial tests seem to indicate, though, that the command that would be > written to the batch file could be passed directly to cmd.exe instead, > without alteration. So, unless there's some pathological case that I'm not > grasping, batch files could be bypassed, and the shell could be invoked > directly for cmd.exe. > > I'll investigate a patch for this, if you think that it's a reasonable > change. By all means, give it a try. Just be sure to test all the special constructs, like redirection and pipes, wildcards, () grouping, ^ escapes, etc. Also, make sure you test with external programs as part of the command line, not only cmd internal commands, because the startup code of the Microsoft runtime has its own ideas about quoting. _______________________________________________ Make-w32 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/make-w32
