www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/28/07:32:06

Message-ID: <36371C29.B319127F@clover.c2d.fedex.com>
Date: Wed, 28 Oct 1998 07:29:13 -0600
From: Walter Moore <walter AT clover DOT c2d DOT fedex DOT com>
Organization: Federal Express
X-Sender: "Walter Moore" <walter AT clover DOT c2d DOT fedex DOT com> (Unverified)
X-Mailer: Mozilla 4.04 [en]C-FedExIntl (Win95; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: makefile probs
References: <3634D56D DOT B8834474 AT clover DOT c2d DOT fedex DOT com> <3634EC3F DOT 4BCFF70A AT montana DOT com> <36365376 DOT 37C16E42 AT cartsys DOT com>
Reply-To: djgpp AT delorie DOT com

Nate Eldredge wrote:
> 
> bowman wrote:
> >
> > Walter Moore wrote:
> > >
> > > Question,
> > > This make file works with gmake on solaris, why do I get complaints
> > > on Win95? These are the errors I get, which I believe are due to the
> > > lines with '-@if':
> > > Syntax error
> > > Bad command or file name
> >
> > are you running bash or an equivalent as a shell? That is the error I
> > get if
> > I try to feed a @do construct to command.com.
> 
> The `@' part works fine, it just tells `make' not to echo the command
> line.  But you have a Unixy-shell style `if' in there, and a few other
> things.  If you get and install `bash', I believe things will work (you
> might have to set SHELL=bash, read Make's README.DOS).

Give the man a prize!

Turns out this is exactly what I had to do. I had bash installed,
and was compiling from within bash, but I had not defined SHELL=/bin/sh
or SHELL=/bin/bash. When I added a line to the makefile that set 
SHELL=/bin/sh, it worked like a champ! Setting it to /bin/sh also
allowed the makefile to be used in the UNIX world with no change.

Make, on the PC, will look first in /bin for the shell. If it is not
where you said in the makefile, it will search the path and use the
first one it finds. This is not the case if you set SHELL outside of
the makefile, in that case, the path must be exact and correct.

I set the SHELL within the makefile to ensure no one would have to 
do anything outside of run make to compile my programs in the future,
if they have the djgpp environment set up.

thanks all!

Walter
-- 
Walter Moore                Sr. Programmer Analyst
Federal Express             wbmoore AT fedex DOT com
2813 Business Park          Memphis TN 38118 USA
work: 901-369-2640          fax: 901-369-3634

- Raw text -


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