Follow-up Comment #5, bug #30714 (project make): But this is exactly the case. Searching for 'move' in PATH fails, so shell should be started to parse the command. However, instead of starting the shell the command is just being passed to the system, and the system fails to run it.
Let me illustrate it. Suppose the following Makefile: foo: bar move /y $< $@ bar: baz copy $< $@ baz: mem > $@ 'mem' in baz target is C:WINDOWSSYSTEM32mem.exe, 'copy' in bar target is a recognized built-in, while 'move' in foo target is an unrecognized built-in. See what happens: $> make -d [...] Updating goal targets.... Considering target file `foo'. File `foo' does not exist. Considering target file `bar'. File `bar' does not exist. Considering target file `baz'. File `baz' does not exist. Finished prerequisites of target file `baz'. Must remake target `baz'. Creating temporary batch file D:Profilesakm022LOCALS~1Tempmake8964-1.bat mem > baz CreateProcess(D:Profilesakm022LOCALS~1Tempmake8964-1.bat,D:Profilesakm022LOCALS~1Tempmake8964-1.bat,...) Putting child 0x009647b0 (baz) PID 9860272 on the chain. Live child 0x009647b0 (baz) PID 9860272 Main thread handle = 0x000007c0 Reaping winning child 0x009647b0 PID 9860272 Cleaning up temp batch file D:Profilesakm022LOCALS~1Tempmake8964-1.bat Removing child 0x009647b0 PID 9860272 from chain. Successfully remade target file `baz'. Finished prerequisites of target file `bar'. Must remake target `bar'. Creating temporary batch file D:Profilesakm022LOCALS~1Tempmake8964-1.bat copy baz bar CreateProcess(D:Profilesakm022LOCALS~1Tempmake8964-1.bat,D:Profilesakm022LOCALS~1Tempmake8964-1.bat,...) Putting child 0x009669a0 (bar) PID 9860272 on the chain. Live child 0x009669a0 (bar) PID 9860272 1 file(s) copied. Reaping winning child 0x009669a0 PID 9860272 Cleaning up temp batch file D:Profilesakm022LOCALS~1Tempmake8964-1.bat Removing child 0x009669a0 PID 9860272 from chain. Successfully remade target file `bar'. Finished prerequisites of target file `foo'. Must remake target `foo'. move /y bar foo CreateProcess(NULL,move /y bar foo,...) process_begin: CreateProcess(NULL, move /y bar foo, ...) failed. Putting child 0x009687e8 (foo) PID 9860272 on the chain. Live child 0x009687e8 (foo) PID 9860272 make (e=2): The system cannot find the file specified. Reaping losing child 0x009687e8 PID 9860272 make: *** [foo] Error 2 Generally for baz and bar targets shell is executed (batch file created and run - note the first argument to CreateProcess is non-NULL). This happens when either a) command is found on PATH or b) command is a known built-in. What happens in foo target is that make tries to run the command directly through the system, which is against what documentations states about it ("they are executed by invoking a new subshell for each line"). My point here is that the shell should be called here, not the system directly. After all the system won't do anything more than the shell would do, but it can do less because of shell built-ins which are valid only in shell (and the system won't process them). _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30714> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make