delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/02/29/14:55:46

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <4.1.20000229143001.02152f00@pop.mathworks.com>
X-Sender: paulk AT pop DOT mathworks DOT com
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Tue, 29 Feb 2000 14:54:17 -0500
To: charlie AT hand-family DOT org, cygwin AT sourceware DOT cygnus DOT com
From: Paul Kinnucan <paulk AT mathworks DOT com>
Subject: Re: Make problem
In-Reply-To: <200002291816.NAA15176@smtp.mathworks.com>
References: <200002280744 DOT XAA10334 AT shell DOT tsoft DOT com>
Mime-Version: 1.0

At 10:16 AM 2/29/00 -0800, Charlie Hand wrote:
>> I'm running bash 2.06 on Windows98.
>> 
>> I'm trying to learn how to use make in this environment.
>> 
>> Every time make tries to execute a command, it says:
>> /c: /c: No such file or directory
>> 
>> It gives this same message regardless of the command.
>> 
>> For example, for the following small makefile:
>> 
>> SHELL = bash
>> ProjectX::
>> 	echo hello
>> 
>> The output is:
>> 
>> "C:/cygnus/cygwin-b20/H-i586-cygwin32/bin/bash.exe"-2.02$ make
>> echo hello
>> /c: /c: No such file or directory
>> make: *** [ProjectX] Error 127
>> 
>> I can run the command "echo hello" at the bash prompt, and it runs 
>> correctly. In general, I can run commands in the shell, and never 
>> have any problems, nor do I ever see this "/c: /c:" thing.
>> 
>> I've tried the --win32 switch, and it doesn't make any difference.
>
>I removed the SHELL=bash assignment, and it works correctly. It 
>even appears to be running commands in bash.
>

This is  what is happening, Charlie. You are running Cygnus make in its
win32 mode. In this mode, make uses the DOS command shell switch /c to
launch commands. However, you then tell make to use bash as the SHELL. In
win32 mode, make does know anything about Unix shells. So it continues to
use /c as the command switch even though it is now using unknowingly a Unix
shell. Thus, in effect with your little make file, make is doing

bash /c "echo hello"

Now, if you don't believe me, fire up bash in Emacs and enter 

bash -c "echo hello"

and then

bash /c "echo hello"

and observe the output of make in each case. You will note that in the
latter case the error message is exactly the one you are getting. If you
want to use bash as your make shell, you have to run make in Unix mode,
which you do by setting the Cygnus environment variable MAKE_MODE to Unix.
This BTW is in the FAQ item that I posted in response to your plea for any
information on the Cygnus version of make and that you then cavalierly
dismissed as obvious. 

- Paul


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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