Can anyone explain this sed one-liner in English (the more detail, the better)?
@sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' < $*.d > $@; \
rm -f $*.d; [ -s $@ ] || rm -f $@
It's part of this tutorial: http://mad-scientist.net/make/autodep.html
I have a non-constant set of source files and want to auto-generate my dependency tree, based on the contents (includes) spelled out in my source files.
I was following the tutorial pretty well up until that...
P.S. I have basic understanding of sed select/replace, but I'm confused by the matching string and all the layers of redirection.... I've also read through the makefile tutorial once so have basic knowledge of standard makefiles...