Messages in this thread |  | | Date | Wed, 5 Nov 1997 12:54:46 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: CONFIG_SMP patch updated for 2.1.61 |
| |
On Wed, 5 Nov 1997, Werner Almesberger wrote: > > > And I believe this could (and should) be done without mkdep.c: gcc is > > able to generate dependency information for us. (I already use > > modified makefiles from mec@shout.net, which do not need mkdep.c - > > dependency info are generated on the fly when compiling). > > Hmm, mkdep does its job pretty quickly and in this case, "normal" gcc > couldn't easily do the same thing, so with my approach, mkdep becomes > actually quite unavoidable.
Yes. "gcc -M" has various "features" that makes it completely useless for any real dependancy generation.
- it's slow as molasses. I'm not talking "quite slow", I'm talking "so slow that it's pretty much useless for any reasonably sized program". It's essentially only useful for batch-processing. - it doesn't know about configuration dependencies (ie the things that mkdep does to warn you when the config file hasn't been properly included) - it actually parses C preprocessor stuff (notably #ifdef), and because of that it often leaves out critical dependency information (and it _requires_ that you know all of the configuration at mkdep time). - it will do recursive dependencies (exactly because it parses the C file), which is extremely inefficient (that's the whole point on having "make" in the first place - to keep track of complex dependencies).
It becomes even more useless when trying to make a more intelligent configuration setup.
Linus
|  |