X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=clsql-mysql.asd;h=ec4e5efea6c9de6c7c2004dac2989c4817adb585;hb=4661cdbb26de93d072226ab6cd9325c1ca7bb75e;hp=4fcd4eb1a5c6514b3d05df8297155b5dc7406770;hpb=b31836193ceb646fa6e4fd7761dff378a9c67385;p=clsql.git diff --git a/clsql-mysql.asd b/clsql-mysql.asd index 4fcd4eb..ec4e5ef 100644 --- a/clsql-mysql.asd +++ b/clsql-mysql.asd @@ -19,25 +19,23 @@ (defpackage #:clsql-mysql-system (:use #:asdf #:cl)) (in-package #:clsql-mysql-system) -(defvar *asd-file-dir* (pathname-directory *load-truename*)) +(defvar *library-file-dir* (append (pathname-directory *load-truename*) + (list "db-mysql"))) (defclass clsql-mysql-source-file (c-source-file) ()) (defmethod output-files ((o compile-op) (c clsql-mysql-source-file)) - (let ((searched (or - (probe-file #p"/usr/lib/clsql/uffi.so") - (probe-file (make-pathname - :directory *asd-file-dir* - :name "uffi" - :type "so"))))) - (if searched - (list searched) - (list (merge-pathnames - (make-pathname :name (component-name c) - :type "so" - :directory '(:relative "tests")) - (make-pathname :directory *asd-file-dir*)))))) + (let ((found (some #'(lambda (dir) + (probe-file (make-pathname :directory dir + :name (component-name c) + :type "so"))) + '((:absolute "usr" "lib" "clsql"))))) + (list (if found + found + (make-pathname :name (component-name c) + :type "so" + :directory *library-file-dir*))))) (defmethod perform ((o load-op) (c clsql-mysql-source-file)) nil) ;;; library will be loaded by a loader file @@ -45,13 +43,9 @@ (defmethod perform ((o compile-op) (c clsql-mysql-source-file)) (unless (zerop (run-shell-command "cd ~A; make" - (namestring (merge-pathnames - (make-pathname - :name nil - :type nil - :directory '(:relative "uffi")) - (make-pathname - :directory *asd-file-dir*))))) + (namestring (make-pathname :name nil + :type nil + :directory *library-file-dir*)))) (error 'operation-error :component c :operation o))) ;;; System definition