From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22330 invoked by alias); 10 Sep 2008 18:49:23 -0000 Received: (qmail 22321 invoked by uid 22791); 10 Sep 2008 18:49:22 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 Sep 2008 18:48:17 +0000 Received: (qmail 13197 invoked from network); 10 Sep 2008 18:48:15 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Sep 2008 18:48:15 -0000 From: Pedro Alves To: Joel Brobecker Subject: Re: [autodeps] gnu-nat, autogenerated files Date: Wed, 10 Sep 2008 18:49:00 -0000 User-Agent: KMail/1.9.9 Cc: gdb-patches@sourceware.org References: <200809091606.45512.pedro@codesourcery.com> <20080910180018.GP12222@adacore.com> In-Reply-To: <20080910180018.GP12222@adacore.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_yZByIS9xfhm6IXB" Message-Id: <200809101948.18370.pedro@codesourcery.com> 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: 2008-09/txt/msg00220.txt.bz2 --Boundary-00=_yZByIS9xfhm6IXB Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 2705 On Wednesday 10 September 2008 19:00:18, Joel Brobecker wrote: > > 2008-09-09 Pedro Alves > > > > * Makefile.in (generated_files): Add $(host_generated_files). > > * config/i386/i386gnu.mh (host_generated_files): New. > > This one is a little beyond my knowledge of Makefile, particularly > since the build system has changed recently. The idea seems right to me > (adding a new variable in the mh file). But I'm still wondering whether > it would be possible to use the NAT_FILE to include the list of generated > files. Tom, what do you think? Probably be a little hacky... I think it would be hacky. We want this list for a specific purpose: These are autogenerated files, that need to be generated before compiling the NATDEPFILES. > If we introduce a new variable, I propose that its name be capitalized, > like most (if not all) variables we have been using so far. I like > HOST_GENERATED_FILES as you suggested. > Hmmmm, looking at the docs you pointed below, I believe NAT_GENERATED_FILES is more correct. These files shouldn't be generated when building a cross debugger hosted on the hurd. I've made that change, hope it's OK. > We also need to document this new variable in gdbint. Perhaps around > there: > > @table @file > @vindex NATDEPFILES > @item gdb/config/@var{arch}/@var{xyz}.mh > Specifies Makefile fragments needed by a @emph{native} configuration on > machine @var{xyz}. In particular, this lists the required > native-dependent object files, by defining @samp{NATDEPFILES=@dots{}}. > Also specifies the header file which describes native support on > @var{xyz}, by defining @samp{NAT_FILE= nm-@var{xyz}.h}. You can also > define @samp{NAT_CFLAGS}, @samp{NAT_ADD_FILES}, @samp{NAT_CLIBS}, > @samp{NAT_CDEPS}, etc.; see @file{Makefile.in}. > > @emph{Maintainer's note: The @file{.mh} suffix is because this file > originally contained @file{Makefile} fragments for hosting @value{GDBN} > on machine @var{xyz}. While the file is no longer used for this > purpose, the @file{.mh} suffix remains. Perhaps someone will > eventually rename these fragments so that they have a @file{.mn} > suffix.} > Hmmm, errmmm, I don't know what to do here. :-) The logical place would be to add the new variable to the "You can also define" list, as in the patch below, and possibly describe each of those variables... but, looking closer, I don't see any variable of the "You can also define" list being in use currently. Looks like an oportunity for further Makefile.in cleanup --- TM_CLIBS and TM_CDEPS also looks like looking for garbage collection. What do you think? -- Pedro Alves --Boundary-00=_yZByIS9xfhm6IXB Content-Type: text/x-diff; charset="iso-8859-1"; name="hurd_gen_files.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hurd_gen_files.diff" Content-length: 2433 gdb/ 2008-09-10 Pedro Alves * Makefile.in (generated_files): Add $(NAT_GENERATED_FILES). * config/i386/i386gnu.mh (NAT_GENERATED_FILES): New. gdb/doc/ 2008-09-10 Pedro Alves * gdbint.texinfo (Native Debugging): Mention NAT_GENERATED_FILES. --- gdb/Makefile.in | 3 ++- gdb/config/i386/i386gnu.mh | 4 ++++ gdb/doc/gdbint.texinfo | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) Index: src/gdb/Makefile.in =================================================================== --- src.orig/gdb/Makefile.in 2008-09-10 19:13:36.000000000 +0100 +++ src/gdb/Makefile.in 2008-09-10 19:24:54.000000000 +0100 @@ -831,7 +831,8 @@ DISTSTUFF = $(YYFILES) # All generated files which can be included by another file. -generated_files = config.h observer.h observer.inc ada-lex.c $(GNULIB_H) +generated_files = config.h observer.h observer.inc ada-lex.c \ + $(GNULIB_H) $(NAT_GENERATED_FILES) .c.o: $(COMPILE) $< Index: src/gdb/config/i386/i386gnu.mh =================================================================== --- src.orig/gdb/config/i386/i386gnu.mh 2008-09-10 19:02:40.000000000 +0100 +++ src/gdb/config/i386/i386gnu.mh 2008-09-10 19:25:45.000000000 +0100 @@ -29,3 +29,7 @@ MIGCOM = $(MIG) -cc cat - /dev/null %_U.h %_U.c: %.defs $(CPP) $(CPPFLAGS) $($*-MIGUFLAGS) -x c $< \ | $(MIGCOM) -sheader /dev/null -server /dev/null -user $*_U.c -header $*_U.h + +NAT_GENERATED_FILES = notify_S.h notify_S.c process_reply_S.h process_reply_S.c \ + msg_reply_S.h msg_reply_S.c msg_U.h msg_U.c \ + exc_request_U.h exc_request_U.c exc_request_S.h exc_request_S.c Index: src/gdb/doc/gdbint.texinfo =================================================================== --- src.orig/gdb/doc/gdbint.texinfo 2008-09-10 19:15:21.000000000 +0100 +++ src/gdb/doc/gdbint.texinfo 2008-09-10 19:27:41.000000000 +0100 @@ -4417,7 +4417,7 @@ native-dependent object files, by defini Also specifies the header file which describes native support on @var{xyz}, by defining @samp{NAT_FILE= nm-@var{xyz}.h}. You can also define @samp{NAT_CFLAGS}, @samp{NAT_ADD_FILES}, @samp{NAT_CLIBS}, -@samp{NAT_CDEPS}, etc.; see @file{Makefile.in}. +@samp{NAT_CDEPS}, @samp{NAT_GENERATED_FILES}, etc.; see @file{Makefile.in}. @emph{Maintainer's note: The @file{.mh} suffix is because this file originally contained @file{Makefile} fragments for hosting @value{GDBN} --Boundary-00=_yZByIS9xfhm6IXB--