Load behaviour on Maxima 5.18.0 and above using ecl



Matthew Gwynne wrote:
>
> This gives:
>
> (%i1) :lisp (directory (pathname (concatenate 'string *maxima-sharedir* "/")))
>
> (/home/aeternus/Work/OKlibrary/OKlibTest/maxima-5.18.1/install/share/maxima/5.18.1/share/)
>
>   
Ok.  Can you try the following replacement for share-subdirs-list?

If it works, I don't need to see any output.  If it doesn't, can you
send the first few lines showing share-root, x, dir, and enough?

Thanks,


Ray

(defun share-subdirs-list ()
  ;; This doesn't work yet on windows.  Give up in that case and use
  ;; the default list.
  (if (string= *autoconf-win32* "true")
      (default-share-subdirs-list)
      (let* ((share-root (first (directory (pathname (concatenate
'string *maxima-sharedir* "/")))))
         (dir-list (directory (merge-pathnames (make-pathname :directory
'(:relative :wild-inferiors))
                           share-root))))
    ;; dir-list contains all of the directories.  Remove stuff we
    ;; don't want like CVS directories.  Anything else?
    (setf dir-list (delete-if #'(lambda (x)
                      ;; Remove CVS directories
                      (or (equal x share-root)
                      (equal "CVS" (car (last (pathname-directory x))))))
                  dir-list))
    ;; Now just want the part after the *maxima-sharedir*, and we want
    ;; strings.
    (format t "share-root = ~A~%" share-root)
    (setf dir-list
          (mapcar #'(lambda (x)
              (let ((dir (make-pathname :directory (butlast
(pathname-directory x))
                            :name (car (last (pathname-directory x))))))
                (format t "x = ~A~%" x)
                (format t "dir = ~A~%" dir)
                (format t "enough = ~A~%" (enough-namestring dir
share-root))
                (enough-namestring dir share-root)))
              dir-list))
    ;; Sort in alphabetical order
    (sort dir-list #'string-lessp))))