public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH] Some "distclean" fixes in gdb
Date: Sun, 27 Feb 2022 17:33:58 -0700	[thread overview]
Message-ID: <20220228003358.487744-1-tom@tromey.com> (raw)

PR build/12440 points out that "make distclean" is broken in gdb.
Most of the breakage comes from other projects in the tree, but we can
fix some of the issues, which is what this patch does.

Note that the yacc output files, like c-exp.c, are left alone.  In a
source distribution, these are included in the tarball, and if the
user builds in-tree, we would not want to remove them.

While that seems a bit obscure, it seems to me that "distclean" is
only really useful for in-tree builds anyway -- out-of-tree I simply
delete the entire build directory and start over.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12440
---
 gdb/Makefile.in           | 2 +-
 gdb/testsuite/Makefile.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 70cef6e28b5..62db33f29a5 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1958,7 +1958,7 @@ clean mostlyclean: $(CONFIG_CLEAN)
 # functionality described is if the distributed files are unmodified.
 distclean: clean
 	@$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
-	rm -f nm.h config.status config.h stamp-h b jit-reader.h
+	rm -f nm.h config.status config.h stamp-h b jit-reader.h gcore stamp-nmh
 	rm -f gdb-gdb.py gdb-gdb.gdb
 	rm -f y.output yacc.acts yacc.tmp y.tab.h
 	rm -f config.log config.cache
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 0bfcbdc3205..790b9e022cc 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -353,7 +353,7 @@ clean mostlyclean:
 
 distclean maintainer-clean realclean: clean
 	-rm -f *~ core
-	-rm -f Makefile config.status *-init.exp
+	-rm -f Makefile config.status *-init.exp lib/pdtrace
 	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
 
 Makefile : Makefile.in config.status $(host_makefile_frag)
-- 
2.31.1


             reply	other threads:[~2022-02-28  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28  0:33 Tom Tromey [this message]
2022-03-01 20:04 ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220228003358.487744-1-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).