From: Mark E. <ev...@pa...> - 2008-09-18 14:05:36
Attachments:
build.xml.diff
|
For a pure ABCL ANt based build system, move the existing 'build.xml' to 'j-build.xml', and apply the attached patch. Invoke via shell$ ant abcl.jar which should result in a runnable 'abcl.jar'. As opposed to the build-abcl.lisp way of building ABCL, this buildfile requires no other installed Lisp (i.e. ABCL compiles its own fasls purely from a JVM). Mark <ev...@pa...> -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-09-25 09:56:04
|
On Thu, Sep 18, 2008 at 11:05 PM, Mark Evenson <ev...@pa...> wrote: > For a pure ABCL ANt based build system, move the existing 'build.xml' to > 'j-build.xml', and apply the attached patch. > > Invoke via > > shell$ ant abcl.jar > > which should result in a runnable 'abcl.jar'. > > As opposed to the build-abcl.lisp way of building ABCL, this buildfile > requires no other installed Lisp (i.e. ABCL compiles its own fasls purely > from a JVM). > > Mark <ev...@pa...> Unfortunately, the submitted patch has not received the attention it deserves. Could someone on this list with Ant experience provide review, please? As I've stated before, I'm very much unqualified to review these changes. Mark, this is not lack of trust, however, I'm trying to do what I do with all patches: make sure they've been reviewed before they go in. If nobody can provide review, we'll work through the patch on IRC. Unfortunately, I'll be unavailable all weekend. Bye, Erik. > Index: build.xml > =================================================================== > --- build.xml (revision 11323) > +++ build.xml (working copy) > @@ -1,336 +1,138 @@ > -<project name="j" default="compile" basedir="./src"> > +<?xml version="1.0" encoding="UTF-8"?> > +<project xmlns="antlib:org.apache.tools.ant" > + name="abcl-master" default="abcl.jar" basedir="."> > + <description>Armed Bear Common Lisp</description> > +<!-- antversion seemingly not working, but left to mark versioning. --> > +<!-- <antversion property="ant.version" atleast="1.7"/> --> > > - <!-- Set global properties for this build --> > - <property name="version" value="0.21.0.4+"/> > - <property name="topdir" value="${basedir}/.."/> > - <property name="distdir" value="/tmp/j-${version}"/> > - <property file="${topdir}/build.properties"/> > - <property name="java" value="${jdk}/jre/bin/java"/> > - <property name="java_options" value=""/> > - <property name="extensions" value=""/> > - <property name="junit" value=""/> > - <property name="datadir" value="/usr/local/share"/> > - <property name="bindir" value="/usr/local/bin"/> > +<!-- <import file="netbeans-build.xml"/> --> > +<!-- <import file="j-build.xml"/> --> > > - <property name="build.compiler.emacs" value="yes"/> > + <property name="build.dir" > + value="${basedir}/build"/> > + <property name="build.classes.dir" > + value="${build.dir}/classes"/> > + <property name="dist.dir" > + value="${basedir}/dist"/> > > - <property name="JAVA" value="${java}"/> > - <property name="JAVA_OPTIONS" value="${java_options}"/> > + <property name="relative.lisp.dir.path" > + value="org/armedbear/lisp"/> > > - <property name="debug" value="no"/> > + <property name="abcl.lisp.src.build.dir" > + value="${build.classes.dir}/${relative.lisp.dir.path}"/> > > - <path id="classpath"> > - <pathelement location="${basedir}"/> > - <pathelement location="${datadir}/j/j.jar"/> > - <pathelement path="${extensions}"/> > - <pathelement path="${jdk}/lib/tools.jar"/> > - </path> > + <property name="abcl.jar.path" > + value="${dist.dir}/abcl.jar"/> > + > + <fileset id="abcl.lisp.src.fileset" > + dir="src/${relative.lisp.dir.path}"> > + <include name="*.lisp"/> > + </fileset> > > - <property name="CLASSPATH" refid="classpath"/> > + <patternset id="abcl.objects"> > + <include name="org/armedbear/lisp/*.class"/> > + <include name="org/armedbear/lisp/*.cls"/> > + <include name="org/armedbear/lisp/*.abcl"/> > + </patternset> > + > + <patternset id="j.source"> > + <include name="Main.java"/> > + <include name="gnu/regexp/*.java"/> > + <include name="org/armedbear/j/**/*.java"/> > + </patternset> > > - <path id="abcl_classpath"> > - <pathelement location="${basedir}"/> > - </path> > - > - <property name="ABCL_CLASSPATH" refid="abcl_classpath"/> > - > - <target name="prepare"> > - <!-- Create the time stamp --> > - <tstamp> > - <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/> > - </tstamp> > - <condition property="unix"> > - <os family="unix"/> > - </condition> > - <condition property="windows"> > - <os family="windows"/> > - </condition> > - <available > - classname="com.sun.jdi.Bootstrap" > - classpath="${jdk}/jre/lib/rt.jar:${extensions}:${jdk}/lib/tools.jar" > - property="jpda.present" > - /> > - <available file="org/armedbear/lisp/Interpreter.java" > property="lisp.present"/> > - </target> > - > - <target > - name="compile" > - depends="classes, jdbclasses, lispclasses, stamp, stamp.hostname" > - /> > - > - <target name="lisp" depends="lispclasses"/> > - > - <target name="classes" depends="prepare"> > - <echo message="debug=${debug}" /> > - <javac > - srcdir="." > - destdir="${basedir}" > - classpath="${basedir}:${jdk}/jre/lib/rt.jar:${extensions}" > - includeAntRuntime="no" > - excludes="org/armedbear/j/_darcs/**/*,org/armedbear/lisp/**/*, > org/armedbear/j/jdb/**/*" > - debug="${debug}" > - /> > - </target> > - > - <target name="jdbclasses" depends="prepare" if="jpda.present"> > - <echo message="debug=${debug}" /> > - <javac > - srcdir="." > - destdir="${basedir}" > - > classpath="${basedir}:${jdk}/jre/lib/rt.jar:${extensions}:${jdk}/lib/tools.jar" > - includeAntRuntime="no" > - includes="org/armedbear/j/jdb/*" > - debug="${debug}" > - /> > - </target> > - > - <target name="lispclasses" depends="prepare" if="lisp.present"> > - <echo message="debug=${debug}" /> > - <javac > - srcdir="." > - destdir="${basedir}" > - classpath="${basedir}:${jdk}/jre/lib/rt.jar:${junit}" > - includeAntRuntime="no" > - includes="org/armedbear/lisp/**/*" > - excludes="org/armedbear/lisp/_darcs/**/*" > - debug="${debug}" > - /> > - <echo message="${build} " > file="${basedir}/org/armedbear/lisp/build"/> > - </target> > - > - <target name="stamp"> > - <echo message="${version} " > file="${basedir}/org/armedbear/j/version"/> > - <echo message="${build} " file="${basedir}/org/armedbear/j/build"/> > - <exec executable="hostname" os="Linux" outputproperty="hostname"/> > - </target> > - > - <target name="stamp.hostname" if="unix"> > - <exec executable="hostname" outputproperty="hostname"/> > - <echo message="${hostname} " > file="${basedir}/org/armedbear/j/build" append="yes"/> > - </target> > - > - <!-- FIXME If snapshots have version numbers, we don't need this any > more. --> > - <target name="stamp.snapshot"> > - <echo message="${build} " > file="${basedir}/org/armedbear/j/snapshot"/> > - </target> > - > - <target name="all" depends="all.unix, all.windows"/> > - > - <target name="all.unix" depends="j.jar, jpty" if="unix"> > - <filter token="JAVA" value="${JAVA}"/> > - <filter token="JAVA_OPTIONS" value="${JAVA_OPTIONS}"/> > - <filter token="CLASSPATH" value="${CLASSPATH}"/> > - <copy file="${topdir}/j.in" tofile="${topdir}/j" filtering="yes" > overwrite="yes"/> > - <chmod file="${topdir}/j" perm="ugo+rx"/> > - </target> > - > - <target name="all.windows" depends="j.jar, jpty" if="windows"> > - <filter token="JAVA" value="${JAVA}"/> > - <filter token="JAVA_OPTIONS" value="${JAVA_OPTIONS}"/> > - <filter token="CLASSPATH" value="${CLASSPATH}"/> > - <filter token="ABCL_CLASSPATH" value="${ABCL_CLASSPATH}"/> > - <copy file="${topdir}/j.bat.in" tofile="${topdir}/j.bat" > filtering="yes" overwrite="yes"/> > - <copy file="${topdir}/abcl.bat.in" tofile="${topdir}/abcl.bat" > filtering="yes" overwrite="yes"/> > - </target> > - > - <target name="j.jar" depends="compile, fasls"> > - <jar jarfile="../j.jar" manifest="manifest" basedir="${basedir}"> > - <exclude name="pg.class"/> > - <exclude name="SampleExtension.class"/> > - <exclude name="org/armedbear/lisp/Tests.class"/> > - <include name="**/*.class"/> > + <patternset id="j.resources"> > <include name="**/*.keywords"/> > <include name="org/armedbear/j/version"/> > <include name="org/armedbear/j/build"/> > <include name="org/armedbear/j/snapshot"/> > <include name="org/armedbear/j/images/*.png"/> > <include name="gnu/regexp/MessagesBundle.properties"/> > - <include name="org/armedbear/lisp/build"/> > - <include name="org/armedbear/lisp/*.lisp"/> > - <include name="org/armedbear/lisp/*.abcl"/> > - <include name="org/armedbear/lisp/*.cls"/> > - </jar> > - </target> > + </patternset> > > - <target name="jpty" if="jpty"> > - <ant antfile="jpty/build.xml"/> > - </target> > + <target name="abcl.compile" depends="abcl.compile.fasl"/> > > - <target name="fasls"> > - <exec executable="${java}" dir="${basedir}"> > - <!-- Use the server VM to avoid stack overflow (Java 1.5, > Windows).--> > - <arg line="-server -cp . org.armedbear.lisp.Main --noinit --eval > '(compile-system :zip nil :quit t)'"/> > - </exec> > - </target> > + <target name="abcl.pre-compile"> > + <mkdir dir="${build.dir}"/> > + <mkdir dir="${build.classes.dir}"/> > + <mkdir dir="${dist.dir}"/> > + </target> > + > + <target name="abcl.compile.java" depends="abcl.pre-compile"> > + <javac destdir="${build.classes.dir}" > + debug="true" > + target="1.5"> > + <src path="${basedir}/src"/> > + <include name="${relative.lisp.dir.path}/*.java"/> > + </javac> > + </target> > > - <!-- Install --> > - <target name="install" depends="install.unix, install.windows"/> > + <target name="j.compile" depends="abcl.compile"> > + <javac destdir="${build.classes.dir}" > + debug="true" > + target="1.5"> > + <src path="${basedir}/src"/> > + <patternset refid="j.source"/> > + </javac> > + </target> > > - <target name="install.unix" depends="all" if="unix"> > - <mkdir dir="${datadir}/j"/> > - <mkdir dir="${datadir}/j/themes"/> > - <mkdir dir="${datadir}/doc/j" /> > - <copy file="${topdir}/j.jar" todir="${datadir}/j"/> > - <copy file="${topdir}/j" todir="${bindir}"/> > - <chmod file="${bindir}/j" perm="ugo+rx"/> > - <copy file="${basedir}/jpty/jpty" todir="${bindir}"/> > - <chmod file="${bindir}/jpty" perm="ugo+rx"/> > - <copy todir="${datadir}/j/themes"> > - <fileset dir="${topdir}/themes"/> > - </copy> > - <copy todir="${datadir}/doc/j"> > - <fileset dir="${topdir}/doc"/> > - </copy> > - </target> > + <target name="abcl.copy.lisp"> > + <copy todir="${abcl.lisp.src.build.dir}"> > + <fileset refid="abcl.lisp.src.fileset"/> > + </copy> > + </target> > + > + <target name="abcl.compile.fasl" > depends="abcl.copy.lisp,abcl.compile.java"> > + <java classpath="${build.classes.dir}" > + fork="true" > + classname="org.armedbear.lisp.Main"> > + <arg value="--noinit"/> > + <arg value="--eval"/> > + <arg value="(compile-system :zip nil :quit t)"/> > + </java> > + </target> > > - <target name="install.windows" depends="all" if="windows"> > - <mkdir dir="${datadir}/j"/> > - <mkdir dir="${datadir}/j/themes"/> > - <mkdir dir="${datadir}/doc/j" /> > - <copy file="${topdir}/j.jar" todir="${datadir}/j"/> > - <copy file="${topdir}/j.bat" todir="${bindir}"/> > - <copy file="${basedir}/jpty/jpty.exe" todir="${bindir}"/> > - <copy todir="${datadir}/j/themes"> > - <fileset dir="${topdir}/themes"/> > - </copy> > - <copy todir="${datadir}/doc/j"> > - <fileset dir="${topdir}/doc"/> > - </copy> > - </target> > + <target name="abcl.jar" depends="abcl.compile"> > + <jar destfile="${abcl.jar.path}" > + compress="true" > + basedir="${build.classes.dir}"> > + <patternset refid="abcl.objects"/> > + <manifest> > + <attribute name="Main-Class" value="org.armedbear.lisp.Main"/> > + <section name="org/armedbear/lisp"> > + <attribute name="Implementation-Title" value="ABCL"/> > + <attribute name="Implementation-Version" value="0.0.10.21"/> > + </section> > + </manifest> > + </jar> > + </target> > + > + <target name="j.jar" depends="j.compile"> > + <copy todir="${build.dir.classes}"> > + <fileset dir="${basedir}/src"> > + <pattern refid="j.objects"/> > + <pattern refid="j.resources"/> > + </fileset> > + </copy> > + <jar destfile="${j.jar.path}" > + compress="true" > + basedir="${build.classes.dir}"> > + </jar> > + </target> > > - <!-- Uninstall --> > - <target name="uninstall"> > - <delete file="${datadir}/j/j.jar" verbose="true"/> > - <delete file="${bindir}/j" verbose="true"/> > - <delete file="${bindir}/jpty" verbose="true"/> > - <delete file="${bindir}/jpty.exe" verbose="true"/> > - <delete verbose="true"> > - <fileset dir="${datadir}/j/themes"/> > - </delete> > - <delete verbose="true"> > - <fileset dir="${datadir}/doc/j"/> > - </delete> > - </target> > + > + <target name="abcl.clean"> > + <delete dir="${build.dir}"/> > + </target> > > - <target name="clean"> > - <delete> > - <fileset dir="${topdir}" includes="**/*.zip"/> > - <fileset dir="${topdir}" includes="**/*.tar.gz"/> > - <fileset dir="${topdir}" includes="**/*.jar"/> > - <fileset dir="${topdir}" includes="**/*.class"/> > - <fileset dir="${topdir}" includes="**/*.abcl"/> > - <fileset dir="${topdir}" includes="**/*.cls"/> > - <fileset dir="${topdir}" includes="**/*~"/> > - <fileset dir="${topdir}" includes="**/.#*"/> > - <fileset dir="${topdir}" includes="**/TEST-*.txt"/> > - </delete> > - <delete dir="${topdir}/autom4te.cache"/> > - <delete file="${topdir}/j"/> > - <delete file="${topdir}/j.bat"/> > - <delete file="${basedir}/jpty/jpty"/> > - <delete file="${basedir}/jpty/jpty.exe"/> > - <delete file="${basedir}/org/armedbear/j/version"/> > - <delete file="${basedir}/org/armedbear/j/build"/> > - </target> > + <target name="TAGS"> > + <apply executable="etags" parallel="true" verbose="true"> > + <fileset dir="src"> > + <include name="**/*.java"/> > + <include name="**/*.lisp"/> > + </fileset> > + </apply> > + </target> > > - <!-- Distribution --> > - <target name="dist" depends="prepare, distdir" if="unix"> > - <tar tarfile="${topdir}/j-${version}.tar" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </tar> > - <gzip zipfile="${topdir}/j-${version}.tar.gz" > src="${topdir}/j-${version}.tar"/> > - <delete file="${topdir}/j-${version}.tar"/> > - <zip zipfile="${topdir}/j-${version}.zip" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </zip> > - </target> > - > - <target name="distdir" depends="prepare" if="unix"> > - <delete dir="${distdir}"/> > - <mkdir dir="${distdir}"/> > - <copy todir="${distdir}"> > - <fileset dir="${topdir}"> > - <exclude name="**/*.orig"/> > - <exclude name="**/*.class"/> > - <exclude name="**/*.jar"/> > - <exclude name="**/*.zip"/> > - <exclude name="**/*.tar"/> > - <exclude name="**/*.tar.gz"/> > - <exclude name="src/test/**"/> > - <exclude name="src/org/armedbear/lisp/lisp"/> > - <exclude name="**/Makefile"/> > - <exclude name="config.*"/> > - <exclude name="autom4te.cache/**"/> > - <exclude name="**/classes.stamp"/> > - <exclude name="**/build"/> > - <exclude name="**/version"/> > - <exclude name="**/j"/> > - <exclude name="**/j.bat"/> > - <exclude name="**/jpty"/> > - <exclude name="**/ChangeLog"/> > - </fileset> > - </copy> > - </target> > - > - <target name="bindist" depends="prepare, bindistdir" if="unix"> > - <tar tarfile="${topdir}/j-${version}-binary.tar" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </tar> > - <gzip zipfile="${topdir}/j-${version}-binary.tar.gz" > src="${topdir}/j-${version}-binary.tar"/> > - <delete file="${topdir}/j-${version}-binary.tar"/> > - <zip zipfile="${topdir}/j-${version}-binary.zip" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </zip> > - </target> > - > - <target name="bindistdir" depends="release" if="unix"> > - <delete dir="${distdir}"/> > - <mkdir dir="${distdir}"/> > - <copy todir="${distdir}"> > - <fileset dir="${topdir}"> > - <include name="j.jar"/> > - <include name="COPYING"/> > - <include name="doc/*.html"/> > - <include name="doc/*.css"/> > - <include name="themes/*"/> > - <include name="examples/*"/> > - </fileset> > - </copy> > - </target> > - > - <!-- Build j.jar from scratch without debug information --> > - <target name="release" depends="prepare, clean"> > - <antcall target="j.jar"> > - <param name="debug" value="no"/> > - <param name="build.compiler" value="javac1.4"/> > - </antcall> > - </target> > - > - <target name="snapshot" depends="clean, prepare, stamp.snapshot, j.zip, > j-jar.zip"> > - <delete file="${basedir}/org/armedbear/j/snapshot"/> > - </target> > - > - <target name="j.zip"> > - <delete file="${topdir}/j.zip"/> > - <zip > - zipfile="${topdir}/j.zip" > - basedir="${topdir}" > - excludes="src/TEST-*.txt, **/*.orig, **/*.class, **/*.jar, **/*.zip, > - src/test/**, **/Makefile, > - config.status, config.cache, config.log, autom4te.cache/**, > - **/classes.stamp, **/build, **/version, > - **/j, **/j.bat, **/jpty, **/ChangeLog, src/org/armedbear/lisp/lisp" > - /> > - </target> > - > - <target name="j-jar.zip"> > - <delete file="${topdir}/j-jar.zip"/> > - <delete file="${topdir}/j.jar"/> > - <antcall target="j.jar"> > - <param name="debug" value="yes"/> > - <param name="build.compiler" value="javac1.4"/> > - </antcall> > - <zip zipfile="${topdir}/j-jar.zip" basedir="${topdir}" > includes="j.jar"/> > - </target> > - > </project> > + > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > armedbear-j-devel mailing list > arm...@li... > https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel > > |
From: Mark E. <ev...@pa...> - 2008-09-25 10:41:08
|
XXXXXXXXXXXXXX wrote: […] > Mark, this is not lack of trust, however, I'm > trying to do what I do with all patches: make sure they've been > reviewed before they go in. […] Understood, and no problem from my end: until we distribute the commit rights in some sort of trusted manner, I appreciate your commitment to review things before they go in. Let me know how I can help, Mark -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: Ville V. <vil...@gm...> - 2008-09-25 19:45:57
|
Hi Mark, am I still supposed to run configure before the ant build, or should the ant build build everything? It doesn't seem to generate the abcl launcher script (abcl), for instance. |
From: Mark E. <ev...@pa...> - 2008-09-26 08:36:17
|
Ville Voutilainen wrote: > Hi Mark, am I still supposed to run configure before the ant build, or > should the > ant build build everything? It doesn't seem to generate the abcl launcher script > (abcl), for instance. The 'build.xml' produces the file 'dist/abcl.jar' that one can invoke via 'java -jar dist/abcl.jar'. Running 'configure' is not necessary for the direction I was going here, but I am definitely missing the production of the 'abcl' wrapper. Looking at my patch again, I can see that its a good start for feedback, but maybe we shouldn't include it in the canonical source tree quite yet, so let me describe the current situation as I see it. I should be able to provide a new set of patches pretty fast, that can be reviewed, if I get a general 'thumbs-up/thumbs-down' with this direction. There are currently three (3) build systems for ABCL: 1) autoconf ('configure')-based system that accepts a '--prefix' argument as a location to install both a 'j' and an 'abcl' outside of the source tree. This should work on "any" UNIX, but requires cygwin installed to work under win32. This doesn't work well under MacOSX as it is a bit confusing as to what argument to pass to '--jdkhome'. Also builds distribution targets of the compiled source tree for distribution. 2) the 'build-abcl.lisp' path that runs in an existing Lisp (I've tested it with SBCL, CLISP, and ABCL itself), creating an executable 'abcl' that runs in-place where the source tree is rooted. It produces an 'abcl' launcher script. Nothing of J is touched or used. Capable of building an ABCL distribution under Linux only. 3) The current 'build.xml' that requires that Ant be installed. This installs 'J' outside of the current source tree. ABCL is only usable within the J editor itself. Works under win32, UNIX, and MacOSX I would propose to scrap the 'autoconf' based system, folding all of its functionality into an Ant based system. This new 'build.xml' would build an in-place runnable 'abcl' script in the top-level directory like the current system does by default. By invoking the right targets, 'J' could also be built to run in-place. Additional targets would make separate distributions for 'ABCL' and 'J' which would tar/zip up the runnable in-place distributions with and without source (i.e. there would be four targets). Additional targets would install runnable 'J' and 'ABCL' instances locally via '--prefix' like arguments. Optionally, we could retain the 'autoconf' based system as a thin wrapper to discover a locally installed Ant, and then invoke it. This would be comfortable for UNIX developers used to such things (and balk at being presented with a 'build.xml' which always seems to be different from the previous ones). I would do this in a second set of patches. The upside of my proposal would be to reduce code that is duplicated in 'build.xml' and the various 'autoconf' artifacts. It would also start to separate 'J' from 'ABCL', at least conceptually in the build system. The downside of my proposal is to require 'Ant' to be installed to build 'J' (one could still use 'build-abcl.lisp' to produce 'ABCL'). In this day and age requiring having an installed Ant seems like a low requirement. I would produce the necessary patches for the new 'build.xml' and write an accompanying document describing how to use it, outlining the "user accessible" targets with short descriptions. Comments? Mark <ev...@pa...> -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-10-04 18:40:44
|
On Fri, Sep 26, 2008 at 10:36 AM, Mark Evenson <ev...@pa...> wrote: > Ville Voutilainen wrote: >> Hi Mark, am I still supposed to run configure before the ant build, or >> should the >> ant build build everything? It doesn't seem to generate the abcl launcher script >> (abcl), for instance. > > The 'build.xml' produces the file 'dist/abcl.jar' that one can invoke > via 'java -jar dist/abcl.jar'. Running 'configure' is not necessary for > the direction I was going here, but I am definitely missing the > production of the 'abcl' wrapper. > > Looking at my patch again, I can see that its a good start for feedback, > but maybe we shouldn't include it in the canonical source tree quite > yet, so let me describe the current situation as I see it. I should be > able to provide a new set of patches pretty fast, that can be reviewed, > if I get a general 'thumbs-up/thumbs-down' with this direction. > > There are currently three (3) build systems for ABCL: > > 1) autoconf ('configure')-based system that accepts a '--prefix' > argument as a location to install both a 'j' and an 'abcl' outside of > the source tree. This should work on "any" UNIX, but requires cygwin > installed to work under win32. This doesn't work well under MacOSX as > it is a bit confusing as to what argument to pass to '--jdkhome'. Also > builds distribution targets of the compiled source tree for distribution. > > 2) the 'build-abcl.lisp' path that runs in an existing Lisp (I've > tested it with SBCL, CLISP, and ABCL itself), creating an executable > 'abcl' that runs in-place where the source tree is rooted. It produces > an 'abcl' launcher script. Nothing of J is touched or used. Capable of > building an ABCL distribution under Linux only. Right, but building ABCL is possible on Win32 with this setup if you use either ABCL or CLISP (I use this way of building ABCL during development). > 3) The current 'build.xml' that requires that Ant be installed. This > installs 'J' outside of the current source tree. ABCL is only usable > within the J editor itself. Works under win32, UNIX, and MacOSX I don't think it's very weird for a Java project to require Ant. Having option (2) to fall back to for the build of ABCL for the Lisp hackers without a Java setup, I guess we've covered the full spectrum of possible users. > I would propose to scrap the 'autoconf' based system, folding all of its > functionality into an Ant based system. +1 (or: yes, agreed.) > This new 'build.xml' would > build an in-place runnable 'abcl' script in the top-level directory like > the current system does by default. By invoking the right targets, 'J' > could also be built to run in-place. Also a good idea. In many C build systems, it's possible to do a vpath build: a build outside of the source tree, where all build artifacts are stored away from the source tree. Would it be possible to create that for ABCL with Ant? I don't like the huge amount of build artifacts mixed in with my source tree: it makes finding so much harder. > Additional targets would make > separate distributions for 'ABCL' and 'J' which would tar/zip up the > runnable in-place distributions with and without source (i.e. there > would be four targets). Additional targets would install runnable 'J' > and 'ABCL' instances locally via '--prefix' like arguments. That would be great! Please consider that the current system doesn't distribute binaries, only sources. > Optionally, we could retain the 'autoconf' based system as a thin > wrapper to discover a locally installed Ant, and then invoke it. This > would be comfortable for UNIX developers used to such things (and balk > at being presented with a 'build.xml' which always seems to be different > from the previous ones). I would do this in a second set of patches. No, I don't really see the need to have that: we have lispers and java hackers as our clients. SBCL doesn't have a Make based build system either. I guess that makes it OK for a lisp to distribute without a Makefile. > The upside of my proposal would be to reduce code that is duplicated in > 'build.xml' and the various 'autoconf' artifacts. Removal of code duplication is always good. > It would also start > to separate 'J' from 'ABCL', at least conceptually in the build system. I like that fact. > The downside of my proposal is to require 'Ant' to be installed to > build 'J' (one could still use 'build-abcl.lisp' to produce 'ABCL'). In > this day and age requiring having an installed Ant seems like a low > requirement. Well, I'd say that this is good for now. If it turns out to be a problem, we could extend build-abcl.lisp to include build instructions for J if we want. (I don't really expect that to happen.) > I would produce the necessary patches for the new 'build.xml' and write > an accompanying document describing how to use it, outlining the "user > accessible" targets with short descriptions. > Comments? Go for it! Bye, Erik. |
From: Mark E. <ev...@pa...> - 2008-10-05 09:05:46
|
Erik Huelsmann wrote: […] > Also a good idea. In many C build systems, it's possible to do a vpath > build: a build outside of the source tree, where all build artifacts > are stored away from the source tree. Would it be possible to create > that for ABCL with Ant? I don't like the huge amount of build > artifacts mixed in with my source tree: it makes finding so much > harder. The current version of my [build.xml][1], following semi-standard Ant conventions, creates a 'build' subdirectory where all intermediate compile-time artifacts are created. You are welcome to override the value of the Ant variable 'build.dir' to be completely outside of the abcl source tree if you want. So, I consider this feature as having been implemented unless someone complains otherwise. [1]: http://code.google.com/p/abcl-dynamic-install/source/browse/trunk/abcl/build.xml Mark <ev...@pa...> -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: Ville V. <vil...@gm...> - 2008-10-05 11:24:37
Attachments:
build.xml-additions
|
Mark, can you look at the attached file, which contains targets for 1) exporting the svn source tree with windows line-endings 2) zipping the exported sources 3) exporting the svn source tree with unix line-endings 4) tar-gzipping the exported sources Some remarks: 1) I needed to do a hackish thing for the <apply> in the export targets - give it a dirset, and tell it to run in parallel without adding sourcefiles. Otherwise ant refused to run the target, because it thinks no files are used. 2) the zip/tar targets also use a prefix, because I didn't want to duplicate the patternsets for the sources. This was the only way I could find to be able to have the src/ directory in front of the org/* sources. The targets are based on the build.xml modifications done by Mark. This allows us (the maintainers/developers) to create a source release of abcl by 1) checking out normally 2) running the export/zip targets 3) distributing the generated zip/tar.gz |
From: Mark E. <ev...@pa...> - 2008-10-05 13:15:01
Attachments:
source-distributions.diff
|
Thanks to Ville's prodding, I have added source distribution build targets to the new build.xml, attached in a patch to the common-lisp.net SVN version. The incremental diffs to the previous patches in this series is [viewable in the Google SVN][1] [1]: http://code.google.com/p/abcl-dynamic-install/source/detail?r=150 Two new targets, 'abcl.source.zip' and 'abcl.source.tar' create source distributions under 'dist'. Differences from Ville's patch: 1. Ant has a <fixcrlf> task to change line-endings, so no additional SVN checkout is needed. Instead, we copy the artifacts under the 'build' directory as we transform them. 2. I don't quite agree that "zip files mean DOS and tar.gz mean UNIX", as both utilities work on those respective systems in various forms. There is now an Ant property 'abcl.source.eol' that can be set to 'dos' or 'unix' to control the line endings in *both* source distribution tarballs. If we really want the behavior in Ville's patch, I'll change it back. Use the 'build.properties' file to set this value. 3. The version number of ABCL as scraped from Version.java is included in the source distribution archive name. Mark <ev...@pa...> -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: Mark E. <ev...@pa...> - 2008-10-05 13:19:59
Attachments:
source-distributions.diff
|
Mark Evenson wrote: Actually use the 'abcl.source.eol' property. -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: Mark E. <ev...@pa...> - 2008-10-05 14:48:38
Attachments:
source-distributions.diff
|
A few more minor fixes to the source distribution targets: Always create a subdirectory from the archive (i.e. don't explode contents in current directory). Include Lisp build system (build-abcl.lisp) in source tree. Account for unset 'additional.jars' properties. Change how the various time and build stamp properties are being created. -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: Ville V. <vil...@gm...> - 2008-10-05 13:51:52
|
On Sun, Oct 5, 2008 at 4:13 PM, Mark Evenson <ev...@pa...> wrote: > 1. Ant has a <fixcrlf> task to change line-endings, so no additional SVN > checkout is needed. Instead, we copy the artifacts under the 'build' Sweet. I missed that target. > 2. I don't quite agree that "zip files mean DOS and tar.gz mean UNIX", as Well, what we need is the ability to build a source package with windows line-endings on both windows and on unix. Additionally, we need the ability to build a source package with unix line-endings on both platforms. How we do it is another thing. This is still a highly maintainer-oriented target, so as soon as Erik is happy with it, I think we should commit the build changes and do a release. |
From: Ville V. <vil...@gm...> - 2008-10-05 11:25:43
|
On Sun, Oct 5, 2008 at 2:21 PM, Ville Voutilainen <vil...@gm...> wrote: > Mark, can you look at the attached file, which contains targets for Oh well, there's a small typo in the unixsrczip target, it should be <target name="unixsrczip"> <tar destfile="abcl-src.tar.gz" compression="gzip"> <fileset dir="." includes="build.xml"/> <fileset dir="." includes="COPYING"/> <zipfileset dir="unixsrc/src" prefix="src"> <patternset refid="abcl.source.java"/> <patternset refid="abcl.source.lisp"/> </zipfileset> </tar> </target> The one in the previous file uses <zipfileset dir="winsrc/src" prefix="src"> which is obviously incorrect. Copy-paste error.. |
From: Ville V. <vil...@gm...> - 2008-10-05 12:50:25
|
On Sun, Oct 5, 2008 at 2:24 PM, Ville Voutilainen <vil...@gm...> wrote: > The one in the previous file uses <zipfileset dir="winsrc/src" prefix="src"> > which is obviously incorrect. Copy-paste error.. ..and, we need to add <fileset dir="." includes="abcl.in"/> to both zip targets in order to be able to build the abcl wrapper from the src distribution extracted from the zip/tar.gz. Works for me(TM) :) |
From: Mark E. <ev...@pa...> - 2008-10-05 15:08:08
Attachments:
source-distributions.diff
|
Fixed regression in building abcl.jar that would blow up the stack. -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-10-05 18:37:06
|
On Sun, Oct 5, 2008 at 5:04 PM, Mark Evenson <ev...@pa...> wrote: > Fixed regression in building abcl.jar that would blow up the stack. Regarding your doubts about CRLF vs LF for the ZIP file: Ville verified that the Ant sources are LF, even in the ZIP. So, I now agree that we can just distribute the LF-ified sources in all tarballs. Thanks for the patch! I'll be reading through it slowly in a minute, trying to learn about Ant. Bye, Erik. > > -- > "A screaming comes across the sky. It has happened before, but there is > nothing to compare to it now." > > Index: build.xml > =================================================================== > --- build.xml (revision 11334) > +++ build.xml (working copy) > @@ -1,336 +1,469 @@ > -<project name="j" default="compile" basedir="./src"> > +<?xml version="1.0" encoding="UTF-8"?> > +<project xmlns="antlib:org.apache.tools.ant" > + name="abcl-master" default="abcl" basedir="."> > + <description>Armed Bear Common Lisp</description> > > - <!-- Set global properties for this build --> > - <property name="version" value="0.21.0.4+"/> > - <property name="topdir" value="${basedir}/.."/> > - <property name="distdir" value="/tmp/j-${version}"/> > - <property file="${topdir}/build.properties"/> > - <property name="java" value="${jdk}/jre/bin/java"/> > - <property name="java_options" value=""/> > - <property name="extensions" value=""/> > - <property name="junit" value=""/> > - <property name="datadir" value="/usr/local/share"/> > - <property name="bindir" value="/usr/local/bin"/> > + <target name="abcl" depends="abcl.wrapper"/> > > - <property name="build.compiler.emacs" value="yes"/> > + <property file="build.properties"/> > > - <property name="JAVA" value="${java}"/> > - <property name="JAVA_OPTIONS" value="${java_options}"/> > + <property name="build.dir" > + value="${basedir}/build"/> > + <property name="build.classes.dir" > + value="${build.dir}/classes"/> > + <property name="src.dir" > + value="${basedir}/src"/> > + <property name="dist.dir" > + value="${basedir}/dist"/> > + <property name="abcl.jar.path" > + value="${dist.dir}/abcl.jar"/> > + <property name="j.jar.path" > + value="${dist.dir}/j.jar"/> > > - <property name="debug" value="no"/> > + <property name="abcl.version.path" > + value="${build.classes.dir}/org/armedbear/lisp/version"/> > + <property name="abcl.build.path" > + value="${build.classes.dir}/org/armedbear/lisp/build"/> > > - <path id="classpath"> > - <pathelement location="${basedir}"/> > - <pathelement location="${datadir}/j/j.jar"/> > - <pathelement path="${extensions}"/> > - <pathelement path="${jdk}/lib/tools.jar"/> > - </path> > + <target name="abcl.stamp" depends="abcl.compile"> > + <tstamp><format property="build" pattern="EEE MMM dd yyyy HH:mm:ss > zzz"/></tstamp> > + <echo message="${build}" file="${abcl.build.path}"/> > + <condition property="unix"> > + <or> > + <os family="unix"/> > + <os family="mac"/> > + </or> > + </condition> > > - <property name="CLASSPATH" refid="classpath"/> > + <condition property="windows"> <os family="windows"/></condition> > > - <path id="abcl_classpath"> > - <pathelement location="${basedir}"/> > - </path> > + <available file="${src.dir}org/armedbear/lisp/Interpreter.java" > + property="abcl.lisp.p"/> > > - <property name="ABCL_CLASSPATH" refid="abcl_classpath"/> > + <antcall target="abcl.stamp.version"/> > + <antcall target="abcl.stamp.hostname"/> > + </target> > > - <target name="prepare"> > - <!-- Create the time stamp --> > - <tstamp> > - <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/> > - </tstamp> > - <condition property="unix"> > - <os family="unix"/> > - </condition> > - <condition property="windows"> > - <os family="windows"/> > - </condition> > - <available > - classname="com.sun.jdi.Bootstrap" > - classpath="${jdk}/jre/lib/rt.jar:${extensions}:${jdk}/lib/tools.jar" > - property="jpda.present" > - /> > - <available file="org/armedbear/lisp/Interpreter.java" > property="lisp.present"/> > - </target> > + <target name="j.stamp" depends="j.compile"> > + <property name="j.build.path" > + value="${build.classes.dir}/org/armedbear/j/build"/> > + <echo message="${build}" file="${j.build.path}"/> > + </target> > > - <target > - name="compile" > - depends="classes, jdbclasses, lispclasses, stamp, stamp.hostname" > - /> > + <target name="abcl.stamp.version"> > + <exec executable="grep" > + outputproperty="abcl.version"> > + <arg value="--only-matching"/> > + <arg value="--max-count"/><arg value="1"/> > + <arg value="--regexp"/> > + <arg value="\([0-9]\+\.\)\+[0-9]"/> > + <arg value="${src.dir}/org/armedbear/lisp/Version.java"/> > + </exec> > + <echo>Building ABCL version: ${abcl.version}</echo> > + <mkdir dir="${abcl.version.path}/.."/> > + <echo message="${abcl.version}" file="${abcl.version.path}"/> > + </target> > > - <target name="lisp" depends="lispclasses"/> > + <target name="abcl.stamp.hostname"> > + <property name="j.build.path" > + value="${build.classes.dir}/org/armedbear/j/build"/> > + <exec executable="hostname" outputproperty="abcl.hostname"/> > + <echo>abcl.hostname: ${abcl.hostname}</echo> > + </target> > > - <target name="classes" depends="prepare"> > - <echo message="debug=${debug}" /> > - <javac > - srcdir="." > - destdir="${basedir}" > - classpath="${basedir}:${jdk}/jre/lib/rt.jar:${extensions}" > - includeAntRuntime="no" > - excludes="org/armedbear/j/_darcs/**/*,org/armedbear/lisp/**/*, > org/armedbear/j/jdb/**/*" > - debug="${debug}" > - /> > - </target> > + <target name="j.stamp.hostname"> > + <echo message="${abcl.hostname}" file="${j.build.path}" > append="yes"/> > + </target> > > - <target name="jdbclasses" depends="prepare" if="jpda.present"> > - <echo message="debug=${debug}" /> > - <javac > - srcdir="." > - destdir="${basedir}" > - > classpath="${basedir}:${jdk}/jre/lib/rt.jar:${extensions}:${jdk}/lib/tools.jar" > - includeAntRuntime="no" > - includes="org/armedbear/j/jdb/*" > - debug="${debug}" > - /> > - </target> > + <patternset id="abcl.source.java"> > + <include name="org/armedbear/lisp/*.java"/> > + </patternset> > + > + <patternset id="abcl.source.lisp"> > + <include name="org/armedbear/lisp/*.lisp"/> > + <include name="org/armedbear/lisp/tests/*.lisp"/> > +<!-- <include name="org/armedbear/lisp/awt/*.lisp"/> --> > + </patternset> > > - <target name="lispclasses" depends="prepare" if="lisp.present"> > - <echo message="debug=${debug}" /> > - <javac > - srcdir="." > - destdir="${basedir}" > - classpath="${basedir}:${jdk}/jre/lib/rt.jar:${junit}" > - includeAntRuntime="no" > - includes="org/armedbear/lisp/**/*" > - excludes="org/armedbear/lisp/_darcs/**/*" > - debug="${debug}" > - /> > - <echo message="${build} " > file="${basedir}/org/armedbear/lisp/build"/> > - </target> > + <!-- Lisp files required at runtime --> > + <patternset id="abcl.source.lisp.dist"> > + <include name="org/armedbear/lisp/boot.lisp"/> > + <include name="org/armedbear/lisp/top-level.lisp"/> > + <include name="org/armedbear/lisp/*.lisp"/> > + </patternset> > > - <target name="stamp"> > - <echo message="${version} " > file="${basedir}/org/armedbear/j/version"/> > - <echo message="${build} " file="${basedir}/org/armedbear/j/build"/> > - <exec executable="hostname" os="Linux" outputproperty="hostname"/> > - </target> > + <patternset id="abcl.objects"> > + <include name="org/armedbear/lisp/*.class"/> > + <include name="org/armedbear/lisp/*.cls"/> > + <include name="org/armedbear/lisp/*.abcl"/> > + <patternset refid="abcl.source.lisp.dist"/> > + </patternset> > + > + <patternset id="j.source"> > + <include name="Main.java"/> > + <include name="gnu/regexp/*.java"/> > + <include name="org/armedbear/j/**/*.java"/> > + <!-- Assumed to need the org.armedbear.lisp.awt.* classes as ABCL > + itself doesn't seem to need them. --> > + <include name="org/armedbear/lisp/awt/*.class"/> > + </patternset> > > - <target name="stamp.hostname" if="unix"> > - <exec executable="hostname" outputproperty="hostname"/> > - <echo message="${hostname} " > file="${basedir}/org/armedbear/j/build" append="yes"/> > - </target> > + <patternset id="j.objects"> > + <patternset refid="abcl.objects"/> > + <include name="Main.class"/> > + <include name="gnu/regexp/*.class"/> > + <include name="org/armedbear/j/**/*.class"/> > + </patternset> > > - <!-- FIXME If snapshots have version numbers, we don't need this any > more. --> > - <target name="stamp.snapshot"> > - <echo message="${build} " > file="${basedir}/org/armedbear/j/snapshot"/> > - </target> > - > - <target name="all" depends="all.unix, all.windows"/> > - > - <target name="all.unix" depends="j.jar, jpty" if="unix"> > - <filter token="JAVA" value="${JAVA}"/> > - <filter token="JAVA_OPTIONS" value="${JAVA_OPTIONS}"/> > - <filter token="CLASSPATH" value="${CLASSPATH}"/> > - <copy file="${topdir}/j.in" tofile="${topdir}/j" filtering="yes" > overwrite="yes"/> > - <chmod file="${topdir}/j" perm="ugo+rx"/> > - </target> > - > - <target name="all.windows" depends="j.jar, jpty" if="windows"> > - <filter token="JAVA" value="${JAVA}"/> > - <filter token="JAVA_OPTIONS" value="${JAVA_OPTIONS}"/> > - <filter token="CLASSPATH" value="${CLASSPATH}"/> > - <filter token="ABCL_CLASSPATH" value="${ABCL_CLASSPATH}"/> > - <copy file="${topdir}/j.bat.in" tofile="${topdir}/j.bat" > filtering="yes" overwrite="yes"/> > - <copy file="${topdir}/abcl.bat.in" tofile="${topdir}/abcl.bat" > filtering="yes" overwrite="yes"/> > - </target> > - > - <target name="j.jar" depends="compile, fasls"> > - <jar jarfile="../j.jar" manifest="manifest" basedir="${basedir}"> > - <exclude name="pg.class"/> > - <exclude name="SampleExtension.class"/> > - <exclude name="org/armedbear/lisp/Tests.class"/> > - <include name="**/*.class"/> > + <patternset id="j.resources.src"> > <include name="**/*.keywords"/> > <include name="org/armedbear/j/version"/> > <include name="org/armedbear/j/build"/> > <include name="org/armedbear/j/snapshot"/> > <include name="org/armedbear/j/images/*.png"/> > <include name="gnu/regexp/MessagesBundle.properties"/> > - <include name="org/armedbear/lisp/build"/> > - <include name="org/armedbear/lisp/*.lisp"/> > - <include name="org/armedbear/lisp/*.abcl"/> > - <include name="org/armedbear/lisp/*.cls"/> > - </jar> > - </target> > + </patternset> > > - <target name="jpty" if="jpty"> > - <ant antfile="jpty/build.xml"/> > - </target> > + <patternset id="j.resources.top"> > + <include name="COPYING"/> > + <include name="doc/*.html"/> > + <include name="doc/*.css"/> > + <include name="themes/*"/> > + <include name="examples/*"/> > + </patternset> > > - <target name="fasls"> > - <exec executable="${java}" dir="${basedir}"> > - <!-- Use the server VM to avoid stack overflow (Java 1.5, > Windows).--> > - <arg line="-server -cp . org.armedbear.lisp.Main --noinit --eval > '(compile-system :zip nil :quit t)'"/> > - </exec> > - </target> > + <path id="abcl.classpath.dist"> > + <pathelement location="${abcl.jar.path}"/> > + </path> > + > + <path id="abcl.classpath.build"> > + <pathelement location="${build.classes.dir}"/> > + </path> > > - <!-- Install --> > - <target name="install" depends="install.unix, install.windows"/> > + <target name="abcl.lisp.compile" depends="abcl.compile.fasl"/> > > - <target name="install.unix" depends="all" if="unix"> > - <mkdir dir="${datadir}/j"/> > - <mkdir dir="${datadir}/j/themes"/> > - <mkdir dir="${datadir}/doc/j" /> > - <copy file="${topdir}/j.jar" todir="${datadir}/j"/> > - <copy file="${topdir}/j" todir="${bindir}"/> > - <chmod file="${bindir}/j" perm="ugo+rx"/> > - <copy file="${basedir}/jpty/jpty" todir="${bindir}"/> > - <chmod file="${bindir}/jpty" perm="ugo+rx"/> > - <copy todir="${datadir}/j/themes"> > - <fileset dir="${topdir}/themes"/> > - </copy> > - <copy todir="${datadir}/doc/j"> > - <fileset dir="${topdir}/doc"/> > - </copy> > - </target> > + <target name="abcl.compile" > depends="abcl.pre-compile,abcl.compile.fasl"> > + <echo>Compiled ABCL with java version: ${java.version}</echo> > + </target> > > - <target name="install.windows" depends="all" if="windows"> > - <mkdir dir="${datadir}/j"/> > - <mkdir dir="${datadir}/j/themes"/> > - <mkdir dir="${datadir}/doc/j" /> > - <copy file="${topdir}/j.jar" todir="${datadir}/j"/> > - <copy file="${topdir}/j.bat" todir="${bindir}"/> > - <copy file="${basedir}/jpty/jpty.exe" todir="${bindir}"/> > - <copy todir="${datadir}/j/themes"> > - <fileset dir="${topdir}/themes"/> > - </copy> > - <copy todir="${datadir}/doc/j"> > - <fileset dir="${topdir}/doc"/> > - </copy> > - </target> > + <target name="abcl.pre-compile"> > + <!--- antversion fails in ant 1.7.1 <antversion > property="ant.version" > + atleast="1.7"/> --> > + <mkdir dir="${build.dir}"/> > + <mkdir dir="${build.classes.dir}"/> > > - <!-- Uninstall --> > - <target name="uninstall"> > - <delete file="${datadir}/j/j.jar" verbose="true"/> > - <delete file="${bindir}/j" verbose="true"/> > - <delete file="${bindir}/jpty" verbose="true"/> > - <delete file="${bindir}/jpty.exe" verbose="true"/> > - <delete verbose="true"> > - <fileset dir="${datadir}/j/themes"/> > - </delete> > - <delete verbose="true"> > - <fileset dir="${datadir}/doc/j"/> > - </delete> > - </target> > + <property name="j.compile.version.path" > + value="${build.classes.dir}/org/armedbear/j/version"/> > + <exec executable="which" > + outputproperty="java.pathname"> > + <arg value="java"/> > + </exec> > > - <target name="clean"> > - <delete> > - <fileset dir="${topdir}" includes="**/*.zip"/> > - <fileset dir="${topdir}" includes="**/*.tar.gz"/> > - <fileset dir="${topdir}" includes="**/*.jar"/> > - <fileset dir="${topdir}" includes="**/*.class"/> > - <fileset dir="${topdir}" includes="**/*.abcl"/> > - <fileset dir="${topdir}" includes="**/*.cls"/> > - <fileset dir="${topdir}" includes="**/*~"/> > - <fileset dir="${topdir}" includes="**/.#*"/> > - <fileset dir="${topdir}" includes="**/TEST-*.txt"/> > - </delete> > - <delete dir="${topdir}/autom4te.cache"/> > - <delete file="${topdir}/j"/> > - <delete file="${topdir}/j.bat"/> > - <delete file="${basedir}/jpty/jpty"/> > - <delete file="${basedir}/jpty/jpty.exe"/> > - <delete file="${basedir}/org/armedbear/j/version"/> > - <delete file="${basedir}/org/armedbear/j/build"/> > - </target> > + <exec executable="hostname" os="unix" > + outputproperty="abcl.compile.hostname"/> > + <exec executable="uname" os="unix" > + outputproperty="abcl.compile.uname"> > + <arg value="-a"/> > + </exec> > > - <!-- Distribution --> > - <target name="dist" depends="prepare, distdir" if="unix"> > - <tar tarfile="${topdir}/j-${version}.tar" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </tar> > - <gzip zipfile="${topdir}/j-${version}.tar.gz" > src="${topdir}/j-${version}.tar"/> > - <delete file="${topdir}/j-${version}.tar"/> > - <zip zipfile="${topdir}/j-${version}.zip" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </zip> > - </target> > + <property name="j.version.path" > + value="${build.classes.dir}/org/armedbear/j/version"/> > + <exec executable="hostname" os="Linux" outputproperty="hostname"/> > > - <target name="distdir" depends="prepare" if="unix"> > - <delete dir="${distdir}"/> > - <mkdir dir="${distdir}"/> > - <copy todir="${distdir}"> > - <fileset dir="${topdir}"> > - <exclude name="**/*.orig"/> > - <exclude name="**/*.class"/> > - <exclude name="**/*.jar"/> > - <exclude name="**/*.zip"/> > - <exclude name="**/*.tar"/> > - <exclude name="**/*.tar.gz"/> > - <exclude name="src/test/**"/> > - <exclude name="src/org/armedbear/lisp/lisp"/> > - <exclude name="**/Makefile"/> > - <exclude name="config.*"/> > - <exclude name="autom4te.cache/**"/> > - <exclude name="**/classes.stamp"/> > - <exclude name="**/build"/> > - <exclude name="**/version"/> > - <exclude name="**/j"/> > - <exclude name="**/j.bat"/> > - <exclude name="**/jpty"/> > - <exclude name="**/ChangeLog"/> > - </fileset> > - </copy> > - </target> > + <condition property="abcl.java.version"> > + <matches string="${java.version}" pattern="1\.5"/> > + </condition> > + <echo>java.version: ${java.version}</echo> > + </target> > + > + <target name="abcl.java.warning" unless="abcl.java.version"> > + <echo>WARNING: Java version ${java.version} not recommended.</echo> > + </target> > + > + <target name="abcl.compile.java" > + depends="abcl.pre-compile,abcl.java.warning"> > + <tstamp> > + <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/> > + </tstamp> > > - <target name="bindist" depends="prepare, bindistdir" if="unix"> > - <tar tarfile="${topdir}/j-${version}-binary.tar" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </tar> > - <gzip zipfile="${topdir}/j-${version}-binary.tar.gz" > src="${topdir}/j-${version}-binary.tar"/> > - <delete file="${topdir}/j-${version}-binary.tar"/> > - <zip zipfile="${topdir}/j-${version}-binary.zip" basedir="/tmp"> > - <include name="j-${version}/**"/> > - </zip> > - </target> > + <javac destdir="${build.classes.dir}" > + debug="true" > + target="1.5"> > + <src path="${src.dir}"/> > + <patternset refid="abcl.source.java"/> > + </javac> > + <echo message="${build}" > file="${build.classes.dir}/org/armedbear/lisp/build"/> > + </target> > > - <target name="bindistdir" depends="release" if="unix"> > - <delete dir="${distdir}"/> > - <mkdir dir="${distdir}"/> > - <copy todir="${distdir}"> > - <fileset dir="${topdir}"> > - <include name="j.jar"/> > - <include name="COPYING"/> > - <include name="doc/*.html"/> > - <include name="doc/*.css"/> > - <include name="themes/*"/> > - <include name="examples/*"/> > - </fileset> > - </copy> > - </target> > + <target name="j.compile" depends="abcl.compile"> > + <javac destdir="${build.classes.dir}" > + debug="true" > + target="1.5"> > + <src path="${src/dir}"/> > + <patternset refid="j.source"/> > + </javac> > +<!-- Makefile.in has > + cd src/org/armedbear/j && date > build && hostname >> build > +--> > + </target> > > - <!-- Build j.jar from scratch without debug information --> > - <target name="release" depends="prepare, clean"> > - <antcall target="j.jar"> > - <param name="debug" value="no"/> > - <param name="build.compiler" value="javac1.4"/> > - </antcall> > - </target> > + <target name="abcl.copy.lisp"> > + <copy todir="${build.classes.dir}"> > + <fileset dir="${src.dir}"> > + <patternset refid="abcl.source.lisp"/> > + </fileset> > + </copy> > + </target> > + > + <target name="abcl.compile.fasl" > depends="abcl.copy.lisp,abcl.compile.java"> > + <java classpath="${build.classes.dir}" > + fork="true" > + classname="org.armedbear.lisp.Main"> > + <arg value="--noinit"/> > + <arg value="--eval"/> > + <arg value="(compile-system :zip nil :quit t)"/> > + </java> > + </target> > > - <target name="snapshot" depends="clean, prepare, stamp.snapshot, j.zip, > j-jar.zip"> > - <delete file="${basedir}/org/armedbear/j/snapshot"/> > - </target> > + <target name="abcl.jar" depends="abcl.compile,abcl.stamp"> > + <loadfile property="abcl.version" > + srcFile="${abcl.version.path}"/> > + <jar destfile="${abcl.jar.path}" > + compress="true" > + basedir="${build.classes.dir}"> > + <patternset refid="abcl.objects"/> > + <manifest> > + <attribute name="Main-Class" value="org.armedbear.lisp.Main"/> > + <section name="org/armedbear/lisp"> > + <attribute name="Implementation-Title" > + value="ABCL"/> > + <attribute name="Implementation-Version" > + value="${abcl.version}"/> > + <attribute name="Implementation-Build" > + value="${build}"/> > + </section> > + </manifest> > + </jar> > + </target> > + > + <target name="abcl.debug.jpda" depends="abcl.jar"> > + <description>Invoke ABCL with JPDA listener on port > 6789</description> > + <java fork="true" > + classpathref="abcl.classpath.dist" > + classname="org.armedbear.lisp.Main"> > + <jvmarg > value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/> > + </java> > + </target> > > - <target name="j.zip"> > - <delete file="${topdir}/j.zip"/> > - <zip > - zipfile="${topdir}/j.zip" > - basedir="${topdir}" > - excludes="src/TEST-*.txt, **/*.orig, **/*.class, **/*.jar, **/*.zip, > - src/test/**, **/Makefile, > - config.status, config.cache, config.log, autom4te.cache/**, > - **/classes.stamp, **/build, **/version, > - **/j, **/j.bat, **/jpty, **/ChangeLog, src/org/armedbear/lisp/lisp" > - /> > - </target> > + <target name="abcl.run" depends="abcl.jar"> > + <java fork="true" > + classpathref="abcl.classpath.dist" > + classname="org.armedbear.lisp.Main"> > + </java> > + </target> > > - <target name="j-jar.zip"> > - <delete file="${topdir}/j-jar.zip"/> > - <delete file="${topdir}/j.jar"/> > - <antcall target="j.jar"> > - <param name="debug" value="yes"/> > - <param name="build.compiler" value="javac1.4"/> > - </antcall> > - <zip zipfile="${topdir}/j-jar.zip" basedir="${topdir}" > includes="j.jar"/> > - </target> > +<!-- XXX Not working, so use grep instead. This would theoretically work > without grep. > > + <target name="abcl.version" depends="abcl.compile"> > + <java fork="true" > + classpath="${build.classes.dir}" > + outputproperty="abcl.version" > + classname="org.armedbear.lisp.Main"> > + <arg value="- -noinit"/> > + <arg value="- -eval"/> > + <arg value="(lisp-implementation-version)"/> > + </java> > + <echo>abcl.version: ${abcl.version}</echo> > + </target> > +--> > + > + > + <target name="abcl.wrapper" > + depends="abcl.jar,abcl.wrapper.unix,abcl.wrapper.windows"> > + <description> > + Creates in-place exectuable shell wrapper in '${abcl.wrapper.file}' > + </description> > + <!-- Set from commandline or in 'build.properties' --> > + <property name="additional.jars" value=""/> > + <path id="abcl.runtime.classpath"> > + <pathelement location="${abcl.jar.path}"/> > + <pathelement path="${additional.jars}"/> > + </path> > + > + <copy file="abcl.in" toFile="${abcl.wrapper.file}" overwrite="yes"> > + <filterset> > + <filter token="JAVA" > + value="${java.pathname}"/> > + <filter token="ABCL_JAVA_OPTIONS" > + value= ""/> > + <filter token="ABCL_LIBPATH" > + value="${basedir}/dist/libabcl.so"/> > + <filter token="ABCL_CLASSPATH" > + value="${toString:abcl.runtime.classpath}"/> > + </filterset> > + </copy> > + <chmod file="${abcl.wrapper.file}" perm="a+x"/> > + <echo>N.B. This wrapper requires '${abcl.jar.path}' not be > moved.</echo> > + </target> > + > + <target name="abcl.wrapper.unix" if="unix"> > + <property name="abcl.wrapper.file" value="abcl"/> > + </target> > + > + <target name="abcl.wrapper.windows" if="windows"> > + <property name="abcl.wrapper.file" value="abcl.bat"/> > + </target> > + > + <target name="j.jar" depends="j.compile"> > + <copy todir="${build.classes.dir}"> > + <fileset dir="${basedir}/src"> > + <patternset refid="j.objects"/> > + <patternset refid="j.resources.src"/> > + </fileset> > + </copy> > + <jar destfile="${j.jar.path}" > + compress="true" > + basedir="${build.classes.dir}"> > + <patternset refid="j.objects"/> > + <patternset refid="j.resources.src"/> > + <manifest> > + <attribute name="Main-Class" value="Main"/> > + <section name="org/armedbear/lisp"> > + <attribute name="Implementation-Title" value="ABCL"/> > + <attribute name="Implementation-Version" > value="${abcl.version}"/> > + </section> > + </manifest> > + </jar> > + </target> > + > + <target name="j.dist" depends="j.jar"> > + <mkdir dir="${dist.dir}"/> > + <copy todir="dist"> > + <fileset dir="${basedir}"> > + <patternset refid="j.resources.top"/> > + </fileset> > + </copy> > + </target> > + > + <target name="abcl.clean"> > + <delete dir="${build.dir}"/> > + <delete file="abcl"/> > + </target> > + > + <target name="abcl.dist" depends="abcl.jar"> > + <copy file="${abcl.jar.path}" > + toFile="${dist.dir}/abcl-${abcl.version}.jar"/> > + </target> > + > + <target name="abcl.distclean" depends="abcl.clean"> > + <delete dir="${dist.dir}"/> > + <delete file="abcl"/> > + <delete file="j"/> > + </target> > + > + <target name="TAGS"> > + <apply executable="etags" parallel="true" verbose="true"> > + <fileset dir="${src.dir}"> > + <patternset refid="abcl.source.java"/> > + <patternset refid="abcl.source.lisp"/> > + </fileset> > + </apply> > + </target> > + > + <target name="j.jpty" depends="j.jpty.compile"/> > + <target name="j.jpty.compile"> > + <exec executable="gcc" dir="${src.dir}/jpty"> > + <arg line="-Wall -O2 jpty.c -o jpty"/> > + </exec> > + </target> > + > + <target name="j.install" depends="j.install.unix, j.install.windows"/> > + > + <target name="install.unix" depends="j.jar,j.jpty" if="unix"> > + <property name="j.install.root" value="/usr/local"/> > + <property name="j.install.data.path" > value="${j.install.root}/share"/> > + <property name="j.install.bin.path" value="${j.install.root}/bin"/> > + > + <mkdir dir="${j.install.data.path}/j"/> > + <copy file="${dist}/j.jar" todir="${j.install.data.path}/j"/> > + <copy file="j.in" toFile="${j.install.bin.path}/j"> > + <filterset> > + <filter token="ABCL_CLASSPATH" > + value="${j.install.data.path}/j/j.jar"/> > + </filterset> > + </copy> > + <chmod file="${j.install.bin.path}/j" perm="ugo+rx"/> > + > + <property name="j.install.themes.path" > + value="${j.install.data.path}/j/themes"/> > + <mkdir dir="${j.install.themes.path}"/> > + <copy todir="{j.install.themes.path}"> > + <fileset dir="${basedir}/themes"/> > + </copy> > + > + <property name="j.install.doc.path" > + value="${j.install.data.path}/doc/j"/> > + <mkdir dir="${j.install.doc.path}" /> > + > + <copy file="${basedir}/jpty/jpty" todir="${bindir}"/> > + <chmod file="${bindir}/jpty" perm="ugo+rx"/> > + <copy todir="${datadir}/doc/j"> > + <fileset dir="${topdir}/doc"/> > + </copy> > + </target> > + > + <!-- Additional files to include in the source distributions relative > to basedir --> > + <patternset id="abcl.source.misc"> > + <include name="build.xml"/> > + <include name="build.properties.in"/> > + <include name="COPYING"/> > + <include name="abcl.in"/> > + <include name="test-abcl.asd"/> > + <include name="build-abcl.asd"/> > + <include name="build-abcl.lisp"/> > + <include name="customizations.lisp.in"/> > + </patternset> > + > + <target name="abcl.source.prepare" depends="abcl.stamp.version"> > + <property name="abcl.source.eol" value="asis"/> > + <echo>Using '${abcl.source.eol}' to drive line-ending > transformations.</echo> > + <property name="abcl.build.src.dir" > + value="${build.dir}/abcl-src-${abcl.version}"/> > + <mkdir dir="${abcl.build.src.dir}/src"/> > + <fixcrlf srcdir="${src.dir}" > + eol="${abcl.source.eol}" > + destdir="${abcl.build.src.dir}/src" > + preservelastmodified="true"> > + <patternset refid="abcl.source.java"/> > + <patternset refid="abcl.source.lisp"/> > + </fixcrlf> > + <fixcrlf srcdir="${basedir}" > + eol="${abcl.source.eol}" > + destdir="${abcl.build.src.dir}" > + preservelastmodified="true"> > + <patternset refid="abcl.source.misc"/> > + </fixcrlf> > + </target> > + > + <target name="abcl.source.tar" depends="abcl.source.prepare"> > + <mkdir dir="${dist.dir}"/> > + <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz" > + compression="gzip"> > + <tarfileset dir="${build.dir}"> > + <include name="abcl-src-${abcl.version}/**"/> > + </tarfileset> > + </tar> > + </target> > + > + <target name="abcl.source.zip" depends="abcl.source.prepare"> > + <mkdir dir="${dist.dir}"/> > + <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip" > + compress="true"> > + <zipfileset dir="${abcl.build.src.dir}" > prefix="abcl-src-${abcl.version}"/> > + </zip> > + </target> > + > + <import file="netbeans-build.xml" optional="true"/> > + <import file="j-build.xml" optional="true"/> > </project> > + > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > armedbear-j-devel mailing list > arm...@li... > https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel > > |