+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.
#!/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
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
--- /dev/null
+;;;; -*- 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))))))))
-;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; 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))
+ ))
+++ /dev/null
-;;;; -*- 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*))
-
;;;; 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"))