Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Fix gdb snapshots
@ 2017-11-29 16:32 Tom Tromey
  2017-11-29 16:42 ` Simon Marchi
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2017-11-29 16:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Joel pointed out that gdb snapshots were broken by my Makefile patch
series.  The bug is that rmdir in distclean was failing, because the
directories in question did not exist.  The simplest fix was to just use
"rm -rf", which won't fail if the directory is missing.

Tested using "src-release.sh gdb".

2017-11-29  Tom Tromey  <tom@tromey.com>

	* Makefile.in (distclean): Use "rm -rf", not "rmdir".
---
 gdb/ChangeLog   | 4 ++++
 gdb/Makefile.in | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ebb969998c..7532016499 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-29  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (distclean): Use "rm -rf", not "rmdir".
+
 2017-11-27  Tom Tromey  <tom@tromey.com>
 
 	* Makefile.in (REMOTE_OBS): Remove.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 6e16bc6682..39f90bad9f 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1995,7 +1995,9 @@ distclean: clean
 	rm -f Makefile
 	rm -rf $(DEPDIR)
 	for i in $(CONFIG_SRC_SUBDIR); do \
-		rmdir $$i/$(DEPDIR); \
+		# Use rm -rf, not rmdir, to avoid errors when the \
+		# directory does not exist. \
+		rm -rf $$i/$(DEPDIR); \
 	done
 
 maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
-- 
2.13.6


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-11-29 18:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 16:32 [RFA] Fix gdb snapshots Tom Tromey
2017-11-29 16:42 ` Simon Marchi
2017-11-29 17:00   ` Tom Tromey
2017-11-29 17:04     ` Tom Tromey
2017-11-29 17:27       ` Tom Tromey
2017-11-29 17:38         ` Simon Marchi
2017-11-29 18:53           ` Tom Tromey
2017-11-29 17:06     ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox