OSDN Git Service

configure: clean-up the target-list-exclude logic
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 15 Sep 2020 13:43:14 +0000 (14:43 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 16 Sep 2020 09:07:01 +0000 (10:07 +0100)
Rather than sed and loop just do a grep.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200915134317.11110-6-alex.bennee@linaro.org>

configure

index f5fe48d..58be974 100755 (executable)
--- a/configure
+++ b/configure
@@ -1739,17 +1739,9 @@ if test -z "$target_list"; then
     fi
 fi
 
-exclude_list=$(echo "$target_list_exclude" | sed -e 's/,/ /g')
 for config in $mak_wilds; do
     target="$(basename "$config" .mak)"
-    exclude="no"
-    for excl in $exclude_list; do
-        if test "$excl" = "$target"; then
-            exclude="yes"
-            break;
-        fi
-    done
-    if test "$exclude" = "no"; then
+    if echo "$target_list_exclude" | grep -vq "$target"; then
         default_target_list="${default_target_list} $target"
     fi
 done