]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Make sure file exists before adding it as dependency in configure.
authorMika Lindqvist <postmaster@raasu.org>
Wed, 31 May 2023 04:30:57 +0000 (07:30 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 1 Jun 2023 07:42:00 +0000 (09:42 +0200)
configure

index f84233e098a5668d7cf1bca37e8d8fb572f26f03..a7ecc370b6bec8e813a76b7f6da21e788b5a0661 100755 (executable)
--- a/configure
+++ b/configure
@@ -2148,8 +2148,12 @@ sed < $SRCDIR/Makefile.in "
 /^ARCH_SHARED_OBJS *=/s#=.*#=$ARCH_SHARED_OBJS#
 " > Makefile
 
-# Append header files dependences.
+# Append header files dependencies.
 for file in $SRCDIR/*.c $SRCDIR/test/*.c $SRCDIR/test/fuzz/*.c $SRCDIR/$ARCHDIR/*.c $SRCDIR/tools/*.c; do
+    if test ! -f $file; then
+        continue
+    fi
+
     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
@@ -2222,8 +2226,12 @@ sed < $SRCDIR/$ARCHDIR/Makefile.in "
 /^PPCFLAGS *=/s#=.*#=$vmxflag#
 " > $ARCHDIR/Makefile
 
-# Append header files dependences.
+# Append header files dependencies.
 for file in $SRCDIR/$ARCHDIR/*.c; do
+    if test ! -f $file; then
+        continue
+    fi
+
     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,