Changeset 12291


Ignore:
Timestamp:
12/06/09 12:07:23 (11 years ago)
Author:
Mark Evenson
Message:

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.

Location:
trunk/abcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/build.xml

    r12267 r12291  
    182182      <copy todir="${build.classes.dir}" preservelastmodified="yes">
    183183  <fileset dir="${src.dir}">
    184     <patternset refid="abcl.source.lisp"/>
     184          <patternset refid="abcl.source.lisp.dist"/>
    185185  </fileset>
    186186      </copy>
     
    203203    <target name="abcl.fasls.uptodate">
    204204      <uptodate property="abcl.fasls.uptodate.p" value="true">
    205   <srcfiles dir="${build.classes.dir}">
     205  <srcfiles dir="${src.dir}">
    206206    <patternset refid="abcl.source.lisp.fasls"/>
    207207  </srcfiles>
    208   <mapper type="glob" from="*.lisp" to="*.abcl"/>
     208  <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/>
    209209      </uptodate>
    210210    </target>
     
    217217      failonerror="true"
    218218      classname="org.armedbear.lisp.Main">
     219        <jvmarg value="-Dabcl.home=${abcl.home.dir}"/>
    219220  <arg value="--noinit"/>
    220221  <arg value="--eval"/>
    221   <arg value="(compile-system :zip nil :quit t)"/>
     222  <arg value="(compile-system :zip nil :quit t :output-path (symbol-name (quote ${build.classes.dir}/org/armedbear/lisp/)))"/>
    222223      </java>
    223224    </target>
     
    230231    </target>
    231232
     233    <property name="abcl.home.dir"
     234              value="${src.dir}/org/armedbear/lisp/"/>
    232235    <property name="abcl.version.path"
    233236        value="${build.classes.dir}/org/armedbear/lisp/version"/>
     
    241244      outputproperty="abcl.version"
    242245      classname="org.armedbear.lisp.Main"
    243         logerror="yes"> <!-- Don't catch stderr output -->
     246            logerror="yes"> <!-- Don't catch stderr output -->
     247        <jvmarg value="-Dabcl.home=${abcl.home.dir}"/>
    244248  <arg value="--noinit"/>
    245249  <arg value="--noinform"/>
     
    259263
    260264    <target name="abcl.jar.uptodate" depends="abcl.compile">
    261       <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}">
    262   <srcfiles dir="${build.classes.dir}">
    263     <patternset refid="abcl.objects"/>
    264   </srcfiles>
     265      <uptodate property="abcl.jar.upttodate.p" targetfile="${abcl.jar.path}">
     266        <srcfiles dir="${build.classes.dir}">
     267          <patternset refid="abcl.objects"/>
     268        </srcfiles>
    265269      </uptodate>
    266270    </target>
  • trunk/abcl/src/org/armedbear/lisp/Site.java

    r12290 r12291  
    4040import java.net.URLDecoder;
    4141
     42
    4243public final class Site
    4344{
     
    4546
    4647    static {
    47         String lispHome = null;
    48         URL url = Lisp.class.getResource("boot.lisp");
    49         if (url != null) {
    50             String protocol = url.getProtocol();
    51             if (protocol != null && protocol.equals("file")) {
    52                 String path = url.getPath();
    53                 try {
    54                     path = URLDecoder.decode(path, "UTF-8");
    55                 }
    56                 catch (java.io.UnsupportedEncodingException uee) {
    57                     // can't happen: Java implementations are required to
    58                     // support UTF-8
    59                 }
    60                 int index = path.lastIndexOf('/');
    61                 if (index >= 0) {
    62                     lispHome = path.substring(0, index + 1);
    63                     if (Utilities.isPlatformWindows) {
    64                         if (lispHome.length() > 0 && lispHome.charAt(0) == '/')
    65                             lispHome = lispHome.substring(1);
     48        String lispHome = System.getProperty("abcl.home");
     49        if (lispHome == null) {
     50            URL url = Lisp.class.getResource("boot.lisp");
     51            if (url != null) {
     52                String protocol = url.getProtocol();
     53                if (protocol != null && protocol.equals("file")) {
     54                    String path = url.getPath();
     55                    try {
     56                        path = URLDecoder.decode(path, "UTF-8");
     57                    }
     58                    catch (java.io.UnsupportedEncodingException uee) {
     59                        // can't happen: Java implementations are required to
     60                        // support UTF-8
     61                    }
     62                    int index = path.lastIndexOf('/');
     63                    if (index >= 0) {
     64                        lispHome = path.substring(0, index + 1);
     65                        if (Utilities.isPlatformWindows) {
     66                            if (lispHome.length() > 0 && lispHome.charAt(0) == '/')
     67                                lispHome = lispHome.substring(1);
     68                        }
    6669                    }
    6770                }
    6871            }
    69         } else
    70             lispHome = System.getProperty("abcl.home");
     72        }
    7173        LISP_HOME = lispHome;
    7274    }
Note: See TracChangeset for help on using the changeset viewer.