From: Peter Graves <peter@ar...> - 2004-08-03 14:07:27
I've checked in build-abcl.lisp and customizations.lisp.
This is the tool I normally use to build abcl. It doesn't do absolutely
everything you might want to do (for example, it doesn't jar up the
=2Eclass files or create a script that launches abcl). But it's fast, it
works on both Linux and Windows, it's tolerant of whitespace oddities,
and it doesn't use XML.
You'll need to edit customizations.lisp to suit your situation.
I normally use jikes, which is faster than javac.
On Linux, I always use jikes 1.18, because every later version of jikes
seems to have some problem building j (note j here, not abcl), and 1.18
works fine. I use a 1.4 JDK, because jikes 1.18 has problems with 1.5;
the resulting class files nevertheless work fine with 1.5 (which is my
preferred version of Java these days).
Looking at customizations.lisp, I apparently have gotten jikes 1.21 and
the 1.5 JDK to work on Win2K, but I don't remember the details.
Here are two usage scenarios:
1. Get yourself a shell looking at the root directory of the j
distribution, where build-abcl.lisp and customizations.lisp live.
2. Fire up sbcl or abcl
3. (load "build-abcl")
4. (build-abcl :force t)
B. Inside j
1. Run j.
2. Do Alt X, "jlisp" (or "Run Embedded Lisp" from the Lisp menu).
(This is one time when you do want to use the Lisp embedded in j!)
3. :cd <root directory of j distribution>
4. :ld build-abcl
5. Ctrl W (to close the jlisp window)
6. Open a buffer looking at src/org/armedbear/lisp/Lisp.java (or
any other Java file in the src/org/armedbear/lisp directory).
7. F9 (or Alt X, "compile")
8. Enter "(build-abcl :force t)" in the "Compile command:" text
box, and hit Enter.
9. A compilation buffer will open. Wait until the build completes.
Hit Escape to close the compilation buffer. (Note that if there are
compilation errors, you can use F4 to navigate to them, as usual.
See the section entitled "Compilation Buffers" in j's help system.)
I think you could eliminate steps 2-5 of scenario B by putting
(autoload 'build-abcl "/home/peter/depot/j/build-abcl")
in ~/.j/init.lisp (untested). (Your path may vary.)
It shouldn't be hard to add support for other Lisps in scenario A;
you'd just need to provide implementations of RUN-SHELL-COMMMAND and
PROBE-DIRECTORY (you get both of these for free with abcl); look at
build- abcl.lisp around line 15. (The provided implementation of PROBE-
DIRECTORY should work for any Lisp that adheres to the convention of
terminating directory pathnames with a path separator character.)
If you omit ":force t" when invoking BUILD-ABCL, only those classes
will be rebuilt whose .java files have changed. On my system, it only
takes 2-3 seconds to rebuild everything, so I always use ":force t".
Note that if you're doing the build inside j, after you've done it
once, you can use Ctrl F9 (or Alt X, "recompile") to do it again
without being prompted for the compile command.