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)")
10 (let ((files (make::system-files
:maxima
))
11 (object-path (if (boundp 'object-path
) object-path
13 (declare (special object-path
))
15 (with-open-file (st "maxobjs" :direction
:output
)
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
)
26 `(clines ,(Format nil
"init_or_load(init_~a,\"~a\");" f ff
))
28 (princ (namestring (truename "sysinit.o")) st
)
31 (clines #.
(Format nil
"load(\"~a\");"
32 (namestring (truename "init_max1.lisp"))))
37 (clines "return Cnil;}")
39 ;; invoke this to initialize maxima.