changeset 5812:653405a3af98

[project @ 2006-05-11 17:43:42 by jwe]
author jwe
date Thu, 11 May 2006 17:43:42 +0000
parents 2ece6d7c7b5d
children dfef2f909f34
files scripts/ChangeLog scripts/Makefile.in scripts/path/genpath.m
diffstat 3 files changed, 2 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -2,8 +2,7 @@
 
 	* pkg/Makefile.in: New file.
 	* configure.in (AC_CONFIG_FILES): Add pkg/Makefile to the list.
-
-	* path/genpath.m: New file.
+	* Makefile.in (SUBDIRS): Add pkg to the list.
 
 2006-05-10  John W. Eaton  <jwe@octave.org>
 
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -30,7 +30,7 @@
 	skip-autoheader DOCSTRINGS
 
 SUBDIRS = audio control deprecated elfun finance general image io \
-	linear-algebra miscellaneous optimization path plot polynomial \
+	linear-algebra miscellaneous optimization path pkg plot polynomial \
 	quaternion set signal sparse specfun special-matrix startup \
 	statistics strings testfun time
 
deleted file mode 100644
--- a/scripts/path/genpath.m
+++ /dev/null
@@ -1,60 +0,0 @@
-## Copyright (C) 2006 John W. Eaton
-##
-## This file is part of Octave.
-##
-## Octave is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, write to the Free
-## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301, USA.
-
-## -*- texinfo -*-
-## @deftypefn {Built-in Function} {} genpath (@var{dir})
-## Return a path constructed from @var{dir} and all its subdiretories.
-## @end deftypefn
-
-function retval = genpath (dirname)
-
-  if (nargin == 1)
-    s = stat (dirname);
-    if (S_ISDIR (s.mode))
-      lst = __genpath__ (dirname);
-      lst{2,:} = pathsep ();
-      lst{2,end} = "";
-      retval = strcat (lst{:});
-    else
-      retval = "";
-    endif
-  else
-    print_usage ("genpath");
-  endif
-
-endfunction
-
-function retval = __genpath__ (dirname)
-  
-  retval = {dirname};
-
-  s = dir (dirname);
-  n = length (s);
-  for i = 1:n
-    elt = s(i);
-    nm = elt.name;
-    if (elt.isdir && ! (strcmp (nm, ".") || strcmp (nm, "..")))
-      ## FIXME -- Octave bug: recursion fails here if the __genpath__
-      ## call is moved inside the [].
-      tmp = __genpath__ (fullfile (dirname, nm));
-      retval = [retval, tmp];
-    endif
-  endfor
-
-endfunction