annotate src/find-defun-files.sh @ 11542:695141f1c05c ss-3-3-55

snapshot 3.3.55
author John W. Eaton <jwe@octave.org>
date Sat, 15 Jan 2011 04:53:04 -0500
parents 3275dda012f7
children 4cf7356a99d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 #! /bin/sh
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 set -e
10016
3275dda012f7 find-defun-files.sh: use sed and egrep as found by configure
Rob Mahurin <octave@tertiarysource.net>
parents: 9906
diff changeset
4 SED=${SED:-sed}
3275dda012f7 find-defun-files.sh: use sed and egrep as found by configure
Rob Mahurin <octave@tertiarysource.net>
parents: 9906
diff changeset
5 EGREP=${EGREP:-egrep}
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 # Some stupid egreps don't like empty elements in alternation patterns,
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 # so we have to repeat ourselves because some stupid egreps don't like
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 # empty elements in alternation patterns.
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 DEFUN_PATTERN="^[ \t]*DEF(CONSTFUN|CMD|UN|UN_DLD|UNX_DLD|UN_TEXT)[ \t]*\\("
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 srcdir="$1"
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 shift
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 for arg
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 do
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
18 if [ -f "$arg" ]; then
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
19 file="$arg"
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
20 else
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
21 file="$srcdir/$arg"
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 fi
10016
3275dda012f7 find-defun-files.sh: use sed and egrep as found by configure
Rob Mahurin <octave@tertiarysource.net>
parents: 9906
diff changeset
23 if [ "`$EGREP -l "$DEFUN_PATTERN" $file`" ]; then
3275dda012f7 find-defun-files.sh: use sed and egrep as found by configure
Rob Mahurin <octave@tertiarysource.net>
parents: 9906
diff changeset
24 echo "$file" | $SED 's,.*/,,; s/\.\(cc\|yy\|ll\)$/.df/';
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 fi
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 done