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 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com > From: Jason Green > 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.