Everybody who has replied has confused -MD with -M
-M makes gcc output dependancies to stdout, it needs a separate
pass to be made use of and is slow. When I did do dependancies
this way I quickly discovered that it's faster to do it in Perl as some
people have mentioned.
-MD makes the preprocessor output the dependancies to a separate
file during normal compilation. It adds just the amout of time taken to
open a file and spit half a K or so to it to the compilation. The need
for a separate "make depend" phase goes away and the dependancies
can't get out of date.
"make config" seems to result in most things being re-compiled anyway
as a result of <linux/config.h> and <linux/autoconf.h> being touched.
This could be avoided but only at the expense of splitting the config
options into several files.
Regards
Paul.