Turns out we don't need sed to process the output of gcc -MD. We can just
do this:
read DEPS <filename.deps
The 'read' command in sh actually handles backslashes correctly, so we don't
have to sed them out after all. And then a simple ${DEPS#*:} removes the
"target:" prefix from the dependency line, and we're done!
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| all.do | ||
| CC.do | ||
| clean.do | ||
| config.sh | ||
| default.o.do | ||
| hello.do | ||
| main.c | ||
| Makefile | ||
| mystr.c | ||
| mystr.h | ||