This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Make problem


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]