Subject: Re: bug#57152: 29.0.50; Emacs executable isn't rebuilt when loaddefs.el is modified

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 12 Aug 2022 17:14:26 +0200

Eli Zaretskii <[email-masked]> writes:

> The current Makefile's still exhibit the problem that when loaddefs.el
> is updated, the Emacs executable is not re-dumped to reflect those
> updates.  This leads to an annoying and error-prone practice that one
> needs to watch the build, detect the telltale "ELC loaddefs.elc"
> command (which means loaddefs.el was actually modified), and then
> manually invoke "make" again to re-dump Emacs.
>
> AFAICT, the root cause of this is that src/Makefile.in doesn't know
> about the dependencies of loaddefs.el, which are spelled out in
> lisp/Makefile.in, and therefore it doesn't realize that loaddefs.el
> will be modified as part of the current build.

Yes.  So the next time you say "make", it'll rebuild the executable.

In one way, this is slightly better than what we had before, where
loaddefs.el wouldn't be rebuilt until after VCWITNESS had changed, while
it's now actually updated all the time (that something changes).  It's
more... regular?  But on the other hand, these updates are seldom
actually necessary, so we're doing it a bit too much now, perhaps.

Anyway, back to the problem -- I've poked at this quite a bit, but no
solutions seem really...  nice?  If we updated the loaddefs.el file a
bit earlier (before we build the Emacs executable), that'd fix the
problem, but I could find a way to do that without breaking something
else.  There's probably something trivial I'm overlooking here.