]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed iterating over ls output is fragile in configure script.
authorNathan Moinvaziri <nathan@nathanm.com>
Fri, 26 Feb 2021 01:27:03 +0000 (17:27 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 12 Jun 2021 16:26:50 +0000 (18:26 +0200)
configure

index 3d527683bfdb82fdb3b1c0b95adeb5357285a252..cf557844fc68b889806efaedaf624c552d433036 100755 (executable)
--- 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,