X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=clsql-mysql.asd;h=9cb9739f6cf69c5610791f3491673d28fa88e75a;hp=41a661c5fe3ee9490e74a9993cb32a0d5dc87aee;hb=c4ffac239e4910bff542dadf3212ad95803af64e;hpb=e481460e74844407bc700259e9d0c3a666f4d26b diff --git a/clsql-mysql.asd b/clsql-mysql.asd index 41a661c..9cb9739 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) @@ -62,6 +75,7 @@ :description "Common Lisp SQL MySQL Driver" :long-description "cl-sql-mysql package provides a database driver to the MySQL database system." + :depends-on (uffi clsql-base clsql-uffi) :components ((:module :db-mysql :components @@ -70,6 +84,4 @@ (:file "mysql-loader" :depends-on ("mysql-package" "mysql")) (: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)) + (:file "mysql-sql" :depends-on ("mysql-api"))))))