From: Nathan Moinvaziri Date: Fri, 26 Feb 2021 01:27:03 +0000 (-0800) Subject: Fixed iterating over ls output is fragile in configure script. X-Git-Tag: 2.1.0-beta1~590 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eabea7c8804552d27092fa292766e29d4200431;p=thirdparty%2Fzlib-ng.git Fixed iterating over ls output is fragile in configure script. --- diff --git a/configure b/configure index 3d527683b..cf557844f 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,