Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: NAT_FILE set incorrectly in gdb/Makefile
Date: Sun, 19 Apr 2009 21:35:00 -0000	[thread overview]
Message-ID: <m2r5zoz5rq.fsf@igel.home> (raw)
In-Reply-To: <838wlwii4o.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 19 Apr 	2009 22:00:07 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> The problem is this line from gdb/Makefile:
>
>   NAT_FILE= config/i386/config/i386/nm-linux64.h
>
> which is obviously incorrect.  It looks like the culprit is this line
> from configure.ac:
>
>   sed -e '/^NAT_FILE[     ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
>
> which seems to run twice, perhaps once by configure, the other time by
> config.status.  But that's a guess; the truth is I have no idea why
> config/i386 gets prepended twice.  Does anyone see the villain?

Does this help?  Most likey config.status was run twice with different
values of CONFIG_FILES.

Andreas.

2009-04-19  Andreas Schwab  <schwab@linux-m68k.org>

	* configure.ac: Only postprocess Makefile when it has just been
	generated; avoid changequote.

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	19 Apr 2009 21:30:07 -0000
@@ -1967,10 +1967,11 @@ dnl Autoconf doesn't provide a mechanism
 dnl provided by makefile fragments.
 dnl
 
-changequote(,)dnl
-sed -e '/^NAT_FILE[ 	]*=/s,^NAT_FILE[ 	]*=[ 	]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
+case " $CONFIG_FILES " in
+*" Makefile "*)
+sed -e '/^NAT_FILE[[ 	]]*=/s,^NAT_FILE[[ 	]]*=[[ 	]]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
 mv -f Makefile.tmp Makefile
-changequote([,])dnl
+esac
 
 
 case x$CONFIG_HEADERS in

-- 
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."


  reply	other threads:[~2009-04-19 21:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19 19:00 Eli Zaretskii
2009-04-19 21:35 ` Andreas Schwab [this message]
2009-04-20 17:09   ` Tom Tromey
2009-04-20 21:29     ` Andreas Schwab
2009-04-21 18:25       ` Tom Tromey
2009-04-20 18:58   ` Eli Zaretskii

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=m2r5zoz5rq.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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