From 4f48d771ad17d7e753382fe8f551e7a9ca9e7b53 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 13 May 2002 22:05:21 +0000 Subject: [PATCH] r2033: move initialize code for better .system compilation --- clsql-aodbc.system | 7 ++----- clsql-mysql.system | 12 ++++-------- clsql-postgresql-socket.system | 7 ++----- clsql-postgresql.system | 8 ++------ interfaces/aodbc/aodbc-sql.cl | 4 +++- interfaces/mysql/mysql-loader.cl | 8 +++++--- .../postgresql-socket/postgresql-socket-sql.cl | 5 ++++- interfaces/postgresql/postgresql-loader.cl | 5 ++++- 8 files changed, 26 insertions(+), 30 deletions(-) diff --git a/clsql-aodbc.system b/clsql-aodbc.system index 985a7ca..c6397d9 100644 --- a/clsql-aodbc.system +++ b/clsql-aodbc.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-aodbc.system,v 1.3 2002/04/01 05:27:54 kevin Exp $ +;;;; $Id: clsql-aodbc.system,v 1.4 2002/05/13 22:05:20 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -25,9 +25,6 @@ :binary-pathname "CLSQL:interfaces;aodbc;bin;" :components ((:file "aodbc-package") (:file "aodbc-sql" :depends-on ("aodbc-package"))) - :depends-on (:clsql) - :finally-do - (when (clsql-sys:database-type-library-loaded :aodbc) - (clsql-sys:initialize-database-type :database-type :aodbc))) + :depends-on (:clsql)) diff --git a/clsql-mysql.system b/clsql-mysql.system index 2a3f9f3..bdf5aa6 100644 --- a/clsql-mysql.system +++ b/clsql-mysql.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-mysql.system,v 1.8 2002/05/13 21:50:52 kevin Exp $ +;;;; $Id: clsql-mysql.system,v 1.9 2002/05/13 22:05:20 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -18,7 +18,7 @@ (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) -(in-package :clsql-sys) +(in-package :cl-user) ;;; System definition @@ -31,12 +31,8 @@ (:file "mysql-api" :depends-on ("mysql-loader")) (:file "mysql-sql" :depends-on ("mysql-api")) (:file "mysql-usql" :depends-on ("mysql-sql"))) - :depends-on (:uffi :clsql-base :clsql-uffi) - :finally-do - (when (clsql-sys:database-type-library-loaded :mysql) - (clsql-sys:initialize-database-type :database-type :mysql) - (setq clsql:*default-database-type* :mysql) - (pushnew :mysql cl:*features*))) + :depends-on (:uffi :clsql-base :clsql-uffi)) + diff --git a/clsql-postgresql-socket.system b/clsql-postgresql-socket.system index 197b289..aa35889 100644 --- a/clsql-postgresql-socket.system +++ b/clsql-postgresql-socket.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-postgresql-socket.system,v 1.6 2002/05/13 00:45:10 kevin Exp $ +;;;; $Id: clsql-postgresql-socket.system,v 1.7 2002/05/13 22:05:20 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -30,7 +30,4 @@ :depends-on ("postgresql-socket-package")) (:file "postgresql-socket-sql" :depends-on ("postgresql-socket-api"))) - :depends-on (:clsql-base :uffi) - :finally-do - (when (clsql-sys:database-type-library-loaded :postgresql-socket) - (clsql-sys:initialize-database-type :database-type :postgresql-socket))) + :depends-on (:clsql-base :uffi)) diff --git a/clsql-postgresql.system b/clsql-postgresql.system index d84a102..13c840d 100644 --- a/clsql-postgresql.system +++ b/clsql-postgresql.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql-postgresql.system,v 1.6 2002/05/13 00:45:10 kevin Exp $ +;;;; $Id: clsql-postgresql.system,v 1.7 2002/05/13 22:05:20 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -29,9 +29,5 @@ (:file "postgresql-api" :depends-on ("postgresql-loader")) (:file "postgresql-sql" :depends-on ("postgresql-api")) (:file "postgresql-usql" :depends-on ("postgresql-sql"))) - :depends-on (:uffi :clsql-base :clsql-uffi) - :finally-do - (when (clsql-sys:database-type-library-loaded :postgresql) - (clsql-sys:initialize-database-type :database-type :postgresql) - (pushnew :postgresql cl:*features*))) + :depends-on (:uffi :clsql-base :clsql-uffi)) diff --git a/interfaces/aodbc/aodbc-sql.cl b/interfaces/aodbc/aodbc-sql.cl index 9cc69ec..e493918 100644 --- a/interfaces/aodbc/aodbc-sql.cl +++ b/interfaces/aodbc/aodbc-sql.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: aodbc-sql.cl,v 1.9 2002/05/13 16:41:22 kevin Exp $ +;;;; $Id: aodbc-sql.cl,v 1.10 2002/05/13 22:05:21 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -146,3 +146,5 @@ list)))) +(when (clsql-sys:database-type-library-loaded :aodbc) + (clsql-sys:initialize-database-type :database-type :aodbc)) diff --git a/interfaces/mysql/mysql-loader.cl b/interfaces/mysql/mysql-loader.cl index 65e06a1..7434670 100644 --- a/interfaces/mysql/mysql-loader.cl +++ b/interfaces/mysql/mysql-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: mysql-loader.cl,v 1.7 2002/05/13 21:50:52 kevin Exp $ +;;;; $Id: mysql-loader.cl,v 1.8 2002/05/13 22:05:21 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -89,5 +89,7 @@ set to the right path before compiling or loading the system.") (clsql-sys:database-type-load-foreign :mysql) - - +(when (clsql-sys:database-type-library-loaded :mysql) + (clsql-sys:initialize-database-type :database-type :mysql) + (setq clsql:*default-database-type* :mysql) + (pushnew :mysql cl:*features*)) diff --git a/interfaces/postgresql-socket/postgresql-socket-sql.cl b/interfaces/postgresql-socket/postgresql-socket-sql.cl index 777a095..6c517f1 100644 --- a/interfaces/postgresql-socket/postgresql-socket-sql.cl +++ b/interfaces/postgresql-socket/postgresql-socket-sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-socket-sql.cl,v 1.11 2002/04/27 20:58:11 kevin Exp $ +;;;; $Id: postgresql-socket-sql.cl,v 1.12 2002/05/13 22:05:21 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -304,3 +304,6 @@ doesn't depend on UFFI." (prog1 nil (setf (postgresql-socket-result-set-done result-set) t) (wait-for-query-results (database-connection database))))))) + +(when (clsql-sys:database-type-library-loaded :postgresql-socket) + (clsql-sys:initialize-database-type :database-type :postgresql-socket)) diff --git a/interfaces/postgresql/postgresql-loader.cl b/interfaces/postgresql/postgresql-loader.cl index 46e8408..30cff4f 100644 --- a/interfaces/postgresql/postgresql-loader.cl +++ b/interfaces/postgresql/postgresql-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-loader.cl,v 1.6 2002/04/08 01:22:02 kevin Exp $ +;;;; $Id: postgresql-loader.cl,v 1.7 2002/05/13 22:05:21 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -49,3 +49,6 @@ set to the right path before compiling or loading the system.") (setq *postgresql-library-loaded* t))) (clsql-sys:database-type-load-foreign :postgresql) +(when (clsql-sys:database-type-library-loaded :postgresql) + (clsql-sys:initialize-database-type :database-type :postgresql) + (pushnew :postgresql cl:*features*)) -- 2.34.1