From: Yao Qi <yao@codesourcery.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: make clean doesn't run in gdbserver/common
Date: Wed, 23 Feb 2011 03:31:00 -0000 [thread overview]
Message-ID: <4D647F61.5080307@codesourcery.com> (raw)
In-Reply-To: <4D642638.8090207@vmware.com>
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
On 02/23/2011 05:10 AM, Michael Snyder wrote:
> Hi,
>
> I think gdbserver/Makefile.in needs to be told to run make clean and
> make distclean in the common subdir.
Here is the patch to fix this.
--
Yao (é½å°§)
[-- Attachment #2: gdbserver-make-clean-0223.patch --]
[-- Type: text/x-patch, Size: 1794 bytes --]
gdb/gdbserver/
* Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
(subdir_do): New make target. Copied from gdb/Makefile.
(maintainer-clean, realclean, distclean, clean): Call corresponding
make targets in common/Makefile.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 07e020f..d27c942 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -136,6 +136,9 @@ LIBCOMMON_DIR = common
LIBCOMMON = $(LIBCOMMON_DIR)/libcommon.a
LIBCOMMON_SRC = $(srcdir)/$(LIBCOMMON_DIR)
+CLEANDIRS = $(LIBCOMMON_DIR)
+REQUIRED_SUBDIRS = $(LIBCOMMON_DIR)
+
SOURCES = $(SFILES)
TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
@@ -291,6 +294,7 @@ TAGS: ${TAGFILES}
tags: TAGS
clean:
+ @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
rm -f *.o ${ADD_FILES} *~
rm -f version.c
rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
@@ -314,6 +318,7 @@ clean:
rm -f i386-mmx.c i386-mmx-linux.c
maintainer-clean realclean distclean: clean
+ @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(CLEANDIRS)" subdir_do
rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
rm -f Makefile
@@ -321,6 +326,22 @@ config.h: stamp-h ; @true
stamp-h: config.in config.status
CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
+subdir_do: force
+ @for i in $(DODIRS); do \
+ case $$i in \
+ $(REQUIRED_SUBDIRS)) \
+ if [ ! -f ./$$i/Makefile ] ; then \
+ echo "Missing $$i/Makefile" >&2 ; \
+ exit 1 ; \
+ fi ;; \
+ esac ; \
+ if [ -f ./$$i/Makefile ] ; then \
+ if (cd ./$$i; \
+ $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
+ else exit 1 ; fi ; \
+ else true ; fi ; \
+ done
+
Makefile: Makefile.in config.status
CONFIG_HEADERS="" $(SHELL) ./config.status
next prev parent reply other threads:[~2011-02-23 3:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 21:10 Michael Snyder
2011-02-23 3:31 ` Yao Qi [this message]
2011-02-23 3:36 ` Joel Brobecker
2011-02-23 3:51 ` Yao Qi
2011-02-23 4:29 ` Joel Brobecker
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=4D647F61.5080307@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=msnyder@vmware.com \
/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