This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NAT_FILE set incorrectly in gdb/Makefile

Eli Zaretskii <> 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
>   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.


2009-04-19  Andreas Schwab  <>

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

Index: gdb/
RCS file: /cvs/src/src/gdb/,v
retrieving revision 1.93
diff -u -a -p -r1.93 gdb/
--- gdb/	17 Apr 2009 17:44:04 -0000	1.93
+++ gdb/	19 Apr 2009 21:30:07 -0000
@@ -1967,10 +1967,11 @@ dnl Autoconf doesn't provide a mechanism
 dnl provided by makefile fragments.
-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

Andreas Schwab,
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]