From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27190 invoked by alias); 3 Mar 2011 06:00:09 -0000 Received: (qmail 27173 invoked by uid 22791); 3 Mar 2011 06:00:06 -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; Thu, 03 Mar 2011 05:59:59 +0000 Received: (qmail 28652 invoked from network); 3 Mar 2011 05:59:56 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Mar 2011 05:59:56 -0000 Message-ID: <4D6F2E59.7010206@codesourcery.com> Date: Thu, 03 Mar 2011 06:00: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: Tom Tromey CC: Joel Brobecker , Pedro Alves , gdb-patches@sourceware.org Subject: Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver References: <4D550834.6080807@codesourcery.com> <4D55FAB4.7090001@codesourcery.com> <4D648A5F.8050607@codesourcery.com> <4D65D5B7.1000902@codesourcery.com> <20110301044144.GH30306@adacore.com> <4D6C882B.7010801@codesourcery.com> <4D6DCA56.4030008@codesourcery.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------030705030103030505040109" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00158.txt.bz2 This is a multi-part message in MIME format. --------------030705030103030505040109 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-length: 1376 On 03/02/2011 10:37 PM, Tom Tromey wrote: >>>>>> "Yao" == Yao Qi writes: > > Yao> gdb/ > Yao> * Makefile.in (configure-common): Remove. Let Makefile > Yao> in dir common to rebuild itself. > Yao> (common/Makefile): Likewise. > > This part looks ok. Applied this part first. > But the code still has: > > Yao> $(LIBCOMMON): $(LIBCOMMON_DIR)/Makefile > Yao> @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=common subdir_do > > Now there isn't a rule to build $(LIBCOMMON_DIR)/Makefile. > > I suspect the $(LIBCOMMON) target isn't needed, but removing it may > require some other changes. The current dependency relationship is like this, all: gdb$(EXEEXT) $(CONFIG_ALL) @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) while CDEPS includes $(LIBGNU) and $(LIBCOMMON) CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \ $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \ $(LIBCOMMON) so target $(LIBCOMMON) and $(LIBGNU) is needed in target gdb$(EXEEXT), before going to subdir to build in `all:'. We can fix this problem by 1) removing $(LIBGNU) and $(LIBCOMMON) from CDEPS, 2) leaving to Makefile in gnulib/ and common/ to build lib as needed in target gdb$(EXEEXT). -- Yao (齐尧) --------------030705030103030505040109 Content-Type: text/x-patch; name="makefile-cdep-0303.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="makefile-cdep-0303.patch" Content-length: 1928 gdb/ * Makefile.in (CLIBS): Remove LIBGNU and LIBCOMMON. (BUILD_SUBDIRS): New. Remove targets $(LIBCOMMON) and $(LIBGNU). diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 00d624f..4c2d7e3 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -475,8 +475,7 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER $(LIBEXPAT) \ $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBCOMMON) CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \ - $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \ - $(LIBCOMMON) + $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) @@ -896,6 +895,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \ TSOBS = inflow.o +BUILD_SUBDIRS = common gnulib SUBDIRS = doc @subdirs@ data-directory CLEANDIRS = $(SUBDIRS) gnulib @@ -1154,6 +1154,7 @@ init.c: $(INIT_FILES) # Removing the old gdb first works better if it is running, at least on SunOS. gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) rm -f gdb$(EXEEXT) + @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=$(BUILD_SUBDIRS)" subdir_do $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ -o gdb$(EXEEXT) gdb.o libgdb.a \ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) @@ -1165,15 +1166,11 @@ $(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) # Convenience rule to handle recursion. -$(LIBGNU) $(GNULIB_H): all-lib +$(GNULIB_H): all-lib all-lib: gnulib/Makefile @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=gnulib subdir_do .PHONY: all-lib -# -$(LIBCOMMON): $(LIBCOMMON_DIR)/Makefile - @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=common subdir_do - # Convenience rule to handle recursion. .PHONY: all-data-directory all-data-directory: data-directory/Makefile --------------030705030103030505040109--