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 globals :source-pathname ""
167 (:module info :source-pathname ""
171 (:module sloop :source-pathname ""
174 (:module declarations :source-pathname ""
175 :depends-on ("globals")
178 (:module destructuring-let :source-pathname ""
181 (:module compatibility-macros1 :source-pathname ""
185 (:module defmfun :source-pathname ""
187 ((:file "defmfun-check")))
188 (:module float-properties :source-pathname ""
189 :depends-on ("defmfun")
191 ((:file "float-properties")))
192 (:module compatibility-macros :source-pathname ""
193 :depends-on ("defmfun" "compatibility-macros1")
195 (#+gcl (:file "gcl-compat")
197 (:module prerequisites :source-pathname ""
198 :depends-on ("defmfun")
202 (:module maxima-language-compiler-macros :source-pathname ""
203 ;; Should depend on transl to get special var tr-abort,
204 ;; but making this depend on maxima-language-compiler to
205 ;; get transl.lisp doesn't work. It results in a compiler
206 ;; error about maxima::$local being an unknown block. I
207 ;; (rtoy) didn't investigate further.
208 :depends-on ("defmfun")
211 (:module command-line :source-pathname ""
212 :depends-on ("defmfun")
213 :depends-on ("getopt")
215 ((:file "command-line")))
216 (:module getopt :source-pathname ""
217 :depends-on ("defmfun")
220 (:module fundamental-macros :source-pathname ""
221 :depends-on ("globals" "defmfun")
225 (:module utility-macros :source-pathname ""
226 :depends-on ("defmfun")
230 (:module other-macros :source-pathname ""
231 :depends-on ("defmfun" "compatibility-macros1")
237 (:file "safe-recursion")))
238 (:module rat-macros :source-pathname ""
239 :depends-on ("defmfun")
243 #+gcl (:file "optimize") ; jfa check this
244 (:module utilities :source-pathname ""
245 :depends-on ("globals" "defmfun" "utility-macros")
256 (:module commands :source-pathname ""
257 :depends-on ("globals" "defmfun" "compatibility-macros1")
261 (:module evaluator :source-pathname ""
262 :depends-on ("globals" "defmfun" "utility-macros")
267 ;; The free versions of Allegro and Lispworks have a heap limit.
268 ;; Let's not compile these routines so that we can at least
269 ;; get the rest of maxima built.
271 :depends-on ("defmfun")
273 ((:module packages :source-pathname ""
275 ((:file "f2cl-package")
277 (:module f2cl-lib :source-pathname ""
279 ((:file "f2cl-lib")))
280 (:module slatec :source-pathname "slatec"
281 :depends-on ("f2cl-lib" "packages")
282 #+(or allegro-cl-trial lispworks-personal-edition) :load-only
283 #+(or allegro-cl-trial lispworks-personal-edition) t
288 :depends-on ("xermsg"))
291 :depends-on ("fdump" "j4save" "xercnt" "xerhlt" "xerprn" "xersve"))
295 :depends-on ("xgetua"))
297 :depends-on ("j4save"))
299 :depends-on ("xermsg"))
303 :depends-on ("dcsevl" "initds" "xermsg"))
305 :depends-on ("xermsg"))
307 :depends-on ("d9lgmc" "dcsevl" "dgamlm" "initds" "xermsg"))
310 :depends-on ("d9lgmc" "dgamma" "xermsg"))
312 ;; Bessel J functions
314 :depends-on ("dcsevl" "initds" "xermsg"))
316 :depends-on ("dcsevl" "initds" "xermsg"))
318 :depends-on ("d9b0mp" "dcsevl" "initds"))
320 :depends-on ("d9b1mp" "dcsevl" "initds" "xermsg"))
324 :depends-on ("dasyjy" "djairy" "dlngam" "xermsg"))
325 ;; Bessel I functions
327 :depends-on ("dcsevl" "initds"))
329 :depends-on ("dcsevl" "initds" "xermsg"))
331 :depends-on ("dbsi0e" "dcsevl" "initds" "xermsg"))
333 :depends-on ("dbsi1e" "dcsevl" "initds" "xermsg"))
336 :depends-on ("dasyik" "dlngam" "xermsg"))
338 :depends-on ("zabs" "zbinu"))
340 ;; Bessel J function for complex
341 ;; arg and real order.
345 :depends-on ("zabs" "zasyi" "zbknu" "zmlri" "zs1s2" "zseri"))
347 :depends-on ("zabs" "zacai" "zbknu" "zexp" "zsqrt"))
349 :depends-on ("zabs" "zdiv" "zexp" "zmlt" "zsqrt"))
351 :depends-on ("zabs" "zbinu"))
353 :depends-on ("zabs" "zasyi" "zbuni" "zmlri" "zseri" "zuoik" "zwrsk"))
355 :depends-on ("dgamln" "zabs" "zdiv" "zexp" "zkscl"
356 "zlog" "zmlt" "zshch" "zsqrt" "zuchk"))
358 :depends-on ("zabs" "zuni1" "zuni2"))
362 :depends-on ("zabs" "zlog" "zuchk"))
364 :depends-on ("zabs"))
366 :depends-on ("dgamln" "zabs" "zexp" "zlog" "zmlt"))
369 :depends-on ("zabs" "zdiv"))
371 :depends-on ("zabs" "zexp" "zlog"))
373 :depends-on ("dgamln" "zabs" "zdiv" "zlog" "zmlt" "zuchk"))
375 (:file "zsqrt" :depends-on ("zabs"))
378 :depends-on ("zabs" "zdiv" "zlog" "zsqrt"))
380 :depends-on ("zabs" "zuchk" "zunik" "zuoik"))
382 :depends-on ("zabs" "zairy" "zuchk" "zunhj" "zuoik"))
384 :depends-on ("zdiv" "zlog" "zsqrt"))
386 :depends-on ("zabs" "zlog" "zuchk" "zunhj" "zunik"))
388 :depends-on ("zabs" "zbknu" "zrati"))
390 ;; Bessel Y functions
392 :depends-on ("d9b0mp" "dbesj0" "dcsevl" "initds" "xermsg"))
394 :depends-on ("d9b1mp" "dbesj1" "dcsevl" "initds" "xermsg"))
396 :depends-on ("dasyjy" "dbesy0" "dbesy1" "dbsynu" "dyairy" "xermsg"))
398 :depends-on ("dgamma" "xermsg"))
402 :depends-on ("zbesh"))
404 :depends-on ("zabs" "zacon" "zbknu" "zbunk" "zuoik"))
406 :depends-on ("zabs" "zbinu" "zbknu" "zmlt" "zs1s2"))
408 :depends-on ("zunk1" "zunk2"))
410 :depends-on ("zabs" "zs1s2" "zuchk" "zunik"))
412 :depends-on ("zabs" "zairy" "zs1s2" "zuchk" "zunhj"))
414 ;; Bessel K functions
416 :depends-on ("dbesi0" "dbsk0e" "dcsevl" "initds" "xermsg"))
418 :depends-on ("dbesi0" "dcsevl" "initds" "xermsg"))
420 :depends-on ("dbesi1" "dbsk1e" "dcsevl" "initds" "xermsg"))
422 :depends-on ("dbesi1" "dcsevl" "initds" "xermsg"))
424 :depends-on ("dasyik" "dbesk0" "dbesk1" "dbsk0e" "dbsk1e" "dbsknu" "xermsg"))
426 :depends-on ("dgamma" "xermsg"))
428 :depends-on ("zabs" "zacon" "zbknu" "zbunk" "zuoik"))
432 :depends-on ("dcsevl" "initds" "xermsg"))
434 :depends-on ("d9aimp" "dcsevl" "initds"))
436 :depends-on ("d9aimp" "daie" "dcsevl" "initds" "xermsg"))
438 :depends-on ("d9aimp" "dcsevl" "initds"))
440 :depends-on ("d9aimp" "dbie" "dcsevl" "initds" "xermsg"))
442 :depends-on ("zabs" "zbinu" "zdiv" "zsqrt"))
445 :depends-on ("dcsevl" "derfc" "initds"))
447 :depends-on ("dcsevl" "initds" "xermsg"))
448 ;; Exponential integrals
450 :depends-on ("dcsevl" "initds" "xermsg"))
454 :depends-on ("d9upak"))
457 :source-pathname "slatec"
458 #+(or allegro-cl-trial lispworks-personal-edition) :load-only
459 #+(or allegro-cl-trial lispworks-personal-edition) t
469 ;; Core integration routines
480 :depends-on ("dqcheb" "dqk15w"))
483 :depends-on ("dqcheb"
504 :depends-on ("dqagpe"))
515 :depends-on ("dqagie"
519 :depends-on ("dqc25f"
523 :depends-on ("dqc25s"
527 :depends-on ("dqc25c"
529 ;; Simplified interface routines
532 :depends-on ("dqage"))
534 :depends-on ("dqagse"))
536 :depends-on ("dqagie"))
538 :depends-on ("dqawfe"))
540 :depends-on ("dqawoe"))
542 :depends-on ("dqawse"))
544 :depends-on ("dqawce"))
549 (:module simplification :source-pathname ""
550 :depends-on ("globals" "defmfun")
559 (:module numeric-bigfloat :source-pathname ""
560 :depends-on ("defmfun" #-gcl "package"
564 (:module server :source-pathname ""
565 :depends-on ("defmfun")
566 :components ((:file "server")))
567 (:module i-o :source-pathname ""
568 :depends-on ("globals" "defmfun" "compatibility-macros" "compatibility-macros1")
576 (:module factoring :source-pathname ""
577 :depends-on ("globals" "defmfun")
585 (:module ifactor :source-pathname ""
586 :depends-on ("defmfun")
589 (:module rational-functions :source-pathname ""
590 :depends-on ("globals" "defmfun" "rat-macros" "other-macros"
591 "compatibility-macros1" "ifactor" "factoring")
600 (:module maxima-language-compiler :source-pathname ""
601 :depends-on ("globals" "defmfun" "maxima-language-compiler-macros" "evaluator")
605 :depends-on ("transl"))
608 :depends-on ("transl"))
610 :depends-on ("transl"))
612 :depends-on ("trprop"))
614 :depends-on ("transl"))
617 :depends-on ("transl"))
619 :depends-on ("transl"))
621 :depends-on ("transl"))
630 (:module numerical-functions :source-pathname ""
631 :depends-on ("globals" "defmfun" "trigonometry" "algebraic-database" "utility-macros")
636 :depends-on ("ellipt"))
639 (:module reader :source-pathname ""
640 :depends-on ("globals" "defmfun" "compatibility-macros" "compatibility-macros1")
643 (:module display :source-pathname ""
644 :depends-on ("globals" "defmfun")
649 (:module gcd :source-pathname ""
650 :depends-on ("globals" "defmfun")
654 (:module documentation :source-pathname ""
655 :depends-on ("globals" "defmfun")
658 (:file "verify-html-index")))
659 (:module algebraic-database :source-pathname ""
660 :depends-on ("globals" "defmfun" "compatibility-macros1")
665 (:file "askp")) ;does this belong here?
667 (:module integration :source-pathname ""
668 :depends-on ("globals" "defmfun" "pattern-matching")
675 (:module taylor-series :source-pathname ""
676 :depends-on ("globals" "defmfun")
677 :components ((:file "hayat")))
678 (:module definite-integration :source-pathname ""
679 :depends-on ("globals" "defmfun")
683 (:module trigonometry :source-pathname ""
684 :depends-on ("globals" "pattern-matching" "defmfun")
689 (:module special-functions :source-pathname ""
690 :depends-on ("globals" "defmfun")
693 (:module matrix-algebra :source-pathname ""
694 :depends-on ("globals" "defmfun")
699 (:module determinants :source-pathname ""
700 :depends-on ("globals" "defmfun")
705 (:module pattern-matching :source-pathname ""
706 :depends-on ("globals" "defmfun" "compatibility-macros1")
712 (:module limits :source-pathname ""
713 :depends-on ("globals" "defmfun")
714 :components ((:file "tlimit")
716 (:module solve :source-pathname ""
717 :depends-on ("globals" "defmfun" "compatibility-macros1")
725 (:module debugging :source-pathname ""
726 :depends-on ("globals" "defmfun" "compatibility-macros1")
730 (:module miscellaneous :source-pathname ""
731 :depends-on ("globals" "defmfun" "pattern-matching" "compatibility-macros1")
745 (:file "rand-mt19937")
749 (:file "expintegral")
752 (:module polynomial :source-pathname ""
753 :depends-on ("defmfun")
755 ((:file "polynomialp")))
756 (:module poisson-series :source-pathname ""
757 :depends-on ("defmfun")
761 (:module translated-packages :source-pathname ""
762 :depends-on ("globals" "maxima-language-compiler-macros"
763 "compatibility-macros1"
771 (:file "hypergeometric")
773 ;; Comment in nfloat says hypergeometric needs to
775 :depends-on ("hypergeometric"))
776 (:file "todd-coxeter")
778 (:module graphics-drivers :source-pathname ""
779 :depends-on ("defmfun")
781 ((:file "gnuplot_def")
782 (:file "xmaxima_def")
783 (:file "geomview_def")))
784 (:module final :source-pathname ""
785 :depends-on ("globals" "defmfun")
786 ;; These are not compiled, for whatever reason, except on ecl:
787 ;; On ECL all runtime alterations to the system (i.e from repl)
788 ;; at runtime are not part of the final executable if they aren't.
790 #-ecl :load-only #-ecl t
794 ;; If a file is declared as private-file it is loaded
795 ;; from the build tree (which makes an out-of-tree
796 ;; build possible), but not compiled (which means
797 ;; that with ECL or ABCL it won't end up in the final image)
798 ;; => no out-of-tree build for ECL.
799 (:file "init-cl")))))