> From: "grischka" <[EMAIL PROTECTED]> > Date: Mon, 1 May 2006 00:23:07 +0200 > > There was a similar topic here previously, that on windows make does > not stop after errors or sometimes goes into "background" and still for > a while outputs some messages.
I could never reproduce that problem. Someone else said that they could reproduce it, and tried to debug it, but I don't know whether it was finished. > That happens to me when I: > > 1) have quotes on the line, e.g: > gcc -D "VERSION=\"1.2.3\"" ... > > 2) dont have sh.exe in the PATH Please post the shortest Makefile that causes this behavior, and please accompany it with a recipe to reproduce the problem and a transcript of the session that shows the results on your machine. Also, please tell what compiler and development tools were used to build Make, and on what OS, including version, you have the problem. > Actually from the source thats no surprise, as I for one haven't seen > anything that would get process exitcodes back from batch files, > I doubt it would be possible at all. On newer versions of Windows (2000, XP, etc.), batch files do return an exit code. On Windows 9x, the older COMMAND.COM shell indeed always returned zero as an exit code. In any case, even if the exit code is always zero, I could never explain the ``background'' part of that report. Can you? > The other sideeffect from the batch files is that particulary some open > source programs cannot stop it, like not DevCpp with the 'stop make' > button or not rxvt ports via Ctrl-C, either. (Although, the msys dll seems > to abuse TerminateProcess as a kill() replacement, with effect that even > normal (non batch or shell) child processes are left running) Again, on Windows XP with cmd.exe, I don't have any trouble stopping a batch file. If you know how to reproduce this problem, please tell. (I don't use rxvt and DevCpp, so perhaps the problem is limited to those packages, since even on Windows 9x Ctrl-C always stops a batch file.) > Anyway, I dont really see a point in the batch approach. The point is that if you use batch files, you don't need to mess with the quoting required by Windows shells, which is quite different from Posix shells, and thus most of the code that deals with quoting in job.c needs to be rewritten. > The obvious solution would be just passing: > "%COMSPEC% /c line as in makefile here..." > to CreateProcess(...). There was a thread here about this, please read it for the details. Someone was working on trying to avoid batch files, but I don't know how far he got. > I tried it and it seems to work quite well. The simplistic approach you show above will only work for very simple commands. You need to get it to work with Unix-style forward slashes, with redirection, with multiple commands on a single line, with arguments quoted with ".." and '..', etc. If you have a patch that handles all that, by all means show it. _______________________________________________ Make-w32 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/make-w32
