INSTALL.lisp correction



KONOVALOV, Vadim (Vadim)** CTR ** wrote:
>>>  attached is the correction for purely Lisp-based procedure
>> for SBCL.
>>>  the point is - shell script "maxima" within "src"
>> directory expects to
>>> have "core" file, not executable, so " :executable t" is
>> not correct.
>>
>> Instead why not change the script so that it expects an executable?
>
> I guess Makefile generates "maxima.core" binary compatible with
current shell script ./src/maxima, i.e. not an ELF but lisp memory
runable via "--core" parameter
>
>> That way SBCL need not be installed on the system which is going
>> to run Maxima, right?
>
> Yes, this is a nice feature.
> But having "core" files could also be useful for other purposes (for
debugging maxima under SLIME?)
>
> OTOH, if making executable, then it should be named other than
"maxima.core"
>
> Best regards,
> Vadim.
>

Dear Vadim,

I'm not entirely sure I understand you. As things stand, maxima assumes
that the lisp it was compiled with is around when it's run. For example,
if you're using sbcl, a maxima.core is generated in src/binary-sbcl and
then the maxima script runs something that's basically "sbcl --core
/path/to/maxima.core".

I'm not entirely sure whether sbcl can produce "stand-alone" executables
that don't need it to be installed, but atm this is not done.

Re debugging under slime, it does work: I presume you've got that
working, but if not, I wrote this (slightly naive) elisp function which
I find helpful when I've got more than one source tree. Clearly this
version only works with sbcl.

Hope this is useful to you,

Rupert



P.S. Has anyone had a look at that lisp testsuite stuff? Is anyone
interested? :)


P.P.S Sorry, Vadim, you're going to get this twice. I'm incompetent and
can't use reply all.


(defun get-parent-maxima-dir (startdir)
  (loop
   for dir = (file-name-as-directory (expand-file-name startdir))

   then (file-name-as-directory
         (expand-file-name (concat dir "..")))

   thereis
   (when (string= (file-name-nondirectory (directory-file-name dir))
                  "maxima") dir)

   never (string= dir "/")))

(defun canon-concat-dir-and-rel (dir rel)
  "Concatenate dir as a directory with rel, the relative file
name and then turn into an absolute filename."
  (expand-file-name (concat dir rel)))

(defun maxima-slime-here (&optional dir)
  (interactive)
  (let ((mdir (get-parent-maxima-dir (if dir dir "."))))
    (when mdir
      (setenv "MAXIMA_PREFIX" mdir)
      (slime-start
       :name 'cur-maxima
       :program "sbcl"
       :program-args (list
                      "--core"
                      (canon-concat-dir-and-rel
                       mdir "./src/binary-sbcl/maxima.core"))
       :init-function nil))))




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 370 bytes
Desc: OpenPGP digital signature
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080410/c9cc620d/attachment.pgp