[Top][All Lists]

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

Re: Bug in sub_proc.c: what to patch?

From: Earnie Boyd
Subject: Re: Bug in sub_proc.c: what to patch?
Date: Fri, 17 Dec 2004 19:01:05 -0500 (EST)
User-agent: SquirrelMail/1.4.3a

<quote who="Alessandro Vesely">
> Earnie Boyd wrote:
>> <quote who="Alessandro Vesely">
>> >
>> > Curiously, the win32 specific function scans the file
>> > looking for a "#! /blah" shebang before invoking the
>> > CreateProcess. I doubt that feature might be useful
>> > for anything, as it would require creating a `#!.bat'
>> > file to be clled by the command interpreter...
>> >
>> IIRC, it will execute sh.exe if one exists and pass a file beginning
>> with
>> #! to it.  One might have sh.exe because of Cygwin or MSYS or Win32
>> versions of zsh or ksh.
> Yes, you'right. I use MSYS, but it works so smoothly that I
> keep forgetting it is still Windows. Anyway, it is possible
> to patch that code so that it also works when using cmd.exe
> or I'm gonna do that soon.

The make provided by MSYS is a copy of some version of source from Cygwin.
 There are local modifications that are not present in the official
source.  It also uses the unix source path instead of the Win32 source

> BTW, what about a read-only variable reporting if the shell
> is unixy? One could then write, e.g.
>    $(if $(NOT_UNIX),if exist *.obj del *.obj,rm -f *.obj)

You mean a runtime environment variable?  Nothing that I would use as a
portable method.  The shell bit would need to be set at runtime.  Besides,
I  could have fileutils installed without a shell and use rm -f for RM
anyway.  You should be sure to check the predefined variables such as RM,
CC, etc and set those appropriately based on the runtime environment then
use the variable in the command.

        $(RM) *.obj



reply via email to

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