Maxima 5.18.0 release



On Mon, Apr 6, 2009 at 11:48 PM, Raymond Toy <raymond.toy at stericsson.com> wrote:
> Andrej Vodopivec wrote:
>> I have uploaded a Windows binary.
>>
>> There are problems with lapack and other packages which use defsystem
>> to load. I think it is because gcl does not have a working
>> ensure-directory-exist. Lapack worked in previous versions though.
>>
>>
> Right. ?gcl doesn't have ensure-directories-exist. ?On Unix systems, I
> hacked it by running mkdir -p. ?I don't know the equivalent for
> Windows. ?If you know, then perhaps we can put in an equivalent hack.

OK, this version seems to work on windows too:

(defun ensure-directories-exist (pathspec &key verbose)
  (declare (ignore verbose))
  ;; A very gross implementation of ensure-directories-exist.  Just
  ;; call /bin/mkdir with our desired path.
  (let* ((dir (make-pathname :host (pathname-host pathspec)
			     :directory (pathname-directory pathspec)))
	 (cmd (if (member :win32 *features*)
		  (format nil "mkdir \"~a\""
			  (coerce (subst #\\ #\/ (coerce (namestring dir) 'list)) 'string))
		  (format nil "/bin/mkdir -p ~S" (namestring dir)))))
    (unless (directory dir)
      (lisp:system cmd))
    ;; The second return value is supposed to be T if directories were
    ;; created.  I don't know how to tell that, so we just return T.
    ;; (Would NIL be better?)
    (values pathspec t)))

Unless there are objections I will commit it to the release branch.

Andrej