Commit 87e24276 by Jim Wilson

Change output to be a sequence of short strings

separated by commas rather than a single long macro definition.

From-SVN: r12240
parent ffd86336
...@@ -62,16 +62,15 @@ ...@@ -62,16 +62,15 @@
# genmultilib "m68000/m68020 msoft-float" "m68000 m68020 msoft-float" # genmultilib "m68000/m68020 msoft-float" "m68000 m68020 msoft-float"
# "m68000=mc68000" # "m68000=mc68000"
# This produces: # This produces:
# #define MULTILIB_SELECT "\ # ". !m68000 !mc68000 !m68020 !msoft-float;",
# . !m68000 !mc68000 !m68020 !msoft-float;\ # "m68000 m68000 !m68020 !msoft-float;",
# m68000 m68000 !m68020 !msoft-float;\ # "m68000 mc60000 !m68020 !msoft-float;",
# m68000 mc60000 !m68020 !msoft-float;\ # "m68020 !m68000 !mc68000 m68020 !msoft-float;",
# m68020 !m68000 !mc68000 m68020 !msoft-float;\ # "msoft-float !m68000 !mc68000 !m68020 msoft-float;",
# msoft-float !m68000 !mc68000 !m68020 msoft-float;\ # "m68000/msoft-float m68000 !m68020 msoft-float;",
# m68000/msoft-float m68000 !m68020 msoft-float;\ # "m68000/msoft-float mc68000 !m68020 msoft-float;",
# m68000/msoft-float mc68000 !m68020 msoft-float;\ # "m68020/msoft-float !m68000 !mc68000 m68020 msoft-float;",
# m68020/msoft-float !m68000 !mc68000 m68020 msoft-float;\ #
# "
# The effect is that `gcc -msoft-float' (for example) will append # The effect is that `gcc -msoft-float' (for example) will append
# msoft-float to the directory name when searching for libraries or # msoft-float to the directory name when searching for libraries or
# startup files, and `gcc -m68000 -msoft-float' (for example) will # startup files, and `gcc -m68000 -msoft-float' (for example) will
...@@ -185,7 +184,7 @@ cat >tmpmultilib2 <<\EOF ...@@ -185,7 +184,7 @@ cat >tmpmultilib2 <<\EOF
# ${dirout} is the directory name and ${optout} is the current list of # ${dirout} is the directory name and ${optout} is the current list of
# options. # options.
if [ "$#" = "0" ]; then if [ "$#" = "0" ]; then
echo "${dirout} ${optout};\\" echo "\"${dirout} ${optout};\","
else else
first=$1 first=$1
shift shift
...@@ -200,9 +199,6 @@ fi ...@@ -200,9 +199,6 @@ fi
EOF EOF
chmod +x tmpmultilib2 chmod +x tmpmultilib2
# We are ready to start output.
echo '#define MULTILIB_SELECT "\'
# Start with the current directory, which includes only negations. # Start with the current directory, which includes only negations.
optout= optout=
for set in ${options}; do for set in ${options}; do
...@@ -214,7 +210,7 @@ optout=`echo ${optout} | sed -e 's/^ //'` ...@@ -214,7 +210,7 @@ optout=`echo ${optout} | sed -e 's/^ //'`
if [ -n "${matchnegations}" ]; then if [ -n "${matchnegations}" ]; then
optout=`echo ";${optout};" | sed -e 's/ /;/g' ${matchnegations} -e 's/^;//' -e 's/;$//' -e 's/;/ /g'` optout=`echo ";${optout};" | sed -e 's/ /;/g' ${matchnegations} -e 's/^;//' -e 's/;$//' -e 's/;/ /g'`
fi fi
echo ". ${optout};\\" echo "\". ${optout};\","
# Work over the list of combinations. We have to translate each one # Work over the list of combinations. We have to translate each one
# to use the directory names rather than the option names, we have to # to use the directory names rather than the option names, we have to
...@@ -254,9 +250,9 @@ for combo in ${combinations}; do ...@@ -254,9 +250,9 @@ for combo in ${combinations}; do
dirout="${dirout}" optout="${optout}" ./tmpmultilib2 ${matches} dirout="${dirout}" optout="${optout}" ./tmpmultilib2 ${matches}
done done
rm -f tmpmultilib2 # Terminate the list of string.
echo "NULL"
# That's it. rm -f tmpmultilib2
echo '"'
exit 0 exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment