www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/19/21:14:59

Date: Wed, 19 Apr 95 17:11:43 EDT
From: den AT aisinc DOT com (Dave New)
To: leisner AT sdsp DOT mc DOT xerox DOT com, UCKO AT VAX1 DOT ROCKHURST DOT EDU
Subject: Re: Bug in DJGPP make
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

Aaron writes:
 
> >>I am trying to port the GNU shellutils to DJGPP.  (They aren't _all_
> >>useless, esp. with ms_sh).  Unfortunately, I am blocked by (among other
> >>things) a bug in DJGPP's make; even though SHELL is set to /bin/sh and
> >>/bin/sh.exe exists, make creates and runs .BAT files (hence implicitly
> >>calling $COMSPEC).  Am I going to have to drastically rewrite all the
> >>makefiles to compensate for this bug?  The prospect does not seem a
> >>pleasant one...
> >
> >I'm in the process of cross-compiling this on Linux.
> >What I'm doing is configuring on linux, hand editing
> >the config.h and run cross-make (is there way a good way to
> >cross-compile configure distributions...I'm lost in the manual...)
> >
> >I found it useful at other times to run configure on a Unix box, 
> >and hand edit the resulting makefiles/configure.in...
> 
> I suppose I _should_ probably have gotten cross-gcc, but I've already
> gone ahead and converted shellish to 4dosish without excessive lossage
> (although I did have to fake `...` stuff, of course).
> 
Not having the GNU sh or whatever, but having the MKS sh, I tried setting the 
SHELL var in the makefile to c:\bin\sh, and it ALMOST worked.  When trying out 
'make distclean' in the gcc-263 source directory, it cleaned my entire d: drive 
for me!  Fortunately, I had a tape backup.  OK, so then some more 
experimenting.  Starting MSK sh before invoking the make still didn't help.
When doing things like if ... fi, it would make command.com-like complaints.
Your mention of COMSPEC provided the key, though.  By setting the environment
var COMSPEC=C:\BIN\SH, I was able to start 'make distclean' from the DOS
command.com prompt, and the makefile invoked the MKS versions of sh and rm and 
seems to work OK.  You still need to set the SHELL var in the makefile, so 
after a 'make distclean' and 'configur', you need to edit the makefile, if your 
'sh' is not on the same drive as the build drive.  This, of course, is a real 
band-aid, but any port in a storm, as they say...  Now we'll see if I can
re-compile the compiler for 386 host/target, without the make bombing out.
Previously, it would blow up occasionally with a memory allocation error
(8 MB system, 50 MB free space on hard drive -- I now have a 16MB system with
121MB free for swap)

DaveN


DaveN

- Raw text -


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