Mercurial > octave-antonio
diff scripts/miscellaneous/mkoctfile.m @ 17516:21656a949661
Add hook function to handle missing Octave components
* __gripe_missing_component__.m: New internal function to handle errors due
to missing Octave components.
* scripts/help/module.mk (help_FCN_FILES): Add __gripe_missing_component__.m.
* variables.cc (Vmissing_component_hook): New internal variable.
* doc.m, mkoctfile.m, configure_make.m: Call __gripe_missing_component__
if required files are not found.
* NEWS: Mention missing_component_hook.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 29 Sep 2013 16:06:41 -0400 |
parents | 1c89599167a6 |
children | 6b8df90c8806 |
line wrap: on
line diff
--- a/scripts/miscellaneous/mkoctfile.m Sun Sep 29 20:56:39 2013 +0200 +++ b/scripts/miscellaneous/mkoctfile.m Sun Sep 29 16:06:41 2013 -0400 @@ -146,6 +146,10 @@ shell_script = fullfile (bindir, sprintf ("mkoctfile-%s", OCTAVE_VERSION)); + if (! exist (shell_script, "file")) + __gripe_missing_component__ ("mkoctfile", "mkoctfile"); + endif + cmd = ['"' shell_script '"']; for i = 1:nargin cmd = [cmd ' "' varargin{i} '"']; @@ -159,10 +163,7 @@ printf ("%s", out); endif - if (sys == 127) - warning ("unable to find mkoctfile in expected location: '%s'", - shell_script); - + if (sys != 0) warning ("mkoctfile exited with failure status"); endif