only perfom when the output is missing

Attila Lendvai attila.lendvai at gmail.com
Wed Apr 14 23:38:34 UTC 2021


FTR, i have managed to solve it with this:

(defclass generate-lisp-op (selfward-operation)
  ((selfward-operation :initform '()))) ; we will specify it in our own
COMPONENT-DEPENDS-ON

(defmethod component-depends-on ((op generate-lisp-op) (c c2ffi-file))
  `((load-op ,(find-system "cffi/c2ffi-generator"))
    ;; Regenerating the spec file is a lot of headache, so we ignore
    ;; the file modification times, and only communicate the
    ;; dependency to ASDF if the spec file is missing.
    ,@(let ((spec-file (input-file op c))) ; TODO is it legal to call
ASDF:INPUT-FILES here?
        (when (or (not (probe-file spec-file))
                  (zerop (with-input-from-file (s spec-file)
                           (file-length s))))
          `((generate-spec-op ,c))))
    ,@(call-next-method)))

the commit:
https://github.com/cffi/cffi/commit/46975c644aeb0a832cd170e953cc8ec3cbdc78df

- attila

PS: sorry for the double send, i have cleaned up my mail settings.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20210415/cb821c13/attachment.html>


More information about the asdf-devel mailing list