Changeset 11345


Ignore:
Timestamp:
10/11/08 22:01:04 (13 years ago)
Author:
ehuelsmann
Message:

Updates to build.xml (mostly assorted Windows fixes).

Patch by: Mark Evenson (evenson at panix dot com)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/build.xml

    r11338 r11345  
    6868    </target>
    6969
    70     <target name="j.stamp" depends="j.compile">
     70    <target name="j.stamp" depends="abcl.stamp,j.compile">
    7171      <echo message="${build}" file="${j.build.path}"/>   
    7272    </target>
    7373
    7474    <target name="abcl.stamp.version">
    75 <!-- XXX Not working, so use grep instead. 
    7675      <java fork="true"
    7776      classpath="${build.classes.dir}"
    7877      outputproperty="abcl.version"
    7978      classname="org.armedbear.lisp.Main">
    80   <arg value="- -noinit"/>
    81   <arg value="- -eval"/>
    82   <arg value="(lisp-implementation-version)"/>
     79  <arg value="--noinit"/>
     80  <arg value="--noinform"/>
     81  <arg value="--eval"/>
     82  <arg value="(progn (format t (lisp-implementation-version)) (finish-output) (quit))"/>
    8383      </java>
    84 -->
    85       <exec executable="grep"
    86       outputproperty="abcl.version">
    87   <arg value="--only-matching"/>
    88   <arg value="--max-count"/><arg value="1"/>
    89   <arg value="--regexp"/>
    90   <arg value="\([0-9]\+\.\)\+[0-9]"/>
    91   <arg value="${src.dir}/org/armedbear/lisp/Version.java"/>
    92       </exec>
     84
    9385      <echo>Building ABCL version: ${abcl.version}</echo>
    9486      <mkdir dir="${abcl.version.path}/.."/>
     
    115107      <include name="org/armedbear/lisp/*.lisp"/>
    116108      <include name="org/armedbear/lisp/tests/*.lisp"/>
    117 <!--      <include name="org/armedbear/lisp/awt/*.lisp"/> -->
    118109    </patternset>
    119110
     
    177168    </target>
    178169
     170    <target name="j.pre-compile" depends="abcl.pre-compile"/>
     171
    179172    <target name="abcl.pre-compile">
    180173      <!--- antversion fails in ant 1.7.1 <antversion property="ant.version"
     
    185178      <property name="j.compile.version.path"
    186179    value="${build.classes.dir}/org/armedbear/j/version"/>
    187       <exec executable="which"
    188       outputproperty="java.pathname">
    189   <arg value="java"/>
    190       </exec>
     180
     181      <property name="java.path"
     182    value="${java.home}/bin/java"/>
    191183
    192184      <exec executable="hostname" os="unix"
     
    225217    </target>
    226218
    227     <target name="j.compile" depends="abcl.compile">
     219    <target name="j.compile" depends="j.pre-compile">
    228220      <javac destdir="${build.classes.dir}"
    229221       debug="true"
     
    336328  <pathelement path="${additional.jars}"/>
    337329      </path>
    338    
     330      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
     331      <property name="java.options" value=""/>
     332
    339333      <copy file="abcl.in" toFile="${abcl.wrapper.file}" overwrite="yes">
    340334  <filterset>
    341335    <filter token="JAVA"
    342       value="${java.pathname}"/>
     336      value="${java.path}"/>
    343337    <filter token="ABCL_JAVA_OPTIONS"
    344       value= ""/>
     338      value= "${java.options}"/>
    345339    <filter token="ABCL_LIBPATH"
    346       value="${basedir}/dist/libabcl.so"/>
     340      value="${basedir}/src/org/armedbear/lisp/libabcl.so"/>
    347341    <filter token="ABCL_CLASSPATH"
    348342      value="${toString:abcl.runtime.classpath}"/>
     
    361355    </target>
    362356
    363     <target name="j.jar" depends="j.compile">
     357    <target name="j.jar" depends="j.compile,j.stamp">
    364358      <copy todir="${build.classes.dir}">
    365359  <fileset dir="${basedir}/src">
     
    418412
    419413    <target name="j.jpty" depends="j.jpty.compile"/>
    420     <target name="j.jpty.compile">
     414
     415    <target name="j.jpty.compile" if="unix">
    421416      <exec executable="gcc" dir="${src.dir}/jpty">
    422417  <arg line="-Wall -O2 jpty.c -o jpty"/>
     
    424419    </target>
    425420
    426     <target name="j.install" depends="j.install.unix, j.install.windows"/>
    427 
    428     <target name="install.unix" depends="j.jar,j.jpty" if="unix">
     421    <target name="j.install" depends="j.jar,j.install.unix,j.install.windows">
     422      <property name="j.install.data.dir" value="${j.install.root}/share"/>
     423      <property name="j.install.bin.dir" value="${j.install.root}/bin"/>
     424
     425      <mkdir dir="${j.install.data.dir}/j"/>
     426      <copy file="${dist.dir}/j.jar" todir="${j.install.data.dir}/j"/>
     427      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
     428      <property name="java.options" value=""/>
     429      <copy file="${j.wrapper.file}.in" toFile="${j.install.bin.dir}/${j.wrapper.file}">
     430  <filterset>
     431    <filter token="JAVA"
     432      value="${java.path}"/>
     433    <filter token="JAVA_OPTIONS"
     434      value="${java.options}"/>
     435    <filter token="CLASSPATH"
     436      value="${j.install.data.dir}/j/j.jar"/>
     437  </filterset>
     438      </copy>
     439      <chmod file="${j.install.bin.dir}/j" perm="ugo+rx"/>
     440
     441      <property name="j.install.themes.path"
     442    value="${j.install.data.dir}/j/themes"/>
     443      <mkdir dir="${j.install.themes.dir}"/>
     444      <copy todir="{j.install.themes.dir}">
     445  <fileset dir="${basedir}/themes"/>
     446      </copy>
     447
     448      <property name="j.install.doc.path"
     449    value="${j.install.data.dir}/doc/j"/>
     450      <mkdir dir="${j.install.doc.dir}" />
     451
     452      <copy file="${basedir}/src/jpty/jpty"
     453            todir="${j.install.bin.dir}"
     454      failonerror="false"/>
     455      <chmod file="${j.install.bin.dir}/jpty" perm="ugo+rx"/>
     456      <copy todir="${j.install.data.dir}/doc/j">
     457  <fileset dir="${basedir}/doc"/>
     458      </copy>
     459    </target>
     460
     461    <target name="j.install.unix" depends="j.jpty" if="unix">
    429462      <property name="j.install.root" value="/usr/local"/>
    430       <property name="j.install.data.path" value="${j.install.root}/share"/>
    431       <property name="j.install.bin.path" value="${j.install.root}/bin"/>
    432 
    433       <mkdir dir="${j.install.data.path}/j"/>
    434       <copy file="${dist}/j.jar" todir="${j.install.data.path}/j"/>
    435       <copy file="j.in" toFile="${j.install.bin.path}/j">
    436   <filterset>
    437     <filter token="ABCL_CLASSPATH"
    438       value="${j.install.data.path}/j/j.jar"/>
    439   </filterset>
    440       </copy>
    441       <chmod file="${j.install.bin.path}/j" perm="ugo+rx"/>
    442 
    443       <property name="j.install.themes.path"
    444     value="${j.install.data.path}/j/themes"/>
    445       <mkdir dir="${j.install.themes.path}"/>
    446       <copy todir="{j.install.themes.path}">
    447   <fileset dir="${basedir}/themes"/>
    448       </copy>
    449 
    450       <property name="j.install.doc.path"
    451     value="${j.install.data.path}/doc/j"/>
    452       <mkdir dir="${j.install.doc.path}" />
    453 
    454       <copy file="${basedir}/jpty/jpty" todir="${bindir}"/>
    455       <chmod file="${bindir}/jpty" perm="ugo+rx"/>
    456       <copy todir="${datadir}/doc/j">
    457   <fileset dir="${topdir}/doc"/>
    458       </copy>
    459     </target>
    460 
    461     <!-- Additional files to include in the source distributions relative to basedir -->
    462     <patternset id="abcl.source.misc">
     463      <property name="j.wrapper.file" value="j"/>
     464    </target>
     465
     466    <target name="j.install.windows" depends="j.jpty" if="windows">
     467      <property name="j.install.root" value="c:/j"/>
     468      <property name="j.wrapper.file" value="j.bat"/>
     469    </target>
     470
     471    <patternset id="abcl.source.misc"
     472    description="Additional includes in the source distributions relative to basedir">
    463473      <include name="build.xml"/>
    464474      <include name="build.properties.in"/>
     
    511521
    512522    <import file="netbeans-build.xml" optional="true"/>
    513     <import file="j-build.xml" optional="true"/>
     523<!--    <import file="j-build.xml" optional="true"/>  -->
    514524    <import file="not.org-build.xml" optional="true"/>
    515525</project>
Note: See TracChangeset for help on using the changeset viewer.