From 6eabea7c8804552d27092fa292766e29d4200431 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Thu, 25 Feb 2021 17:27:03 -0800 Subject: [PATCH] Fixed iterating over ls output is fragile in configure script. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3d527683..cf557844 100755 --- a/configure +++ b/configure @@ -1687,7 +1687,7 @@ sed < $SRCDIR/Makefile.in " " > Makefile # Append header files dependences. -for file in $(ls -1 $SRCDIR/*.c $SRCDIR/test/*.c $SRCDIR/test/fuzz/*.c $SRCDIR/$ARCHDIR/*.c $SRCDIR/tools/*.c); do +for file in $SRCDIR/*.c $SRCDIR/test/*.c $SRCDIR/test/fuzz/*.c $SRCDIR/$ARCHDIR/*.c $SRCDIR/tools/*.c; do short_name=$(echo $file | sed -e "s#$SRCDIR/##g") incs=$(grep -h include $file | sed -n 's/# *\include *"\(.*\.h\)".*/\1/p' | sort | uniq) includes=$(for i in $incs; do @@ -1755,7 +1755,7 @@ sed < $SRCDIR/$ARCHDIR/Makefile.in " " > $ARCHDIR/Makefile # Append header files dependences. -for file in $(ls -1 $SRCDIR/$ARCHDIR/*.c); do +for file in $SRCDIR/$ARCHDIR/*.c; do incs=$(grep -h include $file | sed -n 's/# *\include *"\(.*\.h\)".*/\1/p' | sort | uniq) includes=$(for i in $incs; do # Check that the include file exists in the current dir, -- 2.47.3