Mercurial > octave
annotate scripts/miscellaneous/mex.m @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | 0a5b15007766 |
children | 597f3ee61a48 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 ######################################################################## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 ## |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
3 ## Copyright (C) 2006-2022 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26973
diff
changeset
|
4 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 ## See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 ## distribution or <https://octave.org/copyright/>. |
5904 | 7 ## |
8 ## This file is part of Octave. | |
9 ## | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
5904 | 11 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22461
diff
changeset
|
13 ## (at your option) any later version. |
5904 | 14 ## |
15 ## Octave is distributed in the hope that it will be useful, but | |
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22461
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22461
diff
changeset
|
18 ## GNU General Public License for more details. |
5904 | 19 ## |
20 ## You should have received a copy of the GNU General Public License | |
7016 | 21 ## along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
22 ## <https://www.gnu.org/licenses/>. |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 ## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 ######################################################################## |
5904 | 25 |
26 ## -*- texinfo -*- | |
26973
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
27 ## @deftypefn {} {} mex [-options] file @dots{} |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
28 ## @deftypefnx {} {@code{status} =} mex (@dots{}) |
5904 | 29 ## Compile source code written in C, C++, or Fortran, to a MEX file. |
19597
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19192
diff
changeset
|
30 ## |
26973
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
31 ## @var{status} is the return status of the @code{mkoctfile} function. |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
32 ## |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
33 ## If the compilation fails, and the output argument is not requested, |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
34 ## an error is raised. If the programmer requests @var{status}, however, |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
35 ## Octave will merely issue a warning and it is the programmer's responsibility |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
36 ## to verify the command was successful. |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
37 ## |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
38 ## This is equivalent to @code{mkoctfile --mex [-options] file}. |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
39 ## |
19192
8a8a7bc2a09d
Improve docstrings and mark documentation m-files as tested in miscellaneous/ dir.
Rik <rik@octave.org>
parents:
18194
diff
changeset
|
40 ## @seealso{mkoctfile, mexext} |
5904 | 41 ## @end deftypefn |
42 | |
26973
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
43 function status = mex (varargin) |
18194
d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
44 |
26973
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
45 [out, sts] = mkoctfile ("--mex", varargin{:}); |
18194
d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
46 |
26973
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
47 if (! isempty (out)) |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
48 printf ("%s", out); |
18194
d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
49 endif |
d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 if (nargout > 0) |
26973
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
51 status = sts; |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
52 else |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
53 if (sts != 0) |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
54 error ("mex: building exited with failure status\n"); |
2b23129f8a96
mex.m: Raise an error on failure when return value is not captured (bug #55990).
Andrew Janke <andrew@apjanke.net>
parents:
26376
diff
changeset
|
55 endif |
18194
d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
56 endif |
d3c6842ef188
mex.m: Return status if called with an output argument (bug #40984).
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
57 |
5904 | 58 endfunction |
17338
1c89599167a6
maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents:
17170
diff
changeset
|
59 |
19192
8a8a7bc2a09d
Improve docstrings and mark documentation m-files as tested in miscellaneous/ dir.
Rik <rik@octave.org>
parents:
18194
diff
changeset
|
60 |
19597
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19192
diff
changeset
|
61 ## Remove from test statistics. All real tests are in mkoctfile. |
19192
8a8a7bc2a09d
Improve docstrings and mark documentation m-files as tested in miscellaneous/ dir.
Rik <rik@octave.org>
parents:
18194
diff
changeset
|
62 %!assert (1) |