This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Make build tree rm -rf'able again
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 12 Nov 2013 14:37:31 -0800
- Subject: [commit] Make build tree rm -rf'able again
- Authentication-results: sourceware.org; auth=none
Hi.
It's nice if a build tree is rm -rf'able (without the extra effort of
a chmod -R u+w first).
I've done that since time immemorial so it feels like it
should continue to work.
[Certainly some random hacking could leave the tree in a state
where rm -rf doesn't work, but the default case of configure, build, test
has been rm -rf'able since as long as I can remember.]
Thus I've committed this.
2013-11-12 Doug Evans <dje@google.com>
* gdb.base/fileio.exp: Make $dir2 writable after the test is done
so that "rm -rf $builddir" Just Works.
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index b9dfb38..f77218f 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -253,5 +253,10 @@ gdb_test continue \
gdb_exit
+# Make dir2 writable again so rm -rf of a build tree Just Works.
+if {[file exists $dir2] && ![file writable $dir2]} {
+ system "chmod +w $dir2"
+}
+
set timeout $oldtimeout
return 0