delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/15/20:31:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Bob Byrnes" <byrnes AT curl DOT com>
Date: Wed, 15 Sep 2004 20:31:15 -0400
In-Reply-To: <NUTMEGNvke6EEkuHiOy000013c7@NUTMEG.CAM.ARTIMI.COM> from "Dave Korn" (Sep 15, 1:18pm)
Organization: Curl Corporation
X-Address: 1 Cambridge Center, 10th Floor, Cambridge, MA 02142-1612
X-Phone: 617-761-1238
X-Fax: 617-761-1201
To: cygwin AT cygwin DOT com
Subject: RE: Bizarre behaviour of "make --win32"
Message-Id: <20040916003115.D20FBE538@carnage.curl.com>

On Sep 15,  1:18pm, Dave Korn" wrote:
-- Subject: RE: Bizarre behaviour of "make --win32"
> 
> The only thing that has been going wrong here is that when make invokes
> the command through execvp it runs in the same unix-y environment that make
> is running in itself, which defies the purpose of the --win32 switch; when
> the redirection of the command disables this optimisation, it correctly
> launches cmd.exe to execute subcommands.

If your goal is to *always* use cmd.exe, i.e., to completely disable
the optimization, then it should suffice to add ...

    SHELL = cmd.exe

... to your Makefile (you would still use make --win32 in order to enable
various other win32-style Makefile syntax rules).

> --win32 is supposed to use cmd.exe rather than sh.exe to launch
> subprocesses, in order to understand windoze-style backslash-separated paths
> without having to double up all the backslashes to avoid them being taken as
> metachar escapes by the *nix shell.  So it's basically wrong behaviour: this
> optimisation effectively launches the subprocess within a unix environment
> rather than a cmd.exe environment, regardless of MAKE_MODE.
> 
-- End of excerpt from "Dave Korn"

I would tend to agree that the run-simple-commands-directly optimization
is not so useful, or arguably even a bug, for make --win32.  The
optimization is not supposed to affect how the programs run, and it
clearly does.

--
Bob

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019