From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23866 invoked by alias); 20 Apr 2009 21:29:49 -0000 Received: (qmail 23856 invoked by uid 22791); 20 Apr 2009 21:29:49 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,J_CHICKENPOX_66 X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Apr 2009 21:29:40 +0000 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id B2C7D1C152F5; Mon, 20 Apr 2009 23:34:12 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 358469002E; Mon, 20 Apr 2009 23:29:37 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id HWuoFNEMa1yx; Mon, 20 Apr 2009 23:29:35 +0200 (CEST) Received: from igel.home (DSL01.83.171.172.104.ip-pool.NEFkom.net [83.171.172.104]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 20 Apr 2009 23:29:35 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 7385010C2B2; Mon, 20 Apr 2009 23:29:33 +0200 (CEST) From: Andreas Schwab To: tromey@redhat.com Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: NAT_FILE set incorrectly in gdb/Makefile References: <838wlwii4o.fsf@gnu.org> X-Yow: I'm a nuclear submarine under the polar ice cap and I need a Kleenex! Date: Mon, 20 Apr 2009 21:29:00 -0000 In-Reply-To: (Tom Tromey's message of "Mon, 20 Apr 2009 11:09:09 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-04/txt/msg00544.txt.bz2 Tom Tromey writes: > This all seems like overkill to get a single variable that is only > used (AFAICT) in the TAGS rule. Couldn't we just compute the real > value in the Makefile somehow, rather than a rewrite? It doesn't work anyway, because NM_FILE can also already include the prefix (eg config/nm-linux.mh). Here is an alternative patch, tested on powerpc-linux. I've also removed the substitution of nm_h which is not used any more since the dependencies are autogenerated. Andreas. 2009-04-20 Andreas Schwab * configure.ac: Don't postprocess Makefile in config.status. Substitute GDB_NM_FILE. Don't substitute nm_h. * Makefile.in (GDB_NM_FILE): Substitute. (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE). * configure: Regenerate. * gnulib/Makefile.in: Regenerate. --- gdb/Makefile.in.~1.1078.~ 2009-04-19 23:27:33.000000000 +0200 +++ gdb/Makefile.in 2009-04-20 22:48:16.000000000 +0200 @@ -1107,9 +1107,10 @@ gdb1$(EXEEXT): gdb$(EXEEXT) # TAGS depends on all the files that go into it so you can rebuild TAGS # with `make TAGS' and not have to say `rm TAGS' first. +GDB_NM_FILE = @GDB_NM_FILE@ TAGS: $(DEPFILES) $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) @echo Making TAGS - @etags $(srcdir)/$(NAT_FILE) \ + @etags $(srcdir)/$(GDB_NM_FILE) \ `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ echo $(srcdir)/$$i ; \ done ; for i in $(TAGFILES_WITH_SRCDIR); do \ Index: gdb/configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.93 diff -u -a -p -r1.93 gdb/configure.ac --- gdb/configure.ac 17 Apr 2009 17:44:04 -0000 1.93 +++ gdb/configure.ac 20 Apr 2009 21:20:00 -0000 @@ -1932,9 +1932,7 @@ files= links= rm -f nm.h -nm_h="" if test "${nativefile}" != ""; then - nm_h=nm.h case "${nativefile}" in nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; * ) GDB_NM_FILE="${nativefile}" @@ -1943,7 +1941,7 @@ if test "${nativefile}" != ""; then links="${links} nm.h" AC_DEFINE_UNQUOTED(GDB_NM_FILE, "${GDB_NM_FILE}", [nativefile]) fi -AC_SUBST(nm_h) +AC_SUBST(GDB_NM_FILE) AC_LINK_FILES($files, $links) @@ -1963,24 +1961,10 @@ AC_SUBST(pdfdir) AC_OUTPUT(Makefile .gdbinit:gdbinit.in gnulib/Makefile, [ -dnl Autoconf doesn't provide a mechanism for modifying definitions -dnl provided by makefile fragments. -dnl - -changequote(,)dnl -sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' Makefile.tmp -mv -f Makefile.tmp Makefile -changequote([,])dnl - - case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac -], -[ -gdb_host_cpu=$gdb_host_cpu -nativefile=$nativefile ]) exit 0 -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."