X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=clsql-mysql.asd;h=88abbada6ba7a286333695c5720cb3c2ab360e83;hb=8b42ade98431d9089422974c26d7ec593173d062;hp=815709e6a20773e19789990347bb17e3019b627b;hpb=bf8d709a2b29f30ceaa6a48b842b4b16a8c99b13;p=clsql.git diff --git a/clsql-mysql.asd b/clsql-mysql.asd index 815709e..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) @@ -68,7 +81,8 @@ ((:clsql-mysql-source-file "mysql") (:file "mysql-package") (:file "mysql-loader" :depends-on ("mysql-package" "mysql")) - (:file "mysql-api" :depends-on ("mysql-loader")) + (:file "mysql-client-info" :depends-on ("mysql-loader")) + (:file "mysql-api" :depends-on ("mysql-client-info")) (:file "mysql-sql" :depends-on ("mysql-api")) (:file "mysql-usql" :depends-on ("mysql-sql"))))) :depends-on (:uffi :clsql-base :clsql-uffi))