diff mbox series

[v2,5/8] configure: clean-up the target-list-exclude logic

Message ID 20200915134317.11110-6-alex.bennee@linaro.org
State New
Headers show
Series configure deprecation, linux-user and iotest fixes | expand

Commit Message

Alex Bennée Sept. 15, 2020, 1:43 p.m. UTC
Rather than sed and loop just do a grep.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 configure | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

-- 
2.20.1

Comments

Richard Henderson Sept. 15, 2020, 5:17 p.m. UTC | #1
On 9/15/20 6:43 AM, Alex Bennée wrote:
> Rather than sed and loop just do a grep.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  configure | 10 +---------

>  1 file changed, 1 insertion(+), 9 deletions(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/configure b/configure
index f5fe48d6dd7b..58be974065c8 100755
--- 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