r2246: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 26 Jul 2002 03:21:13 +0000 (03:21 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 26 Jul 2002 03:21:13 +0000 (03:21 +0000)
ChangeLog
debian/rules
set-cl-library.cl [new file with mode: 0644]
set-logical.cl
uffi.debian.system [deleted file]
uffi.system

index 3e99d1cb783d797374312dc70b22b5a79cbebe1e..5c647326df52972a05bb34f6b76691120714e5b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-25 Kevin Rosenberg (kevin@rosenberg.net)
+
+       * Rework handling of logical pathnames.
+       
 2002-06-28 Kevin Rosenberg (kevin@rosenberg.net)
 
        * Added size-of-foreign-type function.
index 81dd430948ccf07b79e91ff9265e1f4d87bd2de4..1b29e9b48c575fe2bb93477dde64023893541c9b 100755 (executable)
@@ -1,11 +1,5 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
 
-# Uncomment this to turn on verbose mode.
-# export DH_VERBOSE=1
-
-# This is the debhelper compatibility version to use.
 export DH_COMPAT=4
 
 pkg    := uffi
@@ -58,7 +52,8 @@ install: build
        dh_installdirs -p $(debpkg) $(doc-dir) $(lispfiles)/mcl 
 
        # Add here commands to install the package into debian/uffi.
-       dh_install "src/*.cl" "*.system" $(lispfiles)
+       dh_install "uffi.system" $(clc-systems)
+       dh_install "src/*.cl" $(lispfiles)
        dh_install "src/mcl/*.cl" $(lispfiles)/mcl
 
        rm -rf doc/html
diff --git a/set-cl-library.cl b/set-cl-library.cl
new file mode 100644 (file)
index 0000000..228080c
--- /dev/null
@@ -0,0 +1,43 @@
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          set-cl-library.cl
+;;;; Purpose:       Sets CL-LIBRARY logical host name if it does not exist
+;;;; Programmer:    Kevin M. Rosenberg
+;;;; Date Started:  May 2002
+;;;;
+;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;;
+;;;; CLSQL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+;;;; *************************************************************************
+
+;; Set logical pathname CL-LIBRARY to be directory above *load-truename*
+;; This mirrors the expectation of Common Lisp Controller's pathnames
+
+(handler-case
+    (logical-pathname-translations "cl-library")
+  (error ()
+        (let* ((dir (pathname-directory *load-truename*))
+               (parent-dir (subseq dir 0 (1- (length dir)))))
+          (load (make-pathname :name "set-logical" :type "cl"
+                               :defaults *load-truename*))
+          (set-logical-host-for-pathname 
+           "cl-library" 
+           (make-pathname :host (pathname-host *load-truename*)
+                          :device (pathname-device *load-truename*)
+                          :directory parent-dir))))
+  (:no-error (translation)
+            ;; Make sure that cl-library points to this installation
+            (let* ((dir (pathname-directory *load-truename*))
+                   (base-dir (car (last dir)))
+                   (logical-dir (translate-logical-pathname 
+                                 (concatenate 'string
+                                              "cl-library:" base-dir ";"))))
+              (unless (equalp dir (pathname-directory logical-dir))
+                (let ((*print-circle* nil))
+                  (error "cl-library:~A; directory ~S does not equal *load-truename*'s directory ~S"
+                         base-dir (cdr dir)
+                         (cdr (pathname-directory logical-dir))))))))
index 4990e7dd5d6f58fccca36b5533f27f56a864b2a5..cc153dd8c931d42931e2c85d79864b968fa76ff5 100644 (file)
@@ -1,4 +1,4 @@
-;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
@@ -7,9 +7,9 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
-;;;; UFFI users are granted the rights to distribute and use this software
+;;;; CLSQL users are granted the rights to distribute and use this software
 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
     #+clisp "clisp"
     #+cmu "cmucl"
     #+sbcl "sbcl"
-    #+cormanlisp "corman"
+    #+corman "corman"
     #+mcl "mcl"
     #+openmcl "openmcl"
-    #-(or allegro lispworks clisp cmu sbcl cormanlisp mcl openmcl) "unknown")
+    #-(or allegro lispworks clisp cmu sbcl corman mcl openmcl) "unknown")
 
 (defun set-logical-host-for-pathname (host base-pathname)
   (setf (logical-pathname-translations host)
                :host (pathname-host base-pathname)
                :device (pathname-device base-pathname)
                :directory (pathname-directory base-pathname)))
-      ("**;bin;*.*.*" ,(merge-pathnames
-                       (make-pathname 
-                        :name :wild
-                        :type :wild
-                        :directory 
-                        (append '(:relative :wild-inferiors
-                                  ".bin" #.+set-logical-compiler-name+)))
-                       base-pathname))
-      ("**;*.*.*" ,(merge-pathnames
+      ("**;*.cl.*" ,(merge-pathnames
                    (make-pathname
                     :name :wild
                     :type :wild
                     :directory '(:relative :wild-inferiors))
-                   base-pathname))))
-  )
-
-(export 'set-logical-host-for-pathname)
+                   base-pathname))
+      ("**;*.lisp.*" ,(merge-pathnames
+                   (make-pathname
+                    :name :wild
+                    :type :wild
+                    :directory '(:relative :wild-inferiors))
+                   base-pathname))
+      ("**;*.c.*" ,(merge-pathnames
+                   (make-pathname
+                    :name :wild
+                    :type :wild
+                    :directory '(:relative :wild-inferiors))
+                   base-pathname))
+      ("**;*.h.*" ,(merge-pathnames
+                   (make-pathname
+                    :name :wild
+                    :type :wild
+                    :directory '(:relative :wild-inferiors))
+                   base-pathname))
+      ("**;bin;*.*.*" ,(merge-pathnames
+                   (make-pathname 
+                    :name :wild
+                    :type :wild
+                    :directory 
+                    (append '(:relative :wild-inferiors
+                                        ".bin" #.+set-logical-compiler-name+)))
+                   base-pathname)))
+      ;; default is to place in .bin/<compiler> directory
+      ("**;*.*.*" ,(merge-pathnames
+                   (make-pathname 
+                    :name :wild
+                    :type :wild
+                    :directory 
+                    (append '(:relative :wild-inferiors
+                                        ".bin" #.+set-logical-compiler-name+)))
+                   base-pathname))
+      ))
diff --git a/uffi.debian.system b/uffi.debian.system
deleted file mode 100644 (file)
index 3e86b7e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
-;;;; *************************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name:          uffi.system
-;;;; Purpose:       Defsystem-3/4 system definition file for UFFI package
-;;;; Programmer:    Kevin M. Rosenberg
-;;;; Date Started:  Feb 2002
-;;;;
-;;;; $Id: uffi.debian.system,v 1.1 2002/05/03 03:53:10 kevin Exp $
-;;;;
-;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
-;;;;
-;;;; UFFI users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the Lisp Lesser GNU Public License
-;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
-;;;; *************************************************************************
-
-(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :mk)
-
-
-;;; UFFI system definition
-
-(mk:defsystem :uffi
-    :source-pathname #-mcl "cl-library:uffi;"
-                     #+mcl "cl-library:uffi;mcl;"
-    :source-extension "cl"
-    :components 
-    ((:file "package")
-     (:file "primitives" :depends-on ("package"))
-     (:file "strings" :depends-on ("primitives"))
-     (:file "objects" :depends-on ("primitives"))
-     (:file "aggregates" :depends-on ("primitives"))
-     (:file "functions" :depends-on ("primitives"))
-     (:file "libraries" :depends-on ("package")))
-    :finally-do
-    (pushnew :uffi cl:*features*))
-
index 5ccaba482bfdad0eea7e62040279ac3be9f82d76..545fd4760a0ee2e96eacda9fbae4d3dfde25db92 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: uffi.system,v 1.14 2002/04/09 20:06:18 kevin Exp $
+;;;; $Id: uffi.system,v 1.15 2002/07/26 03:18:27 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;; *************************************************************************
 
 (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :cl-user)
+(in-package :make)
 
-(load (make-pathname :name "set-logical" :type "cl"
-                    :defaults *load-truename*))
-
-(set-logical-host-for-pathname "UFFI" *load-truename*)
-(set-logical-host-for-pathname "UFFI-SRC" 
-                              (merge-pathnames
-                               (make-pathname
-                                :directory
-                                #+(or cmu allegro lispworks)
-                                '(:relative "src")
-                                #+mcl
-                                '(:relative "src" "mcl")
-                                #+cormanlisp
-                                '(:relative "src" "corman")
-                                )
-                               *load-truename*))
+;; For use with non-Debian installations
+(let ((helper-pathname (make-pathname :name "set-cl-library" :type "cl"
+                                     :defaults *load-truename*)))
+  (when (probe-file helper-pathname)
+      (load helper-pathname)))
 
 ;;; UFFI system definition
 
-(mk:defsystem :uffi
-    :source-pathname "UFFI-SRC:"
+(make:defsystem :uffi
+    :source-pathname #-mcl "cl-library:uffi;"
+                     #+mcl "cl-library:uffi;mcl;"
     :source-extension "cl"
-    :binary-pathname "UFFI-SRC:bin;"
     :components 
     ((:file "package")
      (:file "primitives" :depends-on ("package"))