Subject: bug#57771: 28.2; ’uninstall’ make target does not remove .eln native compiled files

From: Eli Zaretskii <[email-masked]>
Date: Tue, 13 Sep 2022 19:03:13 +0300

> From: Alfredo Finelli <[email-masked]>
> Date: Tue, 13 Sep 2022 10:51:12 +0200
> 
> While building emacs to upgrade it from version 28.1 to 28.2 I noticed
> that the "uninstall" make target leaves native compiled .eln files behind
> in the installation target directory.  The same happens with the
> development version 29 from git, altough with less .eln files.

Thank you for your report.

Does the patch below give good results?

diff --git a/Makefile.in b/Makefile.in
index d288bac..3f811ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -844,7 +844,7 @@ uninstall:
 	rm -f "$(DESTDIR)$(includedir)/emacs-module.h"
 	$(MAKE) -C lib-src uninstall
 	-unset CDPATH; \
-	for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do 	\
+	for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" "$(ELN_DESTDIR)" ; do 	\
 	  if [ -d "$${dir}" ]; then			\
 	    case `cd "$${dir}" ; /bin/pwd` in		\
 	      "`cd ${srcdir} ; /bin/pwd`"* ) ;;		\