X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=clsql-mysql.asd;h=fe661dc84972765f4951491e4272db5a09538259;hp=62945386fdacf30519241d7c6cdf3f3ad25db810;hb=5148be446aee32ec705beac3fbba35f499df4fd4;hpb=5c11038381563b1442d966822749bfc12ec0697c diff --git a/clsql-mysql.asd b/clsql-mysql.asd index 6294538..fe661dc 100644 --- a/clsql-mysql.asd +++ b/clsql-mysql.asd @@ -45,25 +45,30 @@ :directory *library-file-dir*))))) (defmethod perform ((o load-op) (c clsql-mysql-source-file)) - nil) ;;; library will be loaded by a loader file + t) (defmethod operation-done-p ((o load-op) (c clsql-mysql-source-file)) - nil) + (and (symbol-function (intern (symbol-name '#:mysql-get-client-info) + (find-package '#:mysql))) + t)) (defmethod perform ((o compile-op) (c clsql-mysql-source-file)) - #-(or win32 mswindows) - (unless (zerop (run-shell-command - "cd ~A; make" - (namestring (make-pathname :name nil - :type nil - :directory *library-file-dir*)))) - (error 'operation-error :component c :operation o))) + (unless (operation-done-p o c) + #-(or win32 mswindows) + (unless (zerop (run-shell-command + #-freebsd "cd ~A; make" + #+freebsd "cd ~A; gmake" + (namestring (make-pathname :name nil + :type nil + :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)))))) + (or (and (probe-file #p"/usr/lib/clsql/mysql.so") t) + (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 @@ -76,13 +81,14 @@ :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) + :depends-on (uffi clsql clsql-uffi) :components ((:module :db-mysql :components - ((:clsql-mysql-source-file "mysql") - (:file "mysql-package") + ((:file "mysql-package") + (:clsql-mysql-source-file "mysql" :depends-on ("mysql-package")) (: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-sql" :depends-on ("mysql-api")) + (:file "mysql-objects" :depends-on ("mysql-sql"))))))