Mercurial > octave
annotate liboctave/external/mk-f77-def.in.sh @ 33639:65b1cf6aa60a bytecode-interpreter tip
maint: Merge default to bytecode-interpreter
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Mon, 03 Jun 2024 14:38:47 -0400 |
parents | 2e484f9f1f18 |
children |
rev | line source |
---|---|
6102 | 1 #! /bin/sh |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
2 |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 ######################################################################## |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
4 ## |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
31706
diff
changeset
|
5 ## Copyright (C) 2006-2024 The Octave Project Developers |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
6 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
7 ## See the file COPYRIGHT.md in the top-level directory of this |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
8 ## distribution or <https://octave.org/copyright/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
9 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
10 ## This file is part of Octave. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
11 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
12 ## Octave is free software: you can redistribute it and/or modify it |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
13 ## under the terms of the GNU General Public License as published by |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
14 ## the Free Software Foundation, either version 3 of the License, or |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
15 ## (at your option) any later version. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
16 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
17 ## Octave is distributed in the hope that it will be useful, but |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
18 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
20 ## GNU General Public License for more details. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
21 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
22 ## You should have received a copy of the GNU General Public License |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
23 ## along with Octave; see the file COPYING. If not, see |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
24 ## <https://www.gnu.org/licenses/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
25 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
26 ######################################################################## |
6102 | 27 |
21398
7e8a410e6124
break generated file dependence on Makefile (bug #46063)
John W. Eaton <jwe@octave.org>
parents:
21277
diff
changeset
|
28 : ${SED=@SED@} |
7e8a410e6124
break generated file dependence on Makefile (bug #46063)
John W. Eaton <jwe@octave.org>
parents:
21277
diff
changeset
|
29 : ${AWK=@AWK@} |
6102 | 30 |
30518
18f83b84897d
mk-f77-def.in.sh: Fix incorrect configuration substitution.
Gene Harvey <gharveymn@gmail.com>
parents:
29358
diff
changeset
|
31 F77_TOLOWER="@F77_TOLOWER@" |
9817
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
32 F77_APPEND_UNDERSCORE="@F77_APPEND_UNDERSCORE@" |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
33 F77_APPEND_EXTRA_UNDERSCORE="@F77_APPEND_EXTRA_UNDERSCORE@" |
6102 | 34 |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
35 if test x$F77_TOLOWER = xyes; then |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
19697
diff
changeset
|
36 case_cmd=tolower |
6102 | 37 else |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
19697
diff
changeset
|
38 case_cmd=toupper |
6102 | 39 fi |
40 | |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
41 if test x$F77_APPEND_UNDERSCORE = xyes; then |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
19697
diff
changeset
|
42 uscore=_ |
6102 | 43 else |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
19697
diff
changeset
|
44 uscore= |
6102 | 45 fi |
46 | |
16068
b309a5da17f5
use yes/no instead of true/false in confgure scripts
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
47 if test x$F77_APPEND_EXTRA_UNDERSCORE = xyes; then |
6102 | 48 awkcmd="$AWK '{ if (\$0 ~ /_/) extra = \"_\"; else extra = \"\"; printf (\"%s%s%s\n\", $case_cmd (\$0), \"$uscore\", extra); }'" |
49 else | |
50 awkcmd="$AWK '{ printf (\"%s%s\n\", tolower (\$0), \"$uscore\"); }'" | |
51 fi | |
52 | |
9817
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
53 if [ $# -gt 1 ]; then |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
54 srcdir="$1" |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
55 shift |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
56 fi |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
57 |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
58 echo EXPORTS |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
59 for arg |
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
60 do |
9822
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
61 case "$arg" in |
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
62 *.f) |
12174 | 63 ## 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
|
64 $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
|
65 ;; |
64270d3ad469
mkf77def.in: only process *.f files
John W. Eaton <jwe@octave.org>
parents:
9817
diff
changeset
|
66 esac |
9817
932b0efeb81b
restore rules to create libcruft/cruft.def
John W. Eaton <jwe@octave.org>
parents:
7019
diff
changeset
|
67 done |