Hi,
If I have an ASDF system that :depends-on various other ones _and_ some other library that does not have and .asd file (eg it is a standalone .lisp file), what is the standard way of loading the latter? I am looking for something that eg automates manually executing
(load (compile-file "/path/foo.lisp"))
and how to incorporate this into a defsystem.
Thanks,
Tamas
On Wed, 2009-10-28 at 15:00 +0100, Tamas Papp wrote:
Hi,
If I have an ASDF system that :depends-on various other ones _and_ some other library that does not have and .asd file (eg it is a standalone .lisp file), what is the standard way of loading the latter? I am looking for something that eg automates manually executing
(load (compile-file "/path/foo.lisp"))
and how to incorporate this into a defsystem.
Caveat lector: the following is untested.
(defsystem :foo :depends-on (:asdf-system-1 :asdf-system-2) :in-order-to ((compile-op () (compile-file "/path/foo.lisp"))) :in-order-to ((load-op () (load "/path/foo"))))
The recommended way is to write a trivial .asd file for said library.
The other way is to load this library first thing in your build as part of your Lisp setup, the same that loads asdf.lisp itself and configures your central registry and defines your optimization settings.
Speaking of optimization settings, does anyone see any problem with putting in ASDF something that deterministically (re)sets the optimization setting before each and any perform operation? Otherwise, optimization settings will vary wildly depending on what implementation you use, which files get recompiled, etc.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Every country has an army, either its own or a foreign one.
2009/10/28 Tamas Papp tkpapp@gmail.com:
Hi,
If I have an ASDF system that :depends-on various other ones _and_ some other library that does not have and .asd file (eg it is a standalone .lisp file), what is the standard way of loading the latter? I am looking for something that eg automates manually executing
(load (compile-file "/path/foo.lisp"))
and how to incorporate this into a defsystem.
Speaking of optimization settings, does anyone see any problem with putting in ASDF something that deterministically (re)sets the optimization setting before each and any perform operation? Otherwise, optimization settings will vary wildly depending on what implementation you use, which files get recompiled, etc.
I think we should do this; it's on my list.
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter
2009/10/28 Gary King gwking@metabang.com:
Speaking of optimization settings, does anyone see any problem with putting in ASDF something that deterministically (re)sets the optimization setting before each and any perform operation? Otherwise, optimization settings will vary wildly depending on what implementation you use, which files get recompiled, etc.
I think we should do this; it's on my list.
Here's a skeleton of implementation (don't forget a defgeneric).
(defmethod perform :before (operation component) (proclaim-optimization-settings-for operation component))
(defmethod proclaim-optimization-settings-for (op component) (declare (ignorable op component)) (proclaim `(optimize ,@*default-optimization-settings*)))
Unrelatedly, a slight refactoring patch is attached. It would makes it easier for ADG and other ASDF add-ons to reuse in a future-proof way the ASDF pathname merging algorithm.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Anyone who goes to a psychiatrist ought to have his head examined. -- Samuel Goldwyn