Subject: bug#49099: 28.0.50; Parallel build issue

From: Eli Zaretskii <[email-masked]>
Date: Sun, 20 Jun 2021 13:57:06 +0300

> Date: Fri, 18 Jun 2021 19:08:33 +0200
> From:  Ergus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> When building in parallel (make -j install) it seems to install wrongly
> because when I try to execute after that I get:
> 
> Error using execdir /home/user/.local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/:
> emacs:
> /home/user/.local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.0.50-0f08941b/preloaded/window-ac748af0-63c191c3.eln:
> cannot open shared object file: No such file or directory

Does the below help?

diff --git a/Makefile.in b/Makefile.in
index 3facfa5..474441f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -753,7 +753,7 @@ install-etc:
 	done
 
 ### Install native compiled Lisp files.
-install-eln:
+install-eln: lisp
 ifeq ($(HAVE_NATIVE_COMP),yes)
 	find native-lisp -type d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \
 	find native-lisp -type f -exec ${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}" \;