www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/23/06:30:13

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <3C25C077.C6469A42@is.elta.co.il>
Date: Sun, 23 Dec 2001 13:31:03 +0200
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Mailer: Mozilla 4.04 [en] (WinNT; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Should I use bash as default shell in makefiles?
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> <pll42u4ptd5iv2bbo8790jcd5v1jni9ba5 AT 4ax DOT com>
Reply-To: djgpp AT delorie DOT com

> From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 20 Dec 2001 21:41:55 +0000
> 
> Even simpler then:
> 
> -include $(sources:.c=.d)
> 
> > 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 $@'
> 
> I've never understood why the docs say that.  Is there a good reason for
> all that effort to create the .d files?

The reason for the Sed command is explained in the Make manual, right
after the command itself.  It's a valid reason, IMHO.

- Raw text -


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