5 (pushnew :cl *features*)
7 ;; Don't try to optimize so much in ECL.
8 ;; Therefore functions can be redefined (essential for share libraries).
9 #+ecl (declaim (optimize (debug 2)))
12 (let ((version-num (+ (* 10000 system::*gcl-major-version*)
13 (* 100 system::*gcl-minor-version*)
14 system::*gcl-extra-version*)))
15 (when (> version-num 20603)
16 (pushnew :gcl-working-proclaims *features*)))
19 (setf ext:*gc-verbose* nil)
21 ;; In server.lisp, we load up sb-bsd-sockets for sbcl. This also
22 ;; causes asdf to be loaded. Not normally a problem, but
23 ;; asdf::*output-translations* is not NIL when maxima is restarted.
24 ;; If you give maxima.core (as a binary distribution) to someone else,
25 ;; the translations are wrong. The solution is to clear the
26 ;; translations before saving the core.
28 ;; This should really be done for all lisps that might have asdf2
29 ;; loaded. Currently, I (rtoy) thinks this only happens with sbcl.
31 ;; (This issue was brought to my attention by Zach Beane, on irc.
32 ;; Solution by Nikodemus Siivola.)
34 (pushnew 'asdf::clear-configuration *save-hooks*)
36 ;; If you want maxima to use long-floats for arithmetic, use this:
37 #+(and nil (or clisp scl))
38 (pushnew :flonum-long *features*)
40 ;; If you want maxima to use double-double-floats, use this:
41 #+(and nil cmu double-double)
42 (pushnew :flonum-double-double *features*)
44 (setf *load-verbose* nil)
46 (defvar *maxima-build-time* (multiple-value-list (get-decoded-time)))
48 (export '*maxima-build-time*)
51 (defun do-compile-ecl (file &rest args)
52 ;; Not sure about this. Compile twice. The first produces a .o
53 ;; file. The second produces the .fas file to keep defsystem happy
54 ;; because defsystem needs to load the files while compiling so
55 ;; macros and such are defined.
56 (let* ((output (getf args :output-file))
57 (object-output (compile-file-pathname output :system-p t)))
58 (and (apply #'compile-file file :output-file object-output args)
59 (c:build-fasl output :lisp-files (list object-output)))))
62 (defun build-maxima-lib ()
63 (labels ((list-all-objects (module)
64 (if (eql (mk::component-type module) :file)
65 (list (mk::component-full-pathname module :binary))
66 (apply #'append (mapcar #'list-all-objects (mk::component-components module))))))
67 (let* ((files (list-all-objects (mk:find-system 'maxima))))
70 (c::build-static-library "binary-ecl/maxima-lib" :lisp-files (print files))
71 (let ((c::*ld-format* (concatenate 'string c::*ld-format* " /LIBPATH:binary-ecl")))
72 (c::build-fasl "binary-ecl/maxima" :lisp-files '(maxima-lib))))
74 (let ((obj (mapcar #'(lambda (p)
75 ;; Convert dir/foo.fas to dir/foo.o
76 (make-pathname :type "o" :defaults p))
78 (c::build-fasl "binary-ecl/maxima" :lisp-files obj
80 (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
81 (find-package "MAXIMA")))))
82 (if (and x (not (string= x ""))) (list x))))
83 (c::build-program "binary-ecl/maxima" :lisp-files obj
85 (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
86 (find-package "MAXIMA")))))
87 (if (and x (not (string= x ""))) (list x)))
88 :epilogue-code '(progn (cl-user::run)))))))
90 (defun maxima-binary-pathname ()
94 (make-pathname :name "binary-cmucl"
95 :directory (pathname-directory *load-truename*))
97 (make-pathname :name "binary-scl"
98 :directory (pathname-directory *load-truename*))
100 (make-pathname :name "binary-sbcl"
101 :directory (pathname-directory *load-truename*))
106 #+(and openmcl (not 64-bit-target))
108 #+(and openmcl 64-bit-target)
113 (make-pathname :name "binary-lispworks"
114 :directory (pathname-directory *load-truename*))
117 #-(or clisp cmu scl sbcl gcl allegro openmcl abcl lispworks ecl)
118 "binary-unknownlisp")
120 (mk:defsystem "maxima"
121 :source-extension "lisp"
122 :binary-pathname (maxima-binary-pathname)
123 #+ecl :compiler-options #+ecl (:system-p t)
124 #+ecl :compiler #+ecl do-compile-ecl
127 (:module proclaim :source-pathname ""
130 ((:file "maxima-package")
131 (:file "numerical/f2cl-package")
132 (:file "numerical/slatec")
133 (:file "command-line")
135 #+gcl-working-proclaims
136 (:private-file "tools/sys-proclaim")))
137 (:module package :source-pathname ""
138 ;; On ECL all runtime alterations to the system (i.e from repl)
139 ;; at runtime are not part of the final executable if they aren't.
141 #-ecl :load-only #-ecl t
144 (:file "maxima-package")
145 #+ecl (:file "ecl-port")
146 ;; If a file is declared as private-file it is loaded
147 ;; from the build tree (which makes an out-of-tree
148 ;; build possible), but not compiled (which means
149 ;; with ECL or ABCL it won't end up in the final image)
150 ;; => no out-of-tree build for ECL.
151 #-(or ecl abcl lispworks) (:private-file "autoconf-variables")
152 #+(or ecl abcl lispworks) (:file "autoconf-variables")
154 (:module intl :source-pathname ""
157 ;; Some versions of CMUCL already
158 ;; have a compatible version of
159 ;; INTL, so skip it if we have
161 #+#.(cl:if (cl:and (cl:member :cmu cl:*features*) (cl:find-package '#:intl)) '(or) '(and))
163 (:module info :source-pathname ""
167 (:module sloop :source-pathname ""
170 (:module declarations :source-pathname ""
173 (:module destructuring-let :source-pathname ""
176 (:module compatibility-macros1 :source-pathname ""
180 (:module defmfun :source-pathname ""
182 ((:file "defmfun-check")))
183 (:module compatibility-macros :source-pathname ""
184 :depends-on ("defmfun")
186 (#+gcl (:file "gcl-compat")
188 (:module prerequisites :source-pathname ""
189 :depends-on ("defmfun")
193 (:module maxima-language-compiler-macros :source-pathname ""
194 :depends-on ("defmfun")
197 (:module command-line :source-pathname ""
198 :depends-on ("defmfun")
199 :depends-on ("getopt")
201 ((:file "command-line")))
202 (:module getopt :source-pathname ""
203 :depends-on ("defmfun")
206 (:module fundamental-macros :source-pathname ""
207 :depends-on ("defmfun")
211 (:module utility-macros :source-pathname ""
212 :depends-on ("defmfun")
216 (:module other-macros :source-pathname ""
217 :depends-on ("defmfun")
223 (:file "safe-recursion")))
224 (:module rat-macros :source-pathname ""
225 :depends-on ("defmfun")
229 #+gcl (:file "optimize") ; jfa check this
230 (:module utilities :source-pathname ""
231 :depends-on ("defmfun" "utility-macros")
242 (:module commands :source-pathname ""
243 :depends-on ("defmfun" "compatibility-macros1")
247 (:module evaluator :source-pathname ""
248 :depends-on ("defmfun")
253 ;; The free versions of Allegro and Lispworks have a heap limit.
254 ;; Let's not compile these routines so that we can at least
255 ;; get the rest of maxima built.
257 :depends-on ("defmfun")
259 ((:module packages :source-pathname ""
261 ((:file "f2cl-package")
263 (:module f2cl-lib :source-pathname ""
265 ((:file "f2cl-lib")))
266 (:module slatec :source-pathname "slatec"
267 :depends-on ("f2cl-lib" "packages")
268 #+(or allegro-cl-trial lispworks-personal-edition) :load-only
269 #+(or allegro-cl-trial lispworks-personal-edition) t
274 :depends-on ("xermsg"))
277 :depends-on ("fdump" "j4save" "xercnt" "xerhlt" "xerprn" "xersve"))
281 :depends-on ("xgetua"))
283 :depends-on ("j4save"))
285 :depends-on ("xermsg"))
289 :depends-on ("dcsevl" "initds" "xermsg"))
291 :depends-on ("xermsg"))
293 :depends-on ("d9lgmc" "dcsevl" "dgamlm" "initds" "xermsg"))
296 :depends-on ("d9lgmc" "dgamma" "xermsg"))
298 ;; Bessel J functions
300 :depends-on ("dcsevl" "initds" "xermsg"))
302 :depends-on ("dcsevl" "initds" "xermsg"))
304 :depends-on ("d9b0mp" "dcsevl" "initds"))
306 :depends-on ("d9b1mp" "dcsevl" "initds" "xermsg"))
310 :depends-on ("dasyjy" "djairy" "dlngam" "xermsg"))
311 ;; Bessel I functions
313 :depends-on ("dcsevl" "initds"))
315 :depends-on ("dcsevl" "initds" "xermsg"))
317 :depends-on ("dbsi0e" "dcsevl" "initds" "xermsg"))
319 :depends-on ("dbsi1e" "dcsevl" "initds" "xermsg"))
322 :depends-on ("dasyik" "dlngam" "xermsg"))
324 :depends-on ("zabs" "zbinu"))
326 ;; Bessel J function for complex
327 ;; arg and real order.
331 :depends-on ("zabs" "zasyi" "zbknu" "zmlri" "zs1s2" "zseri"))
333 :depends-on ("zabs" "zacai" "zbknu" "zexp" "zsqrt"))
335 :depends-on ("zabs" "zdiv" "zexp" "zmlt" "zsqrt"))
337 :depends-on ("zabs" "zbinu"))
339 :depends-on ("zabs" "zasyi" "zbuni" "zmlri" "zseri" "zuoik" "zwrsk"))
341 :depends-on ("dgamln" "zabs" "zdiv" "zexp" "zkscl"
342 "zlog" "zmlt" "zshch" "zsqrt" "zuchk"))
344 :depends-on ("zabs" "zuni1" "zuni2"))
348 :depends-on ("zabs" "zlog" "zuchk"))
350 :depends-on ("zabs"))
352 :depends-on ("dgamln" "zabs" "zexp" "zlog" "zmlt"))
355 :depends-on ("zabs" "zdiv"))
357 :depends-on ("zabs" "zexp" "zlog"))
359 :depends-on ("dgamln" "zabs" "zdiv" "zlog" "zmlt" "zuchk"))
361 (:file "zsqrt" :depends-on ("zabs"))
364 :depends-on ("zabs" "zdiv" "zlog" "zsqrt"))
366 :depends-on ("zabs" "zuchk" "zunik" "zuoik"))
368 :depends-on ("zabs" "zairy" "zuchk" "zunhj" "zuoik"))
370 :depends-on ("zdiv" "zlog" "zsqrt"))
372 :depends-on ("zabs" "zlog" "zuchk" "zunhj" "zunik"))
374 :depends-on ("zabs" "zbknu" "zrati"))
376 ;; Bessel Y functions
378 :depends-on ("d9b0mp" "dbesj0" "dcsevl" "initds" "xermsg"))
380 :depends-on ("d9b1mp" "dbesj1" "dcsevl" "initds" "xermsg"))
382 :depends-on ("dasyjy" "dbesy0" "dbesy1" "dbsynu" "dyairy" "xermsg"))
384 :depends-on ("dgamma" "xermsg"))
388 :depends-on ("zbesh"))
390 :depends-on ("zabs" "zacon" "zbknu" "zbunk" "zuoik"))
392 :depends-on ("zabs" "zbinu" "zbknu" "zmlt" "zs1s2"))
394 :depends-on ("zunk1" "zunk2"))
396 :depends-on ("zabs" "zs1s2" "zuchk" "zunik"))
398 :depends-on ("zabs" "zairy" "zs1s2" "zuchk" "zunhj"))
400 ;; Bessel K functions
402 :depends-on ("dbesi0" "dbsk0e" "dcsevl" "initds" "xermsg"))
404 :depends-on ("dbesi0" "dcsevl" "initds" "xermsg"))
406 :depends-on ("dbesi1" "dbsk1e" "dcsevl" "initds" "xermsg"))
408 :depends-on ("dbesi1" "dcsevl" "initds" "xermsg"))
410 :depends-on ("dasyik" "dbesk0" "dbesk1" "dbsk0e" "dbsk1e" "dbsknu" "xermsg"))
412 :depends-on ("dgamma" "xermsg"))
414 :depends-on ("zabs" "zacon" "zbknu" "zbunk" "zuoik"))
418 :depends-on ("dcsevl" "initds" "xermsg"))
420 :depends-on ("d9aimp" "dcsevl" "initds"))
422 :depends-on ("d9aimp" "daie" "dcsevl" "initds" "xermsg"))
424 :depends-on ("d9aimp" "dcsevl" "initds"))
426 :depends-on ("d9aimp" "dbie" "dcsevl" "initds" "xermsg"))
428 :depends-on ("zabs" "zbinu" "zdiv" "zsqrt"))
431 :depends-on ("dcsevl" "derfc" "initds"))
433 :depends-on ("dcsevl" "initds" "xermsg"))
434 ;; Exponential integrals
436 :depends-on ("dcsevl" "initds" "xermsg"))
440 :depends-on ("d9upak"))
443 :source-pathname "slatec"
444 #+(or allegro-cl-trial lispworks-personal-edition) :load-only
445 #+(or allegro-cl-trial lispworks-personal-edition) t
455 ;; Core integration routines
466 :depends-on ("dqcheb" "dqk15w"))
469 :depends-on ("dqcheb"
490 :depends-on ("dqagpe"))
501 :depends-on ("dqagie"
505 :depends-on ("dqc25f"
509 :depends-on ("dqc25s"
513 :depends-on ("dqc25c"
515 ;; Simplified interface routines
518 :depends-on ("dqage"))
520 :depends-on ("dqagse"))
522 :depends-on ("dqagie"))
524 :depends-on ("dqawfe"))
526 :depends-on ("dqawoe"))
528 :depends-on ("dqawse"))
530 :depends-on ("dqawce"))
535 (:module simplification :source-pathname ""
536 :depends-on ("defmfun")
545 (:module numeric-bigfloat :source-pathname ""
546 :depends-on ("defmfun" #-gcl "package"
550 (:module server :source-pathname ""
551 :depends-on ("defmfun")
552 :components ((:file "server")))
553 (:module i-o :source-pathname ""
554 :depends-on ("defmfun" "compatibility-macros" "compatibility-macros1")
561 (:module factoring :source-pathname ""
562 :depends-on ("defmfun")
570 (:module ifactor :source-pathname ""
571 :depends-on ("defmfun")
574 (:module rational-functions :source-pathname ""
575 :depends-on ("defmfun" "rat-macros" "other-macros" "compatibility-macros1")
584 (:module maxima-language-compiler :source-pathname ""
585 :depends-on ("defmfun" "maxima-language-compiler-macros")
606 (:module numerical-functions :source-pathname ""
607 :depends-on ("defmfun" "trigonometry" "algebraic-database" "utility-macros")
612 :depends-on ("ellipt"))
615 (:module reader :source-pathname ""
616 :depends-on ("defmfun" "compatibility-macros" "compatibility-macros1")
619 (:module display :source-pathname ""
620 :depends-on ("defmfun")
625 (:module gcd :source-pathname ""
626 :depends-on ("defmfun")
630 (:module documentation :source-pathname ""
631 :depends-on ("defmfun")
635 (:module algebraic-database :source-pathname ""
636 :depends-on ("defmfun" "compatibility-macros1")
641 (:file "askp")) ;does this belong here?
643 (:module integration :source-pathname ""
644 :depends-on ("defmfun" "pattern-matching")
649 (:module taylor-series :source-pathname ""
650 :depends-on ("defmfun")
651 :components ((:file "hayat")))
652 (:module definite-integration :source-pathname ""
653 :depends-on ("defmfun")
657 (:module trigonometry :source-pathname ""
658 :depends-on ("pattern-matching" "defmfun")
663 (:module special-functions :source-pathname ""
664 :depends-on ("defmfun")
667 (:module matrix-algebra :source-pathname ""
668 :depends-on ("defmfun")
673 (:module determinants :source-pathname ""
674 :depends-on ("defmfun")
679 (:module pattern-matching :source-pathname ""
680 :depends-on ("defmfun" "compatibility-macros1")
686 (:module limits :source-pathname ""
687 :depends-on ("defmfun")
688 :components ((:file "tlimit")
690 (:module solve :source-pathname ""
691 :depends-on ("defmfun" "compatibility-macros1")
699 (:module debugging :source-pathname ""
700 :depends-on ("defmfun" "compatibility-macros1")
704 (:module miscellaneous :source-pathname ""
705 :depends-on ("defmfun" "pattern-matching" "compatibility-macros1")
721 (:file "rand-mt19937")
725 (:file "expintegral")
728 (:module polynomial :source-pathname ""
729 :depends-on ("defmfun")
731 ((:file "polynomialp")))
732 (:module poisson-series :source-pathname ""
733 :depends-on ("defmfun")
737 (:module translated-packages :source-pathname ""
738 :depends-on ("maxima-language-compiler-macros"
739 "compatibility-macros1"
747 (:file "todd-coxeter")
750 (:module graphics-drivers :source-pathname ""
751 :depends-on ("defmfun")
753 ((:file "gnuplot_def")
754 (:file "xmaxima_def")
755 (:file "geomview_def")))
756 (:module final :source-pathname ""
757 :depends-on ("defmfun")
758 ;; These are not compiled, for whatever reason, except on ecl:
759 ;; On ECL all runtime alterations to the system (i.e from repl)
760 ;; at runtime are not part of the final executable if they aren't.
762 #-ecl :load-only #-ecl t
766 ;; If a file is declared as private-file it is loaded
767 ;; from the build tree (which makes an out-of-tree
768 ;; build possible), but not compiled (which means
769 ;; that with ECL or ABCL it won't end up in the final image)
770 ;; => no out-of-tree build for ECL.
771 (:file "share-subdirs")
772 (:file "init-cl")))))