1
(make-package "COMPILER" :use '("LISP"))
2
(make-package "SLOOP" :use '("LISP"))
3
(make-package "SERROR" :use '("LISP" "SLOOP"))
4
(make-package "ANSI-LOOP" :use '("LISP"))
5
(make-package "DEFPACKAGE" :use '("LISP"))
6
(make-package "TK" :use '("LISP" "SLOOP"))
10
(defvar *command-args* nil)
11
;; if ANY header or license information is printed by the
12
;; program, then the following License and Enhancement notice
13
;; must be printed (see License).
22
(or lisp::*link-array*
23
(setq lisp::*link-array*
24
(make-array (ash 1 11) :element-type 'string-char :fill-pointer 0)))
25
(si::use-fast-links t)
27
(let* ((x (append (pathname-directory si::*system-directory*) (list :parent)))
28
(lsp (append x (list "lsp")))
29
(cmpnew (append x (list "cmpnew")))
30
(h (append x (list "h")))
31
(gtk (append x (list "gcl-tk"))))
32
(dolist (d (list lsp cmpnew))
33
(load (make-pathname :name "sys-proclaim" :type "lisp" :directory d)))
34
(load (make-pathname :name "tk-package" :type "lsp" :directory gtk))
35
(load (make-pathname :name "gcl_cmpmain" :type "lsp" :directory cmpnew))
36
(load (make-pathname :name "gcl_lfun_list" :type "lsp" :directory cmpnew))
37
(load (make-pathname :name "gcl_cmpopt" :type "lsp" :directory cmpnew))
38
(load (make-pathname :name "gcl_auto_new" :type "lsp" :directory lsp))
42
(setq compiler::*cmpinclude* "\"cmpinclude.h\"")
44
(when compiler::*cmpinclude-string*
45
(with-open-file (st (make-pathname :directory h :name "cmpinclude" :type "h"))
47
((tem (make-array (file-length st) :element-type 'standard-char
49
(if (si::fread tem 0 (length tem) st)
50
(setq compiler::*cmpinclude-string* tem))))))
52
(setf (symbol-function 'si:clear-compiler-properties)
53
(symbol-function 'compiler::compiler-clear-compiler-properties))
54
(setq system::*old-top-level* (symbol-function 'system:top-level))
56
(defvar si::*lib-directory* (namestring (make-pathname :directory (list :parent))))
58
(defun system::gcl-top-level (&aux tem)
59
(si::set-up-top-level)
61
(if (si::get-command-arg "-compile")
62
(let (;(system::*quit-tag* (cons nil nil))
63
;(system::*quit-tags* nil) (system::*break-level* '())
64
;(system::*break-env* nil) (system::*ihs-base* 1)
65
;(system::*ihs-top* 1) (system::*current-ihs* 1)
66
(*break-enable* nil) result)
71
(si::get-command-arg "-compile")
73
(or (si::get-command-arg "-o")
74
(si::get-command-arg "-compile"))
77
(si::get-command-arg "-o-file")
79
((si::get-command-arg "-o-file" t))
81
:c-file (si::get-command-arg "-c-file" t)
82
:h-file (si::get-command-arg "-h-file" t)
83
:data-file (si::get-command-arg "-data-file" t)
84
:system-p (si::get-command-arg "-system-p" t)))))
85
(bye (if (or compiler::*error-p* (equal result '(nil))) 1 0))))
86
(cond ((si::get-command-arg "-batch")
87
(setq si::*top-level-hook* 'bye))
88
((si::get-command-arg "-f"))
89
(t (format t si::*system-banner*)))
90
(setq si::*ihs-top* 1)
91
(in-package 'system::user) (incf system::*ihs-top* 2)
92
(funcall system::*old-top-level*))
95
(setq si:*inhibit-macro-special* t)
96
(gbc t) (system:reset-gbc-count)
98
(defun system:top-level nil (system::gcl-top-level))
100
(setq compiler::*default-c-file* nil)
101
(setq compiler::*default-h-file* nil)
102
(setq compiler::*default-data-file* nil)
103
(setq compiler::*default-system-p* nil)
104
(setq compiler::*keep-gaz* nil)
110
(fmakunbound 'si::init-cmp-anon)
113
(if (fboundp 'get-system-time-zone)
114
(setf system:*default-time-zone* (get-system-time-zone))
115
(setf system:*default-time-zone* 6)))
117
(if (fboundp 'si::user-init) (si::user-init))
118
(si::set-up-top-level)
120
(setq si::*gcl-extra-version* @LI-EXTVERS@
121
si::*gcl-minor-version* @LI-MINVERS@
122
si::*gcl-major-version* @LI-MAJVERS@)
123
(setq compiler::*cc* @LI-CC@)
124
(setq compiler::*ld* @LI-LD@)
125
(setq compiler::*ld-libs* @LI-LD-LIBS@)
126
(setq compiler::*opt-three* @LI-OPT-THREE@)
127
(setq compiler::*opt-two* @LI-OPT-TWO@)
128
(setq compiler::*init-lsp* @LI-INIT-LSP@)
130
(defvar si::*system-banner* (si::default-system-banner))