Subject: bug#36907: closed (27.0.50; make versionclean leaves stale .pdmp files around)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 03 Aug 2019 21:17:02 +0000

Your bug report

#36907: 27.0.50; make versionclean leaves stale .pdmp files around

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
36907: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36907
GNU Bug Tracking System
Contact [email-masked] with problems

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

Subject: 27.0.50; make versionclean leaves stale .pdmp files around
From: Sven Joachim <[email-masked]>
To: [email-masked]
Date: Sat, 03 Aug 2019 16:35:06 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

To get rid of old versions, I run "make -C src versionclean all".  The
result on the master branch is somewhat disappointing:

,----
| $ LC_ALL=C ls -l src/emacs-27*
| -rw-r--r-- 1 sven src 10353360 Aug  3 13:55 src/emacs-27.0.50.1.pdmp
| -rw-r--r-- 1 sven src 10355384 Aug  3 15:49 src/emacs-27.0.50.2.pdmp
| -rwxr-xr-x 2 sven src 33630968 Aug  3 16:18 src/emacs-27.0.50.3
| -rw-r--r-- 2 sven src 10355376 Aug  3 16:18 src/emacs-27.0.50.3.pdmp
`----

Two stale files left behind, and the version increased once more instead
of being reset to .1.