* (toplevel patch) Clean up sed
@ 2002-12-27 16:36 Nathanael Nerode
2002-12-27 16:50 ` DJ Delorie
0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-12-27 16:36 UTC (permalink / raw)
To: gcc-patches, gdb-patches, binutils, dj
This moves some logic out of sed statements into earlier shell assignments, to
clear the way for replacing the sed statements with AC_SUBSTs. Tested on
i686-pc-linux-gnu, generated Makefile unchanged.
* configure.in: Move logic out of sed statement.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.198
diff -u -r1.198 configure.in
--- configure.in 23 Dec 2002 16:54:15 -0000 1.198
+++ configure.in 28 Dec 2002 00:27:31 -0000
@@ -1703,6 +1703,14 @@
qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
+# Wrap CC_FOR_TARGET and friends, for certain types of builds.
+CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) "${CC_FOR_TARGET}
+GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) "${GCJ_FOR_TARGET}
+CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) "${qCXX_FOR_TARGET}
+RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) "${qRAW_CXX_FOR_TARGET}
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) "${qqCXX_FOR_TARGET}
+RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) "${qqRAW_CXX_FOR_TARGET}
+
sedtemp=sed.$$
cat >$sedtemp <<EOF
s%@GDB_TK@%${GDB_TK}%
@@ -1720,12 +1728,12 @@
s:@target_configdirs@:${target_configdirs}:
s%@target_configargs@%${targargs}%
s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%
-s%@CC_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
-s%@GCJ_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
-s%@CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
-s%@RAW_CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}%
-s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
-s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}%
+s%@CC_FOR_TARGET@%${CC_FOR_TARGET}%
+s%@GCJ_FOR_TARGET@%${GCJ_FOR_TARGET}%
+s%@CXX_FOR_TARGET@%${CXX_FOR_TARGET}%
+s%@RAW_CXX_FOR_TARGET@%${RAW_CXX_FOR_TARGET}%
+s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%${CXX_FOR_TARGET_FOR_RECURSIVE_MAKE}%
+s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%${RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE}%
s%@target_subdir@%${target_subdir}%
s%@build_subdir@%${build_subdir}%
s%@build_configargs@%${buildargs}%
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: (toplevel patch) Clean up sed
2002-12-27 16:36 (toplevel patch) Clean up sed Nathanael Nerode
@ 2002-12-27 16:50 ` DJ Delorie
2002-12-27 22:50 ` Alexandre Oliva
0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2002-12-27 16:50 UTC (permalink / raw)
To: neroden; +Cc: gcc-patches, gdb-patches, binutils
> +CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) "${CC_FOR_TARGET}
Shouldn't the quotes surround the whole expression? What if
CC_FOR_TARGET has spaces in it?
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: (toplevel patch) Clean up sed
2002-12-27 16:50 ` DJ Delorie
@ 2002-12-27 22:50 ` Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2002-12-27 22:50 UTC (permalink / raw)
To: DJ Delorie; +Cc: neroden, gcc-patches, gdb-patches, binutils
On Dec 27, 2002, DJ Delorie <dj@delorie.com> wrote:
>> +CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) "${CC_FOR_TARGET}
> Shouldn't the quotes surround the whole expression? What if
> CC_FOR_TARGET has spaces in it?
It doesn't matter. It would be enough to quote just the space and the
parentheses. Variable expansion occurs after word-splitting, so the
assigned value is not altered by word separators that are not present
in the original command.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20021228003938.GA2460@doctormoo>]
end of thread, other threads:[~2002-12-28 4:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-27 16:36 (toplevel patch) Clean up sed Nathanael Nerode
2002-12-27 16:50 ` DJ Delorie
2002-12-27 22:50 ` Alexandre Oliva
[not found] <20021228003938.GA2460@doctormoo>
2002-12-27 19:46 ` DJ Delorie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox