1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: clsql-mysql.asd
6 ;;;; Purpose: ASDF definition file for CLSQL MySQL backend
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Aug 2002
12 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
14 ;;;; CLSQL users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
19 (defpackage #:clsql-mysql-system (:use #:asdf #:cl))
20 (in-package #:clsql-mysql-system)
22 (defvar *library-file-dir* (append (pathname-directory *load-truename*)
25 (defclass clsql-mysql-source-file (c-source-file)
28 (defmethod output-files ((o compile-op) (c clsql-mysql-source-file))
29 (let* ((library-file-type
30 (funcall (intern (symbol-name'#:default-foreign-library-type)
31 (symbol-name '#:uffi))))
32 (found (some #'(lambda (dir)
33 (probe-file (make-pathname :directory dir
34 :name (component-name c)
35 :type library-file-type)))
36 '((:absolute "usr" "lib" "clsql")))))
39 (make-pathname :name (component-name c)
40 :type library-file-type
41 :directory *library-file-dir*)))))
43 (defmethod perform ((o load-op) (c clsql-mysql-source-file))
44 nil) ;;; library will be loaded by a loader file
46 (defmethod perform ((o compile-op) (c clsql-mysql-source-file))
47 (unless (zerop (run-shell-command
49 (namestring (make-pathname :name nil
51 :directory *library-file-dir*))))
52 (error 'operation-error :component c :operation o)))
56 #+(or allegro lispworks cmu sbcl openmcl mcl scl)
57 (defsystem :clsql-mysql
59 :author "Kevin M. Rosenberg <kmr@debian.org>"
60 :maintainer "Kevin M. Rosenberg <kmr@debian.org>"
61 :licence "Lessor Lisp General Public License"
62 :description "Common Lisp SQL MySQL Driver"
63 :long-description "cl-sql-mysql package provides a database driver to the MySQL database system."
68 ((:clsql-mysql-source-file "mysql")
69 (:file "mysql-package")
70 (:file "mysql-loader" :depends-on ("mysql-package" "mysql"))
71 (:file "mysql-client-info" :depends-on ("mysql-loader"))
72 (:file "mysql-api" :depends-on ("mysql-client-info"))
73 (:file "mysql-sql" :depends-on ("mysql-api"))
74 (:file "mysql-usql" :depends-on ("mysql-sql")))))
75 :depends-on (:uffi :clsql-base :clsql-uffi))