changeset 5696:70cc04f9af41

[project @ 2006-03-20 18:52:45 by jwe]
author jwe
date Mon, 20 Mar 2006 18:52:46 +0000
parents f6ddb906e30f
children 2fe20065a545
files scripts/ChangeLog scripts/miscellaneous/mkoctfile.m
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Mar 20 18:34:13 2006 +0000
+++ b/scripts/ChangeLog	Mon Mar 20 18:52:46 2006 +0000
@@ -1,3 +1,8 @@
+2006-03-20  John W. Eaton  <jwe@octave.org>
+
+	* miscellaneous/mkoctfile.m: Use version-specific name of
+	mkoctfile.  Use fullfile to construct file name.
+
 2006-03-20  Keith Goodman  <kwgoodman@gmail.com>
 
 	* miscellaneous/mkoctfile.m: Make it possible to call mkoctfile
--- a/scripts/miscellaneous/mkoctfile.m	Mon Mar 20 18:34:13 2006 +0000
+++ b/scripts/miscellaneous/mkoctfile.m	Mon Mar 20 18:52:46 2006 +0000
@@ -105,19 +105,20 @@
 
 function mkoctfile (varargin)
 
-  mkoctpath = strcat (octave_config_info.bindir, filesep, "mkoctfile");
-  
-  options = "";
+  bindir = octave_config_info ("bindir");
+
+  shell_script = fullfile (bindir, sprintf ("mkoctfile-%s", OCTAVE_VERSION));
+
+  cmd = shell_script;
   for i = 1:nargin
-    options = strcat (options, " ", varargin{i});
+    cmd = strcat (cmd, " ", varargin{i});
   endfor
   
-  cmd = strcat (mkoctpath, options);
-   
   status = system (cmd);
 
   if (status == 127)
-    warning ("unable to find mkoctfile in expected location: %s", mkoctpath);
+    warning ("unable to find mkoctfile in expected location: `%s'",
+	     shell_script);
   elseif (status != 0)
     warning ("mkoctfile exited with failure status");
   endif