view build-aux/find-defun-files.sh @ 22249:da201af35c97

maint: properly include <vector> in svd classes. * liboctave/numeric/gsvd.cc: insert missing include. * liboctave/numeric/svd.h: use <> rather than "". * liboctave/numeric/svd.cc: remove include, done in the header already.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Wed, 10 Aug 2016 09:09:41 +0200
parents 6119019d42f6
children 592fa741e0aa
line wrap: on
line source

#! /bin/sh

set -e

SED=${SED:-sed}
EGREP=${EGREP:-egrep}

# Some stupid egreps don't like empty elements in alternation patterns,
# so we have to repeat ourselves because some stupid egreps don't like
# empty elements in alternation patterns.

DEFUN_PATTERN="^[ \t]*DEF(CONSTFUN|UN|UN_DLD|UNX|UNX_DLD)[ \t]*\\("

srcdir="$1"
if [ "$1" ]; then
  shift
fi

for arg
do
  if [ -f "$arg" ]; then
    file="$arg"
  else
    file="$srcdir/$arg"
  fi
  if [ -f "$file" ]; then
    if [ "`$EGREP -l "$DEFUN_PATTERN" $file`" ]; then
      echo "$file" | $SED "s,\\$srcdir/,,"
    fi
  fi
done