Assume we have files "packages" "macros" "classes" "methods" "functions" and we want the following dependencies:
1. In order to compile or load any of the other files the file "packages.fasl" must be loaded.
2. In order to compile or load "methods" the file "classes.fasl" must be loaded.
3. The file "macros" contains macros used in "methods" and "functions" and hence "macros.fasl" must be loaded before any of these 2 files is compiled or loaded. Furthermore when "macros" is changed also "methods" and "functions" have to be recompiled even if they are unchanged.
4. There shall be no more dependencies, i.e. when a file different from "macros" is changed, only this file shall be recompiled.
With the Symbolics System Construction Tool (SCT) one would use (:USES-DEFINITIONS-FROM macros) for methods and functions and (:IN-ORDER-TO (:COMPILE :LOAD) (:LOAD packages ...)) for the other dependencies.
(asdf:defsystem :test1 :description "Test Dependency Processing" :components (
(:file "packages")
(:file "macros" :in-order-to ((asdf:compile-op (asdf:load-op "packages")) (asdf:load-op (asdf:load-op "packages"))))
(:file "classes" :in-order-to ((asdf:compile-op (asdf:load-op "packages")) (asdf:load-op (asdf:load-op "packages"))))
(:file "methods" :depends-on ("macros") :in-order-to ((asdf:compile-op (asdf:load-op "packages" "classes")) (asdf:load-op (asdf:load-op "packages" "classes"))))
(:file "functions" :depends-on ("macros") :in-order-to ((asdf:compile-op (asdf:load-op "packages")) (asdf:load-op (asdf:load-op "packages"))))
))
Unfortunately this does not work. All of the ASDF dependencies :DEPENDS-ON and :IN-ORDER-TO seem to behave like the SCT :USES-DEFINITIONS-FROM.
For example when "classes" is changed it will recompile "methods" too. Is there anything in ASDF that provides the functionality of the SCT :IN-ORDER-TO ?