15 lines
264 B
Plaintext
Executable file
15 lines
264 B
Plaintext
Executable file
for extension in c y
|
|
do
|
|
for file in *.$extension
|
|
do ofile=`basename $file .$extension`.o
|
|
grep '^# *include.*"' $file|sed "s/.*\"\(.*\)\".*/$ofile: \1/"
|
|
done
|
|
done | sort -u >depend
|
|
ed - Makefile <<'!'
|
|
/AUTOAUTOAUTO/+,$d
|
|
$r depend
|
|
w
|
|
q
|
|
!
|
|
rm -f depend
|