|
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <project name="Processing PDE" default="build"> |
3 | 3 |
|
4 | | - <property name="generated" value="${basedir}/generated/processing/app/antlr"/> |
5 | | - <property name="grammars" value="${basedir}/grammars"/> |
6 | | - <property name="antlrjar" value="${basedir}/lib/antlr.jar"/> |
7 | | - |
| 4 | + <property name="generated" value="${basedir}/generated/processing/app/antlr" /> |
| 5 | + <property name="grammars" value="${basedir}/grammars" /> |
| 6 | + <property name="antlrjar" value="${basedir}/lib/antlr.jar" /> |
| 7 | + |
8 | 8 | <classloader taskname="antlr"> |
9 | 9 | <classpath path="lib/antlr.jar" /> |
10 | 10 | </classloader> |
11 | 11 |
|
12 | 12 | <target name="clean" description="Clean the build directories"> |
| 13 | + |
| 14 | + <!-- jdf sez: clean up after old layout of generated resources --> |
| 15 | + <delete failonerror="false"> |
| 16 | + <fileset dir="${basedir}/src/antlr/java"> |
| 17 | + <include name="*.java" /> |
| 18 | + <include name="*.tokens" /> |
| 19 | + <include name="*.txt" /> |
| 20 | + <include name="*.g" /> |
| 21 | + <include name="*.smap" /> |
| 22 | + </fileset> |
| 23 | + </delete> |
| 24 | + <delete failonerror="false"> |
| 25 | + <!-- jdf sez: don't name anything FooRecognizer or FooLexer in this package --> |
| 26 | + <fileset dir="${basedir}/src/processing/app/preproc"> |
| 27 | + <include name="*Recognizer.java" /> |
| 28 | + <include name="*Lexer.java" /> |
| 29 | + <include name="*.tokens" /> |
| 30 | + <include name="*.txt" /> |
| 31 | + <include name="*.g" /> |
| 32 | + <include name="*.smap" /> |
| 33 | + </fileset> |
| 34 | + </delete> |
| 35 | + |
13 | 36 | <delete dir="bin" /> |
14 | 37 | <delete file="pde.jar" /> |
15 | 38 | <delete> |
|
23 | 46 | </delete> |
24 | 47 | </target> |
25 | 48 |
|
26 | | - <target name="preproc" description="Compile ANTLR grammar"> |
| 49 | + <target name="preproc" depends="clean" description="Compile ANTLR grammar"> |
27 | 50 | <antlr target="${grammars}/java15.g" outputdirectory="${generated}"> |
28 | 51 | <classpath path="${antlrjar}" /> |
29 | 52 | </antlr> |
30 | | - |
31 | | - <!-- antlr wants this file nearby --> |
32 | | -<!-- <copy todir="src/processing/app/preproc" file="src/antlr/java/JavaTokenTypes.txt" /> |
33 | | ---> |
34 | | - |
35 | | - <antlr target="${grammars}/pde.g" |
36 | | - outputdirectory="${generated}" |
37 | | - glib="${grammars}/java15.g"> |
| 53 | + <antlr target="${grammars}/pde.g" outputdirectory="${generated}" glib="${grammars}/java15.g"> |
38 | 54 | <classpath path="${antlrjar}" /> |
39 | 55 | </antlr> |
40 | 56 | </target> |
|
43 | 59 | <condition property="core-built"> |
44 | 60 | <available file="../core/core.jar" /> |
45 | 61 | </condition> |
46 | | - <fail unless="core-built" message="Please build the core library first and make sure it sits in ../core/core.jar" /> |
| 62 | + <fail unless="core-built" |
| 63 | + message="Please build the core library first and make sure it sits in ../core/core.jar" /> |
47 | 64 |
|
48 | 65 | <mkdir dir="bin" /> |
49 | 66 |
|
|
74 | 91 | <echo message="override ${env.JAVA_HOME}/lib/tools.jar" /> |
75 | 92 | <fail /> |
76 | 93 | --> |
77 | | - <javac |
78 | | - target="1.5" |
79 | | - destdir="bin" |
80 | | - excludes="**/tools/format/**" |
81 | | - encoding="UTF-8" |
82 | | - includeAntRuntime="false" |
83 | | - 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" |
84 | | - > |
85 | | - <src path="src"/> |
86 | | - <src path="generated"/> |
| 94 | + <javac target="1.5" |
| 95 | + destdir="bin" |
| 96 | + excludes="**/tools/format/**" |
| 97 | + encoding="UTF-8" |
| 98 | + includeAntRuntime="false" |
| 99 | + 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" |
| 100 | + > |
| 101 | + <src path="src" /> |
| 102 | + <src path="generated" /> |
87 | 103 | </javac> |
88 | | - <javac |
89 | | - target="1.5" |
| 104 | + <javac target="1.5" |
90 | 105 | srcdir="../android/tool/src" |
91 | 106 | destdir="bin" |
92 | 107 | encoding="UTF-8" |
|
0 commit comments