This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: NAT_FILE set incorrectly in gdb/Makefile
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 19 Apr 2009 23:35:05 +0200
- Subject: Re: NAT_FILE set incorrectly in gdb/Makefile
- References: <838wlwii4o.fsf@gnu.org>
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."