make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Newbie problems?


From: Sauder, Vernon
Subject: RE: Newbie problems?
Date: Mon, 10 Nov 2003 15:34:09 -0500

>> Someone suggested this is because GNU make tries to use
>> a CreateProcess() instead of a System() call.

>What's wrong with CreateProcess?  If the rule's commands don't 
>involve any features specific to a shell, like wildcards and redirection,
>why do we need to use System?

There is a problem with GNU make 3.80 in that "move" is not recognized as a
command that needs the shell. CreateProcess tries to turn a process called
move and this is not a valid command on Windows. I patched my version but
did not submit it. The job spawning method defaults to just running a
process of the given name if it doesn't think it needs the shell. This is
not always correct as aliases and such would not be available as well as
internal commands. It has a list of internal commands but it is not quite up
to date. 

Here is the essence of the patch to job.c:
2465,2466c2465,2466
<                            "erase", "exit", "for", "goto", "if", "if",
"md",
<                            "mkdir", "path", "pause", "prompt", "rd",
"rem",
---
>                            "erase", "exit", "for", "goto", "if", "md",
"mkdir",
>                            "move", "path", "pause", "prompt", "rd", "rem",

> I wish I could figure a way to control how shells and commands are 
> invoked without messing with make's source code or such mucking 
> around. Any pointers to any tips on this?

The quick fix is to make all calls to "move" use "cmd /c move" for Windows
NT/XP. For safety all around, if you know that the "command" you are using
is not an executable file, then add the "cmd /c" prefix.

Vernon Sauder
 Office: +1 301.417.1798
 Email: address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]