ASDF support for ECL (or vice versa)

Julian Stecklina <der_julian-S0/[email protected]>
Newsgroups gmane.lisp.ecl.general,gmane.lisp.cclan.general
Message-ID <20050225171907.10c9aa61@localhost>
Hello,

the following patch integrates ASDF into ECLs require/provide mechanism.

Regards,
-- 
Julian Stecklina

-- Common Lisp can do what C, C++, Java, PASCAL, PHP, Perl, (you --
-- name it) can do. Here's how:                                  --
--                                                               --
-- http://www.amazon.com/exec/obidos/ASIN/1590592395             --
ecl.diff (text/plain, 764 B)
? ecl.diff
Index: asdf.lisp
===================================================================
RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
retrieving revision 1.86
diff -u -r1.86 asdf.lisp
--- asdf.lisp	19 Jul 2004 21:18:07 -0000	1.86
+++ asdf.lisp	25 Feb 2005 15:57:58 -0000
@@ -1099,4 +1099,16 @@
   
   (pushnew 'module-provide-asdf sb-ext:*module-provider-functions*))
 
+;; Hook into ECL's require/provide
+#+ecl
+(progn
+  (defun module-provide-asdf (name)
+    (handler-bind ((style-warning #'muffle-warning))
+      (let* ((*verbose-out* (make-broadcast-stream))
+	     (system (asdf:find-system name nil)))
+	(when system
+	  (asdf:operate 'asdf:load-op name)
+	  t))))
+  (pushnew 'module-provide-asdf ext:*module-provider-functions*))
+
 (provide 'asdf)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.