Messages in this thread | | | From | Werner Almesberger <> | Subject | Re: CONFIG_SMP patch updated for 2.1.61 | Date | Wed, 5 Nov 1997 21:14:07 +0100 (MET) |
| |
Pavel Machek wrote: > Imagine everyone still including <linux/config.h>, but 'virtual' files > linux/config/config_scsi_aha1770 etc. And then, when mkdep would see > CONFIG_SCSI_AHA1770 in foo.c, it would make foo.c depend on > CONFIG_SCSI_AHA1770. This could work.
It does. That's exactly what the patch Michael mentioned does. (For those who missed it last month: I've put the version for 2.1.57 into ftp://lrcftp.epfl.ch/pub/people/almesber/misc/better_config_deps.patch.gz)
This isn't actually my first attempt to solve the problem. About one year earlier I posted two scripts that implement Linus' idea of clustering config options - with the difference that they'd automatically distribute options such that they overlap as much as possible. (Advantage: no waste due to poorly matched options, disadvantage: config options files look rather random.)
Considering how well the "virtual" dependencies work (actually, I'm using real files), I'm now convinced that the clustering approach isn't worth the trouble. If you want to see that old junk anyway, it's at ftp://lrcftp.epfl.ch/pub/people/almesber/junk/config_clusters.gz
> 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.
> If someone comes with system that has better config_X dependencies > (and read-only source tree etc.), but rewrites every Makefile in > Linux, are you going to accept that patch? Is there at least chance?
You don't need to rewrite all the Makefiles. Just add some more entries to .depend. It's easy - look at my patch ;-)
- Werner
-- _________________________________________________________________________ / Werner Almesberger, DI-ICA,EPFL,CH werner.almesberger@lrc.di.epfl.ch / /_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
| |