[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: With SHELL=cmd, make fails to execute bat file paths starting with .
Re: With SHELL=cmd, make fails to execute bat file paths starting with ../
Sat, 04 May 2013 10:23:06 +0300
> From: Duane Campbell <address@hidden>
> CC: "address@hidden" <address@hidden>, Duane Campbell
> Date: Fri, 3 May 2013 16:21:23 -0700
> I think gnu-make users need to be responsible for quoting (and proper
> slashes) for the cmd.exe shell.
I couldn't agree more. Make cannot fix something the shell doesn't
accept on its command line. Make can only be required not to ruin
something a shell will accept.
> Here are some problems with proposal for special handling of argv ending
> .bat (or .cmd which is an alternate extension for batchfiles).
> - What should make do if argv is "foo" ("foo" could be a .bat file, a .exe
> (or any other registered type))
> - When argv is "foo.bat" it might actually be an executable that runs
If you are talking about the special handling of batch files with
whitespace in their names, then these two problems do not exist with
the current implementation. That's because the decision whether the
special handling should be in effect is made _after_ Make already
searched and found argv, and determined its full absolute file
name, including the extension. In addition to cleanly solving the
difficulties you mention, this solution has the benefit of doing TRT
with batch files which have whitespace characters in their leading
directories, not in their basenames.
(And yes, both .bat and .cmd batch files get this special handling.)