annotate src/find-defun-files.sh @ 9906:8d20fb66a0dc

more automake fixes
author John W. Eaton <jwe@octave.org>
date Thu, 03 Dec 2009 15:39:20 -0500
parents 0d4613a736e9
children 3275dda012f7
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
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 # 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
6 # 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
7 # empty elements in alternation patterns.
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 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
10
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 srcdir="$1"
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 shift
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 for arg
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 do
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
16 if [ -f "$arg" ]; then
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
17 file="$arg"
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
18 else
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
19 file="$srcdir/$arg"
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 fi
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 if [ "`egrep -l "$DEFUN_PATTERN" $file`" ]; then
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
22 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
23 fi
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 done