Fix gdb snapshots
authorTom Tromey <tom@tromey.com>
Wed, 29 Nov 2017 16:27:40 +0000 (09:27 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 29 Nov 2017 18:56:40 +0000 (11:56 -0700)
Joel pointed out that gdb snapshots were broken by my Makefile patch
series.  The bug is that rmdir in distclean was failing, because the
directory did not exist.  This fixes the bug by only invoking rmdir when
the directory exists.

Tested using "src-release.sh gdb".

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

* Makefile.in (distclean): Handle the case where rmdir fails.

gdb/ChangeLog
gdb/Makefile.in

index bef579328e3169b4faced3cd59e188afb4e38941..bd1eccfb6877aa8f1991483097efb996a8128637 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-29  Tom Tromey  <tom@tromey.com>
+
+       * Makefile.in (distclean): Handle the case where rmdir fails.
+
 2017-11-29  Tom Tromey  <tom@tromey.com>
 
        * symfile.c (_initialize_symfile): Update usage text for
index 6e16bc66828fc87e824c34de94ae2d4c3a231ae6..284559b030d9d0d7a96e166328363f5707260342 100644 (file)
@@ -1995,7 +1995,7 @@ distclean: clean
        rm -f Makefile
        rm -rf $(DEPDIR)
        for i in $(CONFIG_SRC_SUBDIR); do \
-               rmdir $$i/$(DEPDIR); \
+               if test -d $$i/$(DEPDIR); then rmdir $$i/$(DEPDIR); fi \
        done
 
 maintainer-clean: local-maintainer-clean do-maintainer-clean distclean