Mercurial > jwe > octave
changeset 21276:3b4bb843ffcd
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.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 16 Feb 2016 17:57:07 -0800 |
parents | 85d8280c64f4 |
children | 1bca6c72d2b1 |
files | build-aux/find-files-with-tests.sh libinterp/find-defun-files.sh |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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