From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19859 invoked by alias); 23 Feb 2011 03:31:17 -0000 Received: (qmail 19850 invoked by uid 22791); 23 Feb 2011 03:31:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Feb 2011 03:31:12 +0000 Received: (qmail 25048 invoked from network); 23 Feb 2011 03:31:00 -0000 Received: from unknown (HELO ?0.0.0.0?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Feb 2011 03:31:00 -0000 Message-ID: <4D647F61.5080307@codesourcery.com> Date: Wed, 23 Feb 2011 03:31:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Michael Snyder CC: "gdb@sourceware.org" Subject: Re: make clean doesn't run in gdbserver/common References: <4D642638.8090207@vmware.com> In-Reply-To: <4D642638.8090207@vmware.com> Content-Type: multipart/mixed; boundary="------------000600090401020803000607" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00126.txt.bz2 This is a multi-part message in MIME format. --------------000600090401020803000607 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-length: 215 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 (齐尧) --------------000600090401020803000607 Content-Type: text/x-patch; name="gdbserver-make-clean-0223.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdbserver-make-clean-0223.patch" Content-length: 1794 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 --------------000600090401020803000607--