delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/26/10:34:06

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: big10p AT hotmail DOT com (Chris Chadwick)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Should I use bash as default shell in makefiles?
Date: 26 Dec 2001 07:26:49 -0800
Organization: http://groups.google.com/
Lines: 23
Message-ID: <809aeb88.0112260726.69d82c97@posting.google.com>
References: <809aeb88 DOT 0112171814 DOT 317a55ad AT posting DOT google DOT com> <200112200325 DOT fBK3P8528329 AT envy DOT delorie DOT com> <809aeb88 DOT 0112200908 DOT 59cd0b1f AT posting DOT google DOT com> <3C25BBD6 DOT 69061DAF AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: 195.92.198.71
X-Trace: posting.google.com 1009380410 24856 127.0.0.1 (26 Dec 2001 15:26:50 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 26 Dec 2001 15:26:50 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote in message news:<3C25BBD6 DOT 69061DAF AT is DOT elta DOT co DOT il>...
> > From: big10p AT hotmail DOT com (Chris Chadwick)
> > Newsgroups: comp.os.msdos.djgpp
> > Date: 20 Dec 2001 09:08:48 -0800
> > 
> > The main reason I was thinking I'd have to use an alternative shell to
> > command.com, was because of this example from the make docs:
> > 
> > %.d: %.c
> >         $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \
> >               | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
> >               [ -s $@ ] || rm -f $@'
> 
> You can eat that cake and have it, too: add "SHELL = /bin/sh" line to
> your Makefile, and Make will invoke Bash to run commands such as the
> one above.  You don't need to make Bash your interactive shell for
> this to work.  (You _do_ need to install the ported Bash, though.)

This was what I was getting at in my OP although I probably didn't
word it very well. I'm still a bit confused about "SHELL = /bin/sh"
though: doesn't this make sh.exe the default shell, not bash.exe? Or
is sh a part of bash? Sorry, but like I said, I'm not familiar with
all this posix/unix stuff, yet :)

- Raw text -


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