Mail Archives: djgpp/1998/10/28/07:32:06
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 -