From: Tom Tromey Date: Wed, 29 Nov 2017 16:27:40 +0000 (-0700) Subject: Fix gdb snapshots X-Git-Tag: gdb-8.1-branchpoint~288 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5dcf52c19f7045fb179f703426d345b8a81d2210;p=thirdparty%2Fbinutils-gdb.git Fix gdb snapshots 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 * Makefile.in (distclean): Handle the case where rmdir fails. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bef579328e3..bd1eccfb687 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-11-29 Tom Tromey + + * Makefile.in (distclean): Handle the case where rmdir fails. + 2017-11-29 Tom Tromey * symfile.c (_initialize_symfile): Update usage text for diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 6e16bc66828..284559b030d 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -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