Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!FRLRI61.BITNET!mvm From: mvm@FRLRI61.BITNET Newsgroups: comp.sys.ti.explorer Subject: defsystem Message-ID: <8911291313.AA04079@lri.lri.fr> Date: 29 Nov 89 13:13:04 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 67 (defsystem main-system (:component-systems system.1 system.2 ... system.n-1 system.n)) I would like to have some dependencies between my component systems. That is, I would like to have system.1 compiled and loaded before system.2 gets compiled etc. when doing a (make-system 'main-system :compile) and system.1 loaded before system.2 etc when doing a (make-system 'main-system). I have spent the morning trying to achieve this and failed to find a simple answer for the following reasons: - Switching the order of the component systems does not work because (make-system main-system :compile) and (make-system main-system) seem to compile and load the files of the component systems in a different order. The compilation is first done on systemn when executing (make-system 'main-system :compile) while the loading is first done on system1 when executing (make-system 'main-system). - Using a (require system.n-1) in the defsystem of system.n does not work because when doing a (make-system 'main-system :compile), system.n-1 is simply loaded and not compiled and loaded when the require is executed. - Trying to place make-system in the individual defsystems does not achieve good results because all the variables documented in the lisp reference manual in section 23.8 are always nil (i.e. sys:*top-level-transformations* is nil while it should be, according to the documentation, bound to the list of transformation type that are to be processed. Note that I even tried to bind my own system-special-variable using sys:define-make-system-variable but unfortunately failed to access the value of the &rest argument keywords to make-system. I supposed it was compiled away and even trying to recuparate its value with (eh:rest-arg-value current-stack-group (eh:sg-inhermost-frame current-stack-group)) to set the value of this special variable failed. The only way I managed to achieve this behavior was to define depencies such as : (defsystem system.n (:module main) (:compile-load-init main ((system.n-1 module1) (system.n-1 module2) .... (system.1 module1) (system.1 module2) ...)) (:fasload (system.n-1 module1) (system.n-1 module2) etc.... Note that is a real pain, because you have to list all the submodules of the all the individual systems and maintain that list updated when adding new modules to the individual subsystems. Thus it would be nice if either: - defsystem would execute (and finish executing) transformations on the component systems in a consistent order (may I suggest left to right?...) - the (require system.x) function would perform the same transformation as the main call to make-system when system.x is not in *modules* - the system maintained variables documented in section 23.6 would be bound to what they should (bug fix) - one could specify the name of a system as a dependency which would result in having the system made with the same transformations as the current call to make-system constraints : I want this to work under release 5. Does anyone have a suggestion (did I miss something in the doc?) or a patch?