axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Aldor compilation for Axiom


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Aldor compilation for Axiom
Date: Tue, 07 Nov 2006 00:02:17 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060909)

Hello Bill,

Thanks a lot for your answer.

On 11/06/2006 03:37 AM, Bill Page wrote:
On November 5, 2006 7:31 PM Ralf Hemmecke wrote:
could someone tell me what ")compile blah.as" is actually doing in Axiom?

It is certainly more than saying

aldor -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra blah.as

(without having an Axiom session running).

I think someone once said that )compile calls aldor with the above flags and then also generates object files from the .lsp
files.

Yes.

How could I achieve that from outside Axiom?

Do you mean generate stand alone object files from .lsp files? This
would be done with a Lisp compiler, of course. In principle you can
use GCL just like Axiom does, but you must also provide a Lisp
run-time. The Aldor distribution has such a lisp run-time that is
supposed to be equivalent to the Aldor C run-time environment, but
my initial attempts to use it with GCL ran into trouble - maybe
some GCL incompatibility with the lisp run-time source?

No no. I just want to compile files for later use within Axiom, but I don't want to start an interactive axiom session, obviously.

If you want to generate object files that can later be loaded into
Axiom, I am not sure that it is possible to do this outside of Axiom
because I suspect there symbols that are known only to Axiom. If you
discover a way, I would be quite interested. Remember that because
it is written in Lisp AXIOM really just GCL + a lot of extra Lisp code.
So internally in AXIOM, compiling Lisp to object code is done by the
same underlying GCL mechanisms.

Or is it enough to provide the .lsp files and the compilation to
object files is triggered when the code is first used?


No. You must compile the .lsp files inside Axiom.

Ralf, do you know section 18.12 : Using Aldor outside AXIOM for AXIOM
of the Aldor User's Guide?

http://www.aldor.org/docs/HTML/chap18.html#12

"When you are ready to test and use your code within AXIOM, start
up AXIOM and then )cd to the directory containing your compiled code.
Invoke )compile on each .lsp file you wish to use."

See also section 18.11.

Good point. I should really even more often read the AUG. But I usually read the .pdf version and there the part about AXIOM is missing. I hope the html doc does not get removed suddenly. Hopefully it is mirrored somewhere.

Further, I actually have a whole library (several .as files). What would be the right procedure to compile them externally
(I want to do that via Makefiles) and then provide some nice
mechanism to load the compiled library into Axiom.

Why compile "externally"? Why not just use Axiom in your Makefile,
the way it is currently done in the Axiom build. E.g.

myfile.NRLIB/code.o: myfile.as
        echo ')compile myfile.as' | AXIOMsys

Very good suggestion. It seems that I will take that approach. I have to test whether I still like it if some error occurs, though.

Hmmm, maybe I rather generate first a .al library and the .lsp files and only then use your approach to compile the .lsp files via AXIOMsys as you suggested.

I just need a rough overview.

I hope these comments are some some use.

Yes, definitely. Thanks a lot.

Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]