[Ecls-list] ASDF to build FAS libraries

Goffioul Michael goffioul at imec.be
Thu Oct 20 00:45:10 UTC 2005


> This seems really cool. Just a couple hours earlier I was 
> wondering what the
> best way to do something similar was. Is it true that this could build
> shared libs just by changing c::build-fasl to c::build-shared-library?
> That's what I need to do.

Indeed, ASDF provides ways to "configure" the operation. Actually, you
can add any slots to your operation class and assign them in the (operate...)
call. For example:

(defclass build-op (compile-op)
  ((build-type :initarg :build-type :initform :fasl :accessor build-op-type))
)

(defmethod perform ((o build-op) (c system))
  (case (build-op-type o)
    (:dll (c::build-shared-library...))
    (:fasl (c::build-fasl...))
    (:lib (c::build-static-library...))
    ...
  ))

(asdf:operate 'asdf:build-op :system-name :build-type :dll)

If everybody agrees, I'll try to come with a first implementation and commit
to CVS, then we can test it and eventually improve it. There are still things
in my mind that need to be addressed:
1) dependencies on other modules
2) loading order: currently, files are loaded in the order of appearance in the
defsystem call, but I guess it should rely on actual dependencies instead; to
solve this, I was thinking about defining some sort of "record-op" operation that
would make use of ASDF traversal system to know in which order the files should
be collected
3) "install-op" operation that would install the built module in the right
ECL directory. This operation would of course depends on "build-op" operation.

Michael.




More information about the ecl-devel mailing list