changeset 11870:cad9324e5d6f release-3-0-x

pkg.m: better handling of filenames with spaces
author John W. Eaton <jwe@octave.org>
date Fri, 10 Oct 2008 11:19:29 +0200
parents 73cd97eb1c3f
children 4a8e105fa59a
files scripts/ChangeLog scripts/pkg/pkg.m
diffstat 2 files changed, 8 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Fri Oct 10 11:19:20 2008 +0200
+++ b/scripts/ChangeLog	Fri Oct 10 11:19:29 2008 +0200
@@ -1,3 +1,7 @@
+2008-10-02  John W. Eaton  <jwe@octave.org>
+
+	* pkg/pkg.m (configure_make): Handle filenames with spaces.: 
+
 2008-10-02  Benjamin Lindner <lindnerb@users.sourceforge.net>
 
 	* pkg.m (configure_make): Enclose building directory in quotes.
--- a/scripts/pkg/pkg.m	Fri Oct 10 11:19:20 2008 +0200
+++ b/scripts/pkg/pkg.m	Fri Oct 10 11:19:29 2008 +0200
@@ -1281,21 +1281,10 @@
       m = dir (fullfile (src, "*.m"));
       oct = dir (fullfile (src, "*.oct"));
       mex = dir (fullfile (src, "*.mex"));
-      archdependent = "";
-      archindependent = "";
-      filenames = "";
-      if (length (m) > 0)
-	filenames = sprintf (fullfile (src, "%s "), m.name);
-      endif
-      if (length (oct) > 0)
-	filenames = strcat (filenames, " ",
-			    sprintf (fullfile (src, "%s "), oct.name));
-      endif
-      if (length (mex) > 0)
-	filenames = strcat (filenames, " ",
-			    sprintf (fullfile (src, "%s "), mex.name));
-      endif
-      filenames = split_by (filenames, " ");
+
+      filenames = cellfun (@(x) fullfile (src, x),
+			   {m.name, oct.name, mex.name},
+			   "UniformOutput", false);
     endif
 
     ## Split into architecture dependent and independent files