SRRAT: use MRAT reader functions instead of CADDAR, etc.
[maxima.git] / archive / src / sysinit.lsp
blobc69c4eb760f084ffd9d3ddeaf0b4b586172771a7
2 (in-package "MAKE")
4 ;;define a function USER::USER-INIT, which will run the init code for a set
5 ;;of files which are linked into an image.
7 (clines "#define init_or_load(fn,file) do {extern int fn(); init_or_load1(fn,file);} while(0)")
9 #.
10 (let ((files (make::system-files :maxima))
11 (object-path (if (boundp 'object-path) object-path
12 "foo.o")))
13 (declare (special object-path))
15 (with-open-file (st "maxobjs" :direction :output)
16 `(progn
17 (clines "object user_init() {")
18 (clines #.(Format nil "load(\"~a\");"
19 (namestring (truename "init_max0.lisp"))))
21 ,@(sloop::sloop for x in files
22 for f = (substitute #\_ #\- (lowcase x))
23 for ff = (namestring (truename (object x)))
24 do (princ ff st) (princ " " st)
25 collect
26 `(clines ,(Format nil "init_or_load(init_~a,\"~a\");" f ff))
27 finally
28 (princ (namestring (truename "sysinit.o")) st)
29 (terpri st)
31 (clines #.(Format nil "load(\"~a\");"
32 (namestring (truename "init_max1.lisp"))))
37 (clines "return Cnil;}")
39 ;; invoke this to initialize maxima.