X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=clsql-mysql.asd;h=88abbada6ba7a286333695c5720cb3c2ab360e83;hp=41a661c5fe3ee9490e74a9993cb32a0d5dc87aee;hb=8b42ade98431d9089422974c26d7ec593173d062;hpb=ca30771eca262c156bed4b15176b473031185399 diff --git a/clsql-mysql.asd b/clsql-mysql.asd index 41a661c..88abbad 100644 --- a/clsql-mysql.asd +++ b/clsql-mysql.asd @@ -19,6 +19,10 @@ (defpackage #:clsql-mysql-system (:use #:asdf #:cl)) (in-package #:clsql-mysql-system) +(eval-when (:compile-toplevel :load-toplevel :execute) + #+common-lisp-controller (require 'uffi) + #-common-lisp-controller (asdf:operate 'asdf:load-op 'uffi)) + (defvar *library-file-dir* (append (pathname-directory *load-truename*) (list "db-mysql"))) @@ -43,6 +47,9 @@ (defmethod perform ((o load-op) (c clsql-mysql-source-file)) nil) ;;; library will be loaded by a loader file +(defmethod operation-done-p ((o load-op) (c clsql-mysql-source-file)) + nil) + (defmethod perform ((o compile-op) (c clsql-mysql-source-file)) (unless (zerop (run-shell-command "cd ~A; make" @@ -51,6 +58,12 @@ :directory *library-file-dir*)))) (error 'operation-error :component c :operation o))) +(defmethod operation-done-p ((o compile-op) (c clsql-mysql-source-file)) + (let ((lib (make-pathname :defaults (component-pathname c) + :type (uffi:default-foreign-library-type)))) + (and (probe-file lib) + (> (file-write-date lib) (file-write-date (component-pathname c)))))) + ;;; System definition #+(or allegro lispworks cmu sbcl openmcl mcl scl)