From: Jan-Benedict Glaw Date: Mon, 5 Jan 2015 19:28:47 +0000 (+0000) Subject: config-list.mk: Extract target name correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04a11c01de8e1480ef155329062e78d5c915f943;p=gcc.git config-list.mk: Extract target name correctly 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 contrib/ * config-list.mk: Use shortest match for OPT to find the actual target name. From-SVN: r219196 --- diff --git a/contrib/ChangeLog b/contrib/ChangeLog index f2d21db36e1..58d80f01d72 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2015-01-05 Jan-Benedict Glaw + + * config-list.mk: Use shortest match for OPT to find the actual + target name. + 2014-12-17 Sergio Durigan Junior * dg-extract-results.sh: Use --text with grep to avoid issues with diff --git a/contrib/config-list.mk b/contrib/config-list.mk index 16900e19e53..db2bad05b12 100644 --- a/contrib/config-list.mk +++ b/contrib/config-list.mk @@ -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*) \