diff options
author | jbglaw <jbglaw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-05 19:28:47 +0000 |
---|---|---|
committer | jbglaw <jbglaw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-05 19:28:47 +0000 |
commit | ed3d22cc9abdf472519ad329a60a86e838d52232 (patch) | |
tree | 872ac16f79a63faeb112f5757a50eca3f85c3001 | |
parent | 8dd9da4894ca24f5613cd019dbf8094db2281422 (diff) | |
download | gcc-ed3d22cc9abdf472519ad329a60a86e838d52232.tar.gz |
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 <jbglaw@lug-owl.de>
contrib/
* config-list.mk: Use shortest match for OPT to find the actual
target name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219196 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | contrib/ChangeLog | 5 | ||||
-rw-r--r-- | contrib/config-list.mk | 3 |
2 files changed, 6 insertions, 2 deletions
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 <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 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*) \ |