delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/19/20:39:17

From: mgarris AT nist DOT gov (Michael D. Garris)
Subject: B20: make "/c" error when SHELL=/bin/sh
19 Nov 1998 20:39:17 -0800 :
Message-ID: <36544088.F7BBE736.cygnus.gnu-win32@nist.gov>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Context: B20 on NT 4.0 using cygwin-32 make.exe and sh.exe


I didn't find this reported when searching the archives on "make".
A problem arises when assigning /bin/sh as the command interpreter with:
	SHELL=/bin/sh

Error occurs when the following simple command block is
interpreted in the sample make script:

SHELL=/bin/sh
it:
	echo hi

The error generated is:
	"/c: Can't open /c"

From investigation I determined that the cygwin-32 make.exe
is automatically inserting a "/c" option when invoking /bin/sh
on the command block.  The cygwin-32 sh.exe doesn't recognize
the "/c" option, but rather takes the "-c" option.  Using the
"strings" command, I isolated the "/c" in the make.exe and
using emacs edited the binary, changing "/c" to "-c" and the
command block proceeds to be interpreted correctly.

This inconsistency should be somehow resolved for future distributions
as my kludge is no long-term solution.

The example command block provided is very simple.  In reality
I am compiling a large amount of legacy C code from Suns and SGI
onto NT 4.0.  This code is in custom bin and library source trees
and under UNIX I use a hierarchical makefile script system to
keep compilations and libraries up to date.  My legacy makefile scripts
use /bin/sh commands to walk the source code directory hierarchy
and that is why I stumbled onto this problem.

Thanks for your time,
Mike


-- 
Michael D. Garris
mgarris AT nist DOT gov
VOICE: 301-975-2928
FAX:   301-975-5287

National Institute of Standards and Technology
100 Bureau Dr, STOP 8940
Gaithersburg, MD  20899-8940
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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