maxima, defsystem and CMUCL 2005-01



Raymond Toy  writes:

> I've reverted back to 1.14.  I'm also going to apply the following
> patch, which is the fix in clocc's defsystem for cmucl's pathname
> change.

Not that there is a need to re-revert, but I just checked that only a
small number of work-arounds would be needed to make a current
defsystem work with GCL (probably not in general, but at least for our
purposes).  Here is a patch against a pristine version from clocc
(Emacs tells me CVS-1.88); the first two changes are new, the other
two are from our current version.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- /usr/src/clocc/src/defsystem-3.x/defsystem.lisp	2005-01-18 17:00:38.000000000 +0100
+++ lisp-utils/defsystem.lisp	2005-01-18 17:43:23.099541488 +0100
@@ -2381,7 +2381,7 @@
    (component :reader missing-component-component
               :initarg :component)
    )
-  (:default-initargs :component nil)
+  #-gcl(:default-initargs :component nil)
   (:report (lambda (mmc stream)
 	     (format stream "MK:DEFSYSTEM: missing component ~S for ~S."
                      (missing-component-name mmc)
@@ -2992,10 +2992,10 @@
   (unless (find :source-pathname definition-body)
     (setf definition-body
 	  (list* :source-pathname
-		 '(when *load-pathname*
+		 '(when #-gcl *load-pathname* #+gcl si::*load-pathname*
 		        (make-pathname :name nil
 			               :type nil
-			               :defaults *load-pathname*))
+			               :defaults #-gcl *load-pathname* #+gcl si::*load-pathname*))
 		 definition-body)))
   `(create-component :defsystem ',name ',definition-body nil 0))
 
@@ -3567,9 +3567,9 @@
   (declare #-(or :cltl2 :ansi-cl) (ignore override-compilation-unit))
   (unwind-protect
       ;; Protect the undribble.
-      (#+(or :cltl2 :ansi-cl) with-compilation-unit
-	 #+(or :cltl2 :ansi-cl) (:override override-compilation-unit)
-	 #-(or :cltl2 :ansi-cl) progn
+      (#+(and (or :cltl2 :ansi-cl) (not :gcl)) with-compilation-unit
+	 #+(and (or :cltl2 :ansi-cl) (not :gcl)) (:override override-compilation-unit)
+	 #-(and (or :cltl2 :ansi-cl) (not :gcl)) progn
 	(when *reset-full-pathname-table* (clear-full-pathname-tables))
 	(when dribble (dribble dribble))
 	(when test (setq verbose t))
@@ -4590,6 +4590,8 @@
 	 ;; Ugly, but seems to fix the problem.
 	 (concatenate 'string "./" namestring))))
 
+#+gcl(defun ensure-directories-exist (arg0 &key verbose) ())
+
 (defun compile-file-operation (component force)
   ;; Returns T if the file had to be compiled.
   (let ((must-compile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wolfgang