# HG changeset patch # User Mike Miller # Date 1455674227 28800 # Node ID 3b4bb843ffcdeea09b1a44bc75b403ef1b069c71 # Parent 85d8280c64f4331e2e8880e5a255d96293bb016a maint: Ensure source files exist when searching for patterns during build * find-files-with-tests.sh: Test for file existence to avoid spurious warnings on not-yet-generated sources. * find-defun-files.sh: Likewise. diff -r 85d8280c64f4 -r 3b4bb843ffcd build-aux/find-files-with-tests.sh --- a/build-aux/find-files-with-tests.sh Tue Feb 16 16:01:56 2016 -0800 +++ b/build-aux/find-files-with-tests.sh Tue Feb 16 17:57:07 2016 -0800 @@ -14,7 +14,9 @@ else file="$srcdir/$arg" fi - if [ "`$GREP -l '^%!' $file`" ]; then - echo "$file" | $SED "s,\\$srcdir/,,"; + if [ -f "$file" ]; then + if [ "`$GREP -l '^%!' $file`" ]; then + echo "$file" | $SED "s,\\$srcdir/,," + fi fi done diff -r 85d8280c64f4 -r 3b4bb843ffcd libinterp/find-defun-files.sh --- a/libinterp/find-defun-files.sh Tue Feb 16 16:01:56 2016 -0800 +++ b/libinterp/find-defun-files.sh Tue Feb 16 17:57:07 2016 -0800 @@ -20,7 +20,9 @@ else file="$srcdir/$arg" fi - if [ "`$EGREP -l "$DEFUN_PATTERN" $file`" ]; then - echo "$file" | $SED "s,\\$srcdir/,," | $SED 's/\.cc$/.df/; s/\.ll$/.df/; s/\.in.yy$/.df/'; + if [ -f "$file" ]; then + if [ "`$EGREP -l "$DEFUN_PATTERN" $file`" ]; then + echo "$file" | $SED "s,\\$srcdir/,," | $SED 's/\.cc$/.df/; s/\.ll$/.df/; s/\.in.yy$/.df/' + fi fi done