Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!uakari.primate.wisc.edu!caesar.cs.montana.edu!ogccse!ucsd!ucbvax!SUMEX-AIM.STANFORD.EDU!saraiya From: saraiya@SUMEX-AIM.STANFORD.EDU (Nakul P. Saraiya) Newsgroups: comp.sys.ti.explorer Subject: Re: defsystem Message-ID: Date: 29 Nov 89 17:58:39 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 35 I hacked up something similar for Symbolics Release 6 a long while back. This version does not compile subsystems---just loads them---but it should be easy to change do-system-dependencies to use the value of *make-system-keywords* to also compile the subsystems if need be. You may also want to common-lispify the code... nakul ;;; -*- Syntax: Zetalisp; Base: 10; Mode: LISP; Package: SYSTEM-INTERNALS -*- ;;; Modifications to DEFSYSTEM/MAKE-SYSTEM to allow for other systems ;;; that a given system expects to have loaded into the world band ;;; before being loaded or compiled. ;;; Usage: (defsystem foo ... (:depends-on bar baz bax) ...) (defmacro (:depends-on defsystem-macro) (&rest systems) (let ((system-names (loop for system in systems collect (string system))) (*add-transformation-to-system* T)) (putprop (locf (system-plist *system-being-defined*)) system-names :depends-on) (parse-transformation :depends-on nil nil 'true)) nil) (defmacro system-depends-on (system) `(get (locf (system-plist ,system)) ':depends-on)) (add-simple-transformation ':depends-on 'Do-System-Dependencies nil nil '("Make support systems" "Making support systems" "support systems made") T T) (defun do-system-dependencies () (loop for name in (system-depends-on *system-being-made*) do ;; or (apply #'make-system name *make-system-keywords*) (make-system name :silent :nowarn :noconfirm)))