; From modified file DJ: L.SYS2; MAKSYS.LISP#211 at 11-Aug-88 01:45:24
#8R SYSTEM-INTERNALS#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "SYSTEM-INTERNALS")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: SYS2; MAKSYS  "

;;; Patch-file only
(defun fixup-existing-systems ()
  (loop for sys in *systems-list*
	do
	(typecase sys
	  (system
	   (loop for trans in (system-transformations sys)
		 for type = (transformation-transformation-type trans)
		 for ntype = (assoc (car type) *transformation-type-alist*)
		 for deps = (transformation-dependencies trans)
		 do
		 (setf (transformation-dependencies trans)
		       (loop for dtype in deps
			     for ndtype = (typecase dtype
					    (list (assoc (car dtype) *transformation-type-alist*))
					    (otherwise dtype))
			     do (unless ndtype
				  (cerror "Do the rest of the transformations."
					  "Missing transformation type: ~S." (car type))
				  (setq ndtype dtype))
			     collect ndtype))
		 (if (not ntype)
		     (cerror "Do the rest of the transformations."
			     "Missing transformation type: ~S." (car type))
		   (setf (transformation-transformation-type trans) ntype)))))))

(fixup-existing-systems)
))