]> gcc.gnu.org Git - gcc.git/commitdiff
config-list.mk: Extract target name correctly
authorJan-Benedict Glaw <jbglaw@lug-owl.de>
Mon, 5 Jan 2015 19:28:47 +0000 (19:28 +0000)
committerJan-Benedict Glaw <jbglaw@gcc.gnu.org>
Mon, 5 Jan 2015 19:28:47 +0000 (19:28 +0000)
With my last change, `sed' is used to cut out the target name from a listed
target. Since there may be additional OPTions encoded in the "target", I tried
to get only the first submatch before an `OPT'. However, `sed' uses longest
match, so I'm re-writing this using awk.

  If anybody is like using `gawk' or anything different, please feel free to
drop another patch. Since this is usually called by hand or by robots under
review, I don't see much of a problem here.

2015-01-05  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

contrib/
       * config-list.mk: Use shortest match for OPT to find the actual
       target name.

From-SVN: r219196

contrib/ChangeLog
contrib/config-list.mk

index f2d21db36e1293b5f3c94faf84616a2105c1c119..58d80f01d7246a839b85c5ce1087750f5e7aa7cc 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-05  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+
+       * config-list.mk: Use shortest match for OPT to find the actual
+       target name.
+
 2014-12-17  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * dg-extract-results.sh: Use --text with grep to avoid issues with
index 16900e19e5307166c953aeeec48241c589971d81..db2bad05b127262b589d205010dc6ab8e682f176 100644 (file)
@@ -97,8 +97,7 @@ $(LIST): make-log-dir
        -mkdir $@
        (                                                                                       \
                cd $@ &&                                                                        \
-               echo $@ &&                                                                      \
-               TGT=`echo $@ | sed -e 's/^\(.*\)OPT.*$$/\1/'` &&                                \
+               TGT=`echo $@ | awk 'BEGIN { FS = "OPT" }; { print $$1 }'` &&                    \
                TGT=`../../gcc/config.sub $$TGT` &&                                             \
                case $$TGT in                                                                   \
                        *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)                      \
This page took 0.062704 seconds and 5 git commands to generate.