Mail Archives: djgpp/2001/12/23/06:30:13
> 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 -