[Top][All Lists]

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

Re: $(shell ...) and SHELL problems in 3.81

From: Eli Zaretskii
Subject: Re: $(shell ...) and SHELL problems in 3.81
Date: Mon, 16 Apr 2007 23:57:48 +0300

> Date: Mon, 16 Apr 2007 13:27:10 -0700 (PDT)
> From: Aaron Shatters <address@hidden>
> Actually, why would it ever pass a -c option to cmd.exe in this case.

Because that's what GNU Make does with _any_ $(SHELL): it invokes it
with the -c option followed by the command line.

> cmd.exe is not a unixy_shell, and it is a batch_mode_shell, and echo is one 
> of the shell commands.  It should be using batch mode, which discards the 
> "C:/WINNT/system32/cmd.exe -c" part before dumping the command to a temporary 
> batch file.

You are reading the wrong code: the Cygwin build of make does not use
the batch_mode_shell stuff, it behaves exactly as Make would on a
Posix system, i.e. it runs the normal Unix portions of the code.
Batch mode was coded for the native Windows port of Make, e.g. the one
that you build with MinGW.  (You will see that those parts are
conditioned by #ifdef WINDOWS32, which does not catch the Cygwin

reply via email to

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