From 334e4fc54c9f7cbf3a3db584102d6108f9638ebe Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Fri, 26 Jul 2002 03:21:13 +0000 Subject: [PATCH] r2246: *** empty log message *** --- ChangeLog | 4 +++ debian/rules | 9 ++----- set-cl-library.cl | 43 ++++++++++++++++++++++++++++++++ set-logical.cl | 61 ++++++++++++++++++++++++++++++++-------------- uffi.debian.system | 39 ----------------------------- uffi.system | 31 ++++++++--------------- 6 files changed, 102 insertions(+), 85 deletions(-) create mode 100644 set-cl-library.cl delete mode 100644 uffi.debian.system diff --git a/ChangeLog b/ChangeLog index 3e99d1c..5c64732 100644 --- 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. diff --git a/debian/rules b/debian/rules index 81dd430..1b29e9b 100755 --- a/debian/rules +++ b/debian/rules @@ -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 index 0000000..228080c --- /dev/null +++ b/set-cl-library.cl @@ -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)))))))) diff --git a/set-logical.cl b/set-logical.cl index 4990e7d..cc153dd 100644 --- a/set-logical.cl +++ b/set-logical.cl @@ -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. ;;;; ************************************************************************* @@ -35,10 +35,10 @@ #+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) @@ -46,20 +46,45 @@ :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/ 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 index 3e86b7e..0000000 --- a/uffi.debian.system +++ /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*)) - diff --git a/uffi.system b/uffi.system index 5ccaba4..545fd47 100644 --- a/uffi.system +++ b/uffi.system @@ -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 ;;;; @@ -17,31 +17,20 @@ ;;;; ************************************************************************* (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")) -- 2.34.1