AFAIK, gcl doesn't have ENSURE-DIRECTORIES-EXIST, and that is one of
the sources of trouble. For example, load(affine) files with gcl
because the defsystem wants the compiled files to be in
share/affine/binary-gcl, which normally won't exist.
Here is a possible hack to make defsystem work better. Replace the
existing, non-working ensure-directories-exist in defsystem.lisp with
the following:
#+gcl
(defun ensure-directories-exist (pathspec &key verbose)
;; A very gross implementation of ensure-directories-exist.
(let* ((dir (make-pathname :host (pathname-host pathspec)
:directory (pathname-directory pathspec)))
(cmd (format nil "/bin/mkdir -p ~S" (namestring 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)))
We basically just call out to /bin/mkdir to create all the directories
for us.
I think newer versions of GCL have SYSTEM:MKDIR, which might make
ensure-directories-exist a bit faster, but in my simple tests, the
cost of calling /bin/mkdir is usually swamped by the actually
compilation of the file.
It would be best if GCL implemented this, but until then, this is a
work around. Unless there are objections, I'll check this in soon.
Ray