Re: Space, speed etc...

Vadim E. Kogan (vadim@ns.econ.msu.su)
Tue, 12 Mar 1996 09:25:44 +0300 (GMT+0300)


On Mon, 11 Mar 1996, Jim Nance wrote:

> > 2. Speed - `make dep`
> >
> > a. Tell me please why it's needed?
>
> Strictly speaking, its not needed if you only want to compile the kernel once,
> and never change your configuration. You have to fool the top level Makefile
> into thinking its already been run though. Something like this should work:
>
> cd /usr/src/linux
> cat /dev/null >.depends
> cat /dev/null >.hdepends
> make zImage
>
> If you want to modify files, especially include files, it is absolutly
> necessary to run make dep to ensure that all the necessary files are remade.
>
> The make dep script in Linux tries to be smart enough so that you do not have
> to run it after you change the configuration file (This is one reason it
> does not use gcc -M). Thus you should hopefully only have to run it once.
>
> > b. IMHO 'gawk -f ....../depend.awk *[hcS]` can be replaced by:
> > grep #include *[hcS] > tmpfile
> > small_C(!!!)_prog tmpfile > .depend
> > or
> > grep #include *[hcS] | small_prog > .depend
>
> This certainly could be done, but I really doubt that it would be any faster.
>

I've just tried grep "#include" *h in include/linux - few sec. - IMHO
gawk+script will take more time than small c program, that works w/
result of grep ;)


> > c. make dep takes ~1-2h on 386sx25/4Mb :-((
> > It AT LEAST depends unneeded files - like scsi in 1.
>
> This is so you can change the configuration to include SCSI and not have to
> rerun make dep.
>
> > d. make dep depends ALL - including linux/include - ANY time it runs :-((
>
> This is perhaps an area that could be improved. However, my idea when I wrote
> the script was that you would only run make dep once. If you only run it
> once, it would have to do all these files anyway. (Of course if you change
> in include files, or add include files to .c files, you have to rerun
> make dep).
>
> > e. IMHO if I install kernel src in /usr/src && I haven't modify it ->
> > `make dep` that was made by my friend will b SAME (right?) If yes,
> > then maybe in linux-x.x.xx.tar.gz must be all dependencies?
>
> Yes, it would be possible to include the .depends files in with the kerenl
> source. Of course then the problem is that everyone is downloading something
> that they could recreate locally. Perhaps the best option would be to have
> a make dummydepend option which would create an empty .depends files for people
> who just want to recompile a kernel with a single configuration option, and
> dont want to do any hacking. I have been meaning for almost a year to do
> some more work on the Makefiles, and I have not had time. I just found out
> I have mono, so I may have a lot of time on my hands (of course I should
> probably spend it sleeping). I will put that option into the Makefile and
> see if Linus likes it.
>

10x, 10x, 10x ;) I REALLY have P-100 where I can compile kernel, but here
(in Russia) there are still ( :-((( ) many ppl who don't have it...

BTW, IMHO on notebooks usually are 2" HDDs, and such HDDs are not big (~360
max)... So it's cool to b able to compile a little program there, when
needed (sometimes ;), but not cool to not have place to put .o from that
program on HDD, coz HDD is filled up w/ kernel sources ;)

Maybe make delete_unused is possible ? ;) Not all ppl can CORRECTLY
delete unused/unneed files....

> Jim
>