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

From: Gerd Möllmann <[email-masked]>
Date: Mon, 15 Aug 2022 15:32:43 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Lars Ingebrigtsen <[email-masked]>
>> Cc: [email-masked]
>> Date: Mon, 15 Aug 2022 12:07:15 +0200
>> 
>> I've tried various things, like making autoloads an order-only
>> prerequisite for $(pdmp) (and various other targets), but the main
>> problem seems to be that Make has already computed the
>> timestamps/dependencies at this point, so even if we're running the
>> update at the "right" time, we don't trigger the $(pdmp) rule.
>
> So maybe moving or duplicating the loaddefs.el rules in src/Makefile
> will do the trick.

Could it be that src/Makefile is simply not invoked after lisp/Makefile
has built loaddefs.*? In Makefile.in we have

SUBDIR = $(NTDIR) lib lib-src src lisp
...
all: ${SUBDIR} info $(gsettings_SCHEMAS:.xml=.valid)

That is src comes before lisp.  Haching something like a second 'make
-C' at the end seems to do something not entirely unreasonable.