-(defgeneric perform (operation component))
-(defgeneric operation-done-p (operation component))
-(defgeneric explain (operation component))
-(defgeneric output-files (operation component))
-(defgeneric input-files (operation component))
+(define-method-combination standard-asdf-method-combination ()
+ ((around-asdf (around))
+ (around (:around))
+ (before (:before))
+ (primary () :required t)
+ (after (:after)))
+ (flet ((call-methods (methods)
+ (mapcar #'(lambda (method)
+ `(call-method ,method))
+ methods)))
+ (let* ((form (if (or before after (rest primary))
+ `(multiple-value-prog1
+ (progn ,@(call-methods before)
+ (call-method ,(first primary)
+ ,(rest primary)))
+ ,@(call-methods (reverse after)))
+ `(call-method ,(first primary))))
+ (standard-form (if around
+ `(call-method ,(first around)
+ (,@(rest around)
+ (make-method ,form)))
+ form)))
+ (if around-asdf
+ `(call-method ,(first around-asdf)
+ (,@(rest around-asdf) (make-method ,standard-form)))
+ standard-form))))
+
+(defgeneric perform (operation component)
+ (:method-combination standard-asdf-method-combination))
+(defgeneric operation-done-p (operation component)
+ (:method-combination standard-asdf-method-combination))
+(defgeneric explain (operation component)
+ (:method-combination standard-asdf-method-combination))
+(defgeneric output-files (operation component)
+ (:method-combination standard-asdf-method-combination))
+(defgeneric input-files (operation component)
+ (:method-combination standard-asdf-method-combination))