Re: [RFC PATCH 0/8] speed up 'make clean'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 05/11/2020 21:48, Junio C Hamano wrote:
> Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx> writes:
> 
>> [Yes, 'cd Documentation; make clean all' will be slower that a doing
>> separate 'make clean; make', but the extra 10s, or so, will be swamped
>> by the documentation build time! ;-) ]
> 
> Hmph, the "all" part in "make clean all" needs the information we
> read from these generated files, and time must be spent to generate
> them whether "make clean all" or "make clean; make all" is used.  In
> the latter, we may not generate and read them in the first phase,
> but the second one "make all" would need to do so anyway.  So I am
> puzzled why "make clean all" needs to be slower---don't we generate
> and read them only once in either case?
> 

Hmm, interesting. I was all ready to explain the results of the
moc-up of this that I did about a month ago, but thought I should
just check again ... ;-)

This time I used the actual Makefile, rather than a moc-up, and got
different (in some sense, worse) results. What I was going to say
was, no the doc.dep file gets generated twice - but that is not true. :(

However, if you run 'make clean all', you will not be pleased with
the results!

  $ make clean
  ...
  $ make clean all >zzz 2>&1
  $ grep WARNING zzz | wc -l
  26
  $ tail -1 zzz
  make: *** [Makefile:362: git.1] Error 13
  $ 

If you look at the output, you will see that, while processing the
'clean' target, the 'doc.dep' file is created, -included, and then
immediately deleted. While processing the 'all' target I had expected
the 'doc.dep' file to be recreated - but it isn't. It seems to have
done the 'drop the internal data, re-read and re-parse' only the
once, and on the second go round (because it has already generated
it once) does not re-create and re-read the dependency data again.
Thus, the 'all' target is executed without any 'doc.dep' data and
falls over in a heap. :(

[BTW, just doing 'make' does not do a full build. I will look at why
that is later].

Doing 'make clean; make all' works fine, of course.

That will teach me to cut corners! Ho-Hum. Sorry about that.

Thanks.

ATB,
Ramsay Jones



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux