Menu

[a53a15]: / ccpl-setup.lisp  Maximize  Restore  History

Download this file

1 lines (1 with data), 4.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
;;;-*- mode: lisp; package: common-lisp-user -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;File: ccpl:src;ccpl-setup.lisp
;;
;;Copyright c 1990-2011, Peter Lunden / KACOR
;;
;; Creates the cpl package and loads the basic ccpl system
;;
;;Version:
;;
;; 1.0a9
;;
;;History:
;;
;; 2011.12.22 PLu V01.01.00
;; Porting to SBCL on Linux
(eval-when (:compile-toplevel :load-toplevel :execute)
(print 'WTF))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defpackage :ccpl
(:nicknames :cpl)
(:use :common-lisp)
#-SBCL(:import-from :common-lisp-user "*CCPL*")))
(eval-when (:execute)
#+SBCL(defconstant ccpl::+ccpl-home+ (sb-posix:getcwd)))
(unless (find-symbol "*building-ccpl*")
(defvar *building-ccpl* nil))
(defconstant ccpl::+ccpl-version+ '(1 1 0))
(unless (find-symbol "*creation-date*" :ccpl)
(defvar ccpl::*creation-date* nil))
; (namestring #p"Hemma:Prog:Lisp:CCPL:"))
(defconstant ccpl::+machine+
#+(and Allegro SGI4D) "sgi" ;SGI IRIX 5.2 Allegro CL 4.1
#+(and CMU SGI) "cmu-sgi" ;SGI IRIX 5.2 CMU CL 17.x
#+(and (not PPC-TARGET) mcl) "mac" ;Apple MacOS 7.5 MCL 3.0
#+PPC-TARGET "ppc" ;Apple MacOS 7.5 MCL-PPC 3.9
#+(and SBCL LINUX)"sbcl-linux"
)
(defconstant ccpl::+bin-extension+
#-PPC-TARGET (make-pathname :type "fasl")
#+PPC-TARGET (make-pathname :type "pfsl"))
;;;#+Allegro(setq excl:*print-nickname* t)
#-CLIM
(when (find-package :clim)
(pushnew :clim *features*))
#+MCL(unless (find-package :user)
(defpackage :common-lisp-user
(:nicknames user cl-user)))
#+NOT_USED
(setf (logical-pathname-translations "ccpl")
(list
(list "bin;*.*.*" (concatenate 'string "ccpl:bin;" ccpl::+machine+ ";*.*"))
(list "host;*.*.*" (concatenate 'string "ccpl:src;" ccpl::+machine+ ";*.*"))
(list "home;*.*.*" (concatenate 'string ccpl::+ccpl-home+ "*.*"))
(list "ccpl;*.*.*" (concatenate 'string ccpl::+ccpl-home+ "*.*"))
(list "**;*.*.*" (concatenate 'string ccpl::+ccpl-home+ "**:*.*"))))
(setf (logical-pathname-translations "CCPL")
`(("HOME;**;*.*.*" ,(concatenate 'string ccpl::+ccpl-home+ "/**/*.*"))
("BIN;**;*.*.*" ,(logical-pathname "CCPL:HOME;BIN;**;*.*.*"))
("SRC;**;*.*.*" ,(logical-pathname "CCPL:HOME;SRC;**;*.*.*"))
("**;*.*.*" ,(concatenate 'string ccpl::+ccpl-home+ "/*.*"))
))
(setf (logical-pathname-translations "user")
(list
(list "snd;**;*.*" "Disk2:snd:**:*.*")
(list "**;*.*" (user-homedir-pathname))))
(setf (logical-pathname-translations "home")
(list
(list "**;*.*" "Hemma:Ludde:**:*.*")))
#+Allegro
(eval-when (:compile-toplevel :load-toplevel :execute)
(setq system:*load-search-list*
`(:first
*default-pathname-defaults*
(:newest
#.(make-pathname :type "fasl")
#.(make-pathname :type "cl")
#.(make-pathname :type "lisp"))
(:newest
#.(translate-logical-pathname "ccpl:bin;*.fasl")
#.(translate-logical-pathname "ccpl:work;*.cl")
#.(translate-logical-pathname "ccpl:work;*.lisp")
#.(translate-logical-pathname "ccpl:host;*.cl")
#.(translate-logical-pathname "ccpl:host;*.lisp")
#.(translate-logical-pathname "ccpl:src;*.cl")
#.(translate-logical-pathname "ccpl:src;*.lisp"))
excl::*library-code-fasl-pathname*
excl::*library-code-cl-pathname*
excl::*library-code-bin-pathname*))
(setq system:*require-search-list* system:*load-search-list*)
(use-package :cltl1 :ccpl))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Defsystem stuff
;;;
;(load (translate-logical-pathname "ccpl:src;ccpl-package.lisp") :verbose t)
(load (translate-logical-pathname #p"ccpl:src;defsys;defsys-init.lisp"))
#+asdf
(setf asdf:*central-registry*
;; Default directories, usually just the ``current directory''
`(*default-pathname-defaults*
;; Additional places where ASDF can find
;; system definition files
,(translate-logical-pathname "ccpl:src;defsys;")))
#+asdf
(asdf:ensure-source-registry (translate-logical-pathname "ccpl:src;defsys;"))
#-asdf
(pushnew #p"ccpl:ccpl-sys;" ds:*system-directories*)
#+asdf
(asdf:operate 'asdf:load-op :ccpl)
#-asdf
(ds:load-system :kernel)
#+MCL
(progn
(pushnew #4P"ccpl:bin;" *module-search-path*)
(pushnew #4P"ccpl:src;" *module-search-path*)
(pushnew #4P"ccpl:work;" *module-search-path*)
;(import '(ccl:provide ccl:require) :cl)
(import 'ccl:require :cl)
(import 'ccl:require :ccpl)
;(export '(ccl:provide ccl:require) :cl)
#+POWERPC(ccl::add-to-shared-library-search-path "ccplLib")
)
(defvar ccpl:*ccpl-readtable* (copy-readtable nil))
(defun cplk:ccpl-load (&optional module)
(let ((*readtable* ccpl:*ccpl-readtable*))
(if module
(ds:load-system module)
(ds:load-system :ccpl))))
(pushnew :ccpl *features*)