mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
78 lines
2.6 KiB
XML
78 lines
2.6 KiB
XML
<?xml version="1.0"?>
|
|
<project name="Processing PDE" default="build">
|
|
|
|
<classloader taskname="antlr">
|
|
<classpath path="lib/antlr.jar" />
|
|
</classloader>
|
|
|
|
<target name="clean" description="Clean the build directories">
|
|
<delete dir="bin" />
|
|
<delete file="pde.jar" />
|
|
</target>
|
|
|
|
<target name="preproc" description="Compile ANTLR grammar">
|
|
<!-- invoke antlr manually instead of using the ant-task,
|
|
saves some trouble... -->
|
|
<java classpath="${basedir}/lib/antlr.jar"
|
|
classname="antlr.Tool"
|
|
failonerror="yes"
|
|
dir="${basedir}"
|
|
fork="yes">
|
|
<arg line="-o src/antlr/java src/antlr/java/java.g" />
|
|
</java>
|
|
<copy todir="src/processing/app/preproc"
|
|
file="src/antlr/java/JavaTokenTypes.txt" />
|
|
|
|
<!-- This version does not work properly on Windows,
|
|
probably due to differences in how paths are handled. -->
|
|
<!--
|
|
<java classpath="${basedir}/lib/antlr.jar"
|
|
classname="antlr.Tool"
|
|
failonerror="yes"
|
|
dir="${basedir}"
|
|
fork="yes">
|
|
<arg line="-o src/processing/app/preproc -glib src/antlr/java/java.g src/processing/app/preproc/pde.g" />
|
|
</java>
|
|
-->
|
|
<java classpath="${basedir}/lib/antlr.jar"
|
|
classname="antlr.Tool"
|
|
failonerror="yes"
|
|
dir="${basedir}/src/processing/app/preproc"
|
|
fork="yes">
|
|
<arg line="-glib ../../../antlr/java/java.g pde.g" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="compile" depends="preproc" description="Compile sources">
|
|
<condition property="core-built">
|
|
<available file="../core/core.jar" />
|
|
</condition>
|
|
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../core/core.jar" />
|
|
|
|
<mkdir dir="bin" />
|
|
|
|
<!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE
|
|
subfolder instead of the actual JDK found at JAVA_HOME.
|
|
To avoid this, we grab the actual JAVA_HOME environment variable
|
|
and use that to specify the location of tools.jar. -->
|
|
<property environment="env" />
|
|
<!--
|
|
<dirname property="blah" file="${java.home}" />
|
|
<echo message="here! ${java.home}/lib/tools.jar or there: ${blah}" />
|
|
<echo message="override ${env.JAVA_HOME}/lib/tools.jar" />
|
|
<fail />
|
|
-->
|
|
<javac target="1.5"
|
|
srcdir="src"
|
|
destdir="bin"
|
|
excludes="**/tools/format/**"
|
|
encoding="UTF-8"
|
|
includeAntRuntime="false"
|
|
classpath="../core/core.jar; ${env.JAVA_HOME}/lib/tools.jar; lib/ant.jar; lib/ant-launcher.jar; lib/antlr.jar; lib/apple.jar; lib/ecj.jar; lib/jna.jar" />
|
|
</target>
|
|
|
|
<target name="build" depends="compile" description="Build PDE">
|
|
<jar basedir="bin" destfile="pde.jar" />
|
|
</target>
|
|
</project>
|