Subject: bug#48117: 28.0.50; Update of loaddefs.el during normal build is unreliable

From: Gregory Heytings <[email-masked]>
Date: Mon, 03 May 2021 08:41:49 +0000

>> Another idea, FWIW: In the make rule for $(lisp)/loaddefs.el, if 
>> loaddefs.el exists and is older than ldefs-boot.el, start by copying 
>> the latter to the former. This ought to limit how outdated loaddefs can 
>> get?
>
> BTW, I think this might actually make things worse in terms of detecting 
> new secondary loaddefs files like texinfo-loaddefs (not that those 
> happen very often), by bumping the timestamp on the primary loaddefs.
>

Which is one of the reasons why I still believe that my proposed solution 
is better: whenever lisp/ldefs-boot.el is more recent than 
lisp/loaddefs.el, issue a warning when make is invoked to suggest the 
regeneration of _all_ autoload files, and add a command to do this in the 
main Makefile: make autoloads would do find -name '*loaddefs.el' -delete 
&& make -C lisp autoloads.  In theory this should have the same effect as 
make -C lisp autoloads-force, but that command is only marginally faster, 
and I much prefer the clarity / determinicity of a "delete all and 
regenerate" operation.