chiark / gitweb /
Binding of dynamic variables during perform
authorespen <espen>
Wed, 2 Jan 2008 15:35:32 +0000 (15:35 +0000)
committerespen <espen>
Wed, 2 Jan 2008 15:35:32 +0000 (15:35 +0000)
tools/asdf-extensions.lisp

index 5b6870c0bdef9b1b9294872da664c648ae2982b1..94da8c7b3afaed5228ec04322ed9a4d33809f1c2 100644 (file)
@@ -1,6 +1,6 @@
 (in-package :asdf)
 
 (in-package :asdf)
 
-(export '*dso-extension*)
+(export '(*dso-extension* *operation* *system* *component*))
 
 (defparameter *dso-extension* 
  #-(or darwin win32)"so" #+darwin"dylib" #+win32"dll")
 
 (defparameter *dso-extension* 
  #-(or darwin win32)"so" #+darwin"dylib" #+win32"dll")
@@ -169,3 +169,16 @@ (defmethod operation-done-p ((o load-op) (lib library))
 
 (defmethod operation-done-p ((o operation) (lib library))
   t)
 
 (defmethod operation-done-p ((o operation) (lib library))
   t)
+
+
+;;; Binding of dynamic variables during perform
+
+(defvar *operation* nil)
+(defvar *system* nil)
+(defvar *component* nil)
+
+(defmethod perform :around ((operation operation) (c component))
+  (let ((*operation* operation)
+       (*component* c)
+       (*system* (component-system c)))
+    (call-next-method)))