[armedbear-cvs] r12291 - in trunk/abcl: . src/org/armedbear/lisp
Mark Evenson
mevenson at common-lisp.net
Sun Dec 6 12:07:26 UTC 2009
Author: mevenson
Date: Sun Dec 6 07:07:23 2009
New Revision: 12291
Log:
Ant-based build process now records FASL source locations correctly.
Now we no longer copy the Lisp system sources to the build directory,
instead directly referring to the actual source location. As a
result, the FASLs now correctly record the location of the system
source files. This makes using SLIME to edit system source a lot
saner.
Specifying the JVM property 'abcl.home' now overrides the dynamic
lookup for 'boot.lisp' on the classpath of org.armedbear.lisp.Lisp for
setting the EXT::*LISP-HOME* property.
Modified:
trunk/abcl/build.xml
trunk/abcl/src/org/armedbear/lisp/Site.java
Modified: trunk/abcl/build.xml
==============================================================================
--- trunk/abcl/build.xml (original)
+++ trunk/abcl/build.xml Sun Dec 6 07:07:23 2009
@@ -181,7 +181,7 @@
<target name="abcl.copy.lisp">
<copy todir="${build.classes.dir}" preservelastmodified="yes">
<fileset dir="${src.dir}">
- <patternset refid="abcl.source.lisp"/>
+ <patternset refid="abcl.source.lisp.dist"/>
</fileset>
</copy>
</target>
@@ -202,10 +202,10 @@
<target name="abcl.fasls.uptodate">
<uptodate property="abcl.fasls.uptodate.p" value="true">
- <srcfiles dir="${build.classes.dir}">
+ <srcfiles dir="${src.dir}">
<patternset refid="abcl.source.lisp.fasls"/>
</srcfiles>
- <mapper type="glob" from="*.lisp" to="*.abcl"/>
+ <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/>
</uptodate>
</target>
@@ -216,9 +216,10 @@
fork="true"
failonerror="true"
classname="org.armedbear.lisp.Main">
+ <jvmarg value="-Dabcl.home=${abcl.home.dir}"/>
<arg value="--noinit"/>
<arg value="--eval"/>
- <arg value="(compile-system :zip nil :quit t)"/>
+ <arg value="(compile-system :zip nil :quit t :output-path (symbol-name (quote ${build.classes.dir}/org/armedbear/lisp/)))"/>
</java>
</target>
@@ -229,6 +230,8 @@
<echo message="${build}" file="${abcl.build.path}"/>
</target>
+ <property name="abcl.home.dir"
+ value="${src.dir}/org/armedbear/lisp/"/>
<property name="abcl.version.path"
value="${build.classes.dir}/org/armedbear/lisp/version"/>
<target name="abcl.stamp.version" depends="abcl.compile">
@@ -240,7 +243,8 @@
classpath="${build.classes.dir}"
outputproperty="abcl.version"
classname="org.armedbear.lisp.Main"
- logerror="yes"> <!-- Don't catch stderr output -->
+ logerror="yes"> <!-- Don't catch stderr output -->
+ <jvmarg value="-Dabcl.home=${abcl.home.dir}"/>
<arg value="--noinit"/>
<arg value="--noinform"/>
<arg value="--eval"/>
@@ -258,10 +262,10 @@
</target>
<target name="abcl.jar.uptodate" depends="abcl.compile">
- <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}">
- <srcfiles dir="${build.classes.dir}">
- <patternset refid="abcl.objects"/>
- </srcfiles>
+ <uptodate property="abcl.jar.upttodate.p" targetfile="${abcl.jar.path}">
+ <srcfiles dir="${build.classes.dir}">
+ <patternset refid="abcl.objects"/>
+ </srcfiles>
</uptodate>
</target>
Modified: trunk/abcl/src/org/armedbear/lisp/Site.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Site.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Site.java Sun Dec 6 07:07:23 2009
@@ -39,35 +39,37 @@
import java.net.URL;
import java.net.URLDecoder;
+
public final class Site
{
private static final String LISP_HOME;
static {
- String lispHome = null;
- URL url = Lisp.class.getResource("boot.lisp");
- if (url != null) {
- String protocol = url.getProtocol();
- if (protocol != null && protocol.equals("file")) {
- String path = url.getPath();
- try {
- path = URLDecoder.decode(path, "UTF-8");
- }
- catch (java.io.UnsupportedEncodingException uee) {
- // can't happen: Java implementations are required to
- // support UTF-8
- }
- int index = path.lastIndexOf('/');
- if (index >= 0) {
- lispHome = path.substring(0, index + 1);
- if (Utilities.isPlatformWindows) {
- if (lispHome.length() > 0 && lispHome.charAt(0) == '/')
- lispHome = lispHome.substring(1);
+ String lispHome = System.getProperty("abcl.home");
+ if (lispHome == null) {
+ URL url = Lisp.class.getResource("boot.lisp");
+ if (url != null) {
+ String protocol = url.getProtocol();
+ if (protocol != null && protocol.equals("file")) {
+ String path = url.getPath();
+ try {
+ path = URLDecoder.decode(path, "UTF-8");
+ }
+ catch (java.io.UnsupportedEncodingException uee) {
+ // can't happen: Java implementations are required to
+ // support UTF-8
+ }
+ int index = path.lastIndexOf('/');
+ if (index >= 0) {
+ lispHome = path.substring(0, index + 1);
+ if (Utilities.isPlatformWindows) {
+ if (lispHome.length() > 0 && lispHome.charAt(0) == '/')
+ lispHome = lispHome.substring(1);
+ }
}
}
}
- } else
- lispHome = System.getProperty("abcl.home");
+ }
LISP_HOME = lispHome;
}
More information about the armedbear-cvs
mailing list