Subject: bug#48079: Temporary files while building after native-comp merge

From: Eli Zaretskii <[email-masked]>
Date: Thu, 06 Jan 2022 18:48:01 +0200

> From: Glenn Morris <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  [email-masked],  Stefan Monnier <[email-masked]>
> Date: Thu, 06 Jan 2022 11:30:26 -0500
> 
> Did you consider using a pattern rule with two targets in the Makefile
> to properly express the relationship between .el and .elc/.eln?

The problem here is that the *.eln files end up in a subdirectory of
native-lisp/ whose precise name is only known to Emacs, and so cannot
be easily written.  You need the Emacs binary to be built (which
already introduces some "interesting" dependencies), and you need to
ask Emacs about the name of that subdirectory.

And if that's not enough, there's another complication: some of the
*.eln files need to be in that unknown directory, and some (most) need
to be in its preloaded/ subdirectory.  So we need two different rules
for 2 groups of *.el files, and we need to keep those groups
up-to-date at all times.