Mercurial > hg > octave-nkf
annotate liboctave/cruft/mkf77def.in @ 20761:b7ac1e94266e
maint: Further clean up of functions in ode/private dir.
* AbsRel_Norm.m, fuzzy_compare.m, integrate_adaptive.m, integrate_const.m,
integrate_n_steps.m, ode_struct_value_check.m, odepkg_event_handle.m,
odepkg_structure_check.m, runge_kutta_45_dorpri.m:
Place latest copyright first in file.
Use two spaces before beginning single-line comment.
Use parentheses around variable to be tested in switch stmt.
Use space between function name and opening parenthesis.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 05 Oct 2015 12:03:16 -0700 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
6102 | 1 #! /bin/sh |
7019 | 2 # |
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
3 # Copyright (C) 2006-2015 John W. Eaton |
7019 | 4 # |
5 # This file is part of Octave. | |
12174 | 6 # |
7019 | 7 # Octave is free software; you can redistribute it and/or modify it |
8 # under the terms of the GNU General Public License as published by the | |
9 # Free Software Foundation; either version 3 of the License, or (at | |
10 # your option) any later version. | |
12174 | 11 # |
7019 | 12 # Octave is distributed in the hope that it will be useful, but WITHOUT |
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 # for more details. | |
12174 | 16 # |
7019 | 17 # You should have received a copy of the GNU General Public License |
18 # along with Octave; see the file COPYING. If not, see | |
19 # <http://www.gnu.org/licenses/>. | |
6102 | 20 |
21 SED=${SED:-'sed'} | |
22 AWK=${AWK:-'awk'} | |
23 | |
9817
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
24 F77_TOLOWER="@F77_APPEND_UNDERSCORE@" |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
25 F77_APPEND_UNDERSCORE="@F77_APPEND_UNDERSCORE@" |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
26 F77_APPEND_EXTRA_UNDERSCORE="@F77_APPEND_EXTRA_UNDERSCORE@" |
6102 | 27 |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
28 if test x$F77_TOLOWER = xyes; then |
6102 | 29 case_cmd="tolower"; |
30 else | |
31 case_cmd="toupper"; | |
32 fi | |
33 | |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
34 if test x$F77_APPEND_UNDERSCORE = xyes; then |
6102 | 35 uscore="_"; |
36 else | |
37 uscore=""; | |
38 fi | |
39 | |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
40 if test x$F77_APPEND_EXTRA_UNDERSCORE = xyes; then |
6102 | 41 awkcmd="$AWK '{ if (\$0 ~ /_/) extra = \"_\"; else extra = \"\"; printf (\"%s%s%s\n\", $case_cmd (\$0), \"$uscore\", extra); }'" |
42 else | |
43 awkcmd="$AWK '{ printf (\"%s%s\n\", tolower (\$0), \"$uscore\"); }'" | |
44 fi | |
45 | |
9817
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
46 if [ $# -gt 1 ]; then |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
47 srcdir="$1" |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
48 shift |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
49 fi |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
50 |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
51 echo EXPORTS |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
52 for arg |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
53 do |
9822
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
54 case "$arg" in |
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
55 *.f) |
12174 | 56 ## There are TABS in this sed command. |
9822
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
57 $SED -n -e 'y/ABCDEFGHIJLKMNOPQRSTUVWXYZ/abcdefghijlkmnopqrstuvwxyz/; s/^\( \| \)[ ]*\(.*function\|subroutine\|entry\)[ ]*\([^ (]*\).*$/\3/p' "$srcdir/$arg" | eval $awkcmd |
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
58 ;; |
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
59 esac |
9817
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
60 done |