Subject: 27.0.50; make versionclean leaves stale .pdmp files around
From: Paul Eggert <[email-masked]>
To: Sven Joachim <[email-masked]>
Cc: [email-masked]
Date: Sat, 3 Aug 2019 14:16:11 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for reporting that. I installed the attached patch, which is slightly 
more ambitious.
From c3dd65dc4710c6ff49ef0fa0825476d11a1f7085 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sat, 3 Aug 2019 14:12:29 -0700
Subject: [PATCH] =?UTF-8?q?Remove=20stale=20.pdmp=20files=20with=20?=
 =?UTF-8?q?=E2=80=98make=20clean=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Sven Joachim (Bug#36907).
* admin/make-emacs: Simplify, now that clean does versionclean.
* src/Makefile.in ($(etc)/DOC, versionclean, extraclean):
Don’t ignore rm -f failures.
(versionclean): Also remove emacs-*.*.*[0-9].pdmp and ../etc/DOC*.
(clean): Depend on versionclean and simplify.
---
 admin/make-emacs |  2 +-
 src/Makefile.in  | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/admin/make-emacs b/admin/make-emacs
index b7cca06e1c..e1be944e4c 100755
--- a/admin/make-emacs
+++ b/admin/make-emacs
@@ -109,7 +109,7 @@
     shift @ARGV;
   }
 
-system ("$make clean versionclean") if $all;
+system ("$make clean") if $all;
 
 if ($wall)
   {
diff --git a/src/Makefile.in b/src/Makefile.in
index fd05a45df5..76aa6a1ec5 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -598,7 +598,7 @@ $(pdmp):
 ##
 $(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
 	$(AM_V_GEN)$(MKDIR_P) $(etc)
-	-$(AM_V_at)rm -f $(etc)/DOC
+	$(AM_V_at)rm -f $(etc)/DOC
 	$(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
 	  $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC
 	$(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
@@ -699,9 +699,11 @@ mostlyclean:
 	rm -f buildobj.h
 	rm -f globals.h gl-stamp
 	rm -f ./*.res ./*.tmp
-clean: mostlyclean
-	rm -f emacs-*.*.*[0-9]$(EXEEXT) emacs-*.*.*[0-9].pdmp
-	rm -f emacs$(EXEEXT) $(DEPDIR)/*
+versionclean:
+	rm -f emacs$(EXEEXT) emacs-*.*.*[0-9]$(EXEEXT) emacs-*.*.*[0-9].pdmp
+	rm -f ../etc/DOC*
+clean: mostlyclean versionclean
+	rm -f $(DEPDIR)/*
 
 ## bootstrap-clean is used to clean up just before a bootstrap.
 ## It should remove all files generated during a compilation/bootstrap,
@@ -720,10 +722,8 @@ distclean:
 
 maintainer-clean: distclean
 	rm -f TAGS
-versionclean:
-	-rm -f emacs$(EXEEXT) emacs-*.*.*[0-9]$(EXEEXT) ../etc/DOC*
 extraclean: distclean
-	-rm -f ./*~ \#* TAGS config.in
+	rm -f ./*~ \#* TAGS config.in

 ETAGS = ../lib-src/etags${EXEEXT}
-- 
2.17.1