|
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" /> |
| 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 | 7 |
|
8 | | - <classloader taskname="antlr"> |
9 | | - <classpath path="lib/antlr.jar" /> |
10 | | - </classloader> |
| 8 | + <classloader taskname="antlr"> |
| 9 | + <classpath path="lib/antlr.jar" /> |
| 10 | + </classloader> |
11 | 11 |
|
12 | | - <target name="clean" description="Clean the build directories"> |
| 12 | + <target name="clean" description="Clean the build directories"> |
13 | 13 |
|
14 | | - <!-- THIS SECTION SHOULD BE REMOVED AFTER A MONTH OR TWO --> |
15 | | - <!-- jdf sez: clean up after old layout of generated resources --> |
16 | | - <delete failonerror="false"> |
17 | | - <fileset dir="${basedir}/src/antlr/java"> |
18 | | - <include name="*.java" /> |
19 | | - <include name="*.tokens" /> |
20 | | - <include name="*.txt" /> |
21 | | - <include name="*.g" /> |
22 | | - <include name="*.smap" /> |
23 | | - </fileset> |
24 | | - </delete> |
25 | | - <delete failonerror="false"> |
26 | | - <!-- jdf sez: don't name anything FooRecognizer or FooLexer in this package --> |
27 | | - <fileset dir="${basedir}/src/processing/app/preproc"> |
28 | | - <include name="*Recognizer.java" /> |
29 | | - <include name="*Lexer.java" /> |
30 | | - <include name="*.tokens" /> |
31 | | - <include name="*.txt" /> |
32 | | - <include name="*.g" /> |
33 | | - <include name="*.smap" /> |
34 | | - </fileset> |
35 | | - </delete> |
36 | | - <!-- END SECTION TO CLEAN UP AFTER OLD PROJECT LAYOUT --> |
| 14 | + <!-- THIS SECTION SHOULD BE REMOVED AFTER A MONTH OR TWO --> |
| 15 | + <!-- jdf sez: clean up after old layout of generated resources --> |
| 16 | + <delete failonerror="false"> |
| 17 | + <fileset dir="${basedir}/src/antlr/java"> |
| 18 | + <include name="*.java" /> |
| 19 | + <include name="*.tokens" /> |
| 20 | + <include name="*.txt" /> |
| 21 | + <include name="*.g" /> |
| 22 | + <include name="*.smap" /> |
| 23 | + </fileset> |
| 24 | + </delete> |
| 25 | + <delete failonerror="false"> |
| 26 | + <!-- jdf sez: don't name anything FooRecognizer or FooLexer in this package --> |
| 27 | + <fileset dir="${basedir}/src/processing/app/preproc"> |
| 28 | + <include name="*Recognizer.java" /> |
| 29 | + <include name="*Lexer.java" /> |
| 30 | + <include name="*.tokens" /> |
| 31 | + <include name="*.txt" /> |
| 32 | + <include name="*.g" /> |
| 33 | + <include name="*.smap" /> |
| 34 | + </fileset> |
| 35 | + </delete> |
| 36 | + <!-- END SECTION TO CLEAN UP AFTER OLD PROJECT LAYOUT --> |
37 | 37 |
|
38 | | - <delete dir="bin" /> |
39 | | - <delete file="pde.jar" /> |
40 | | - <delete> |
41 | | - <fileset dir="${generated}"> |
42 | | - <include name="*.java" /> |
43 | | - <include name="*.tokens" /> |
44 | | - <include name="*.txt" /> |
45 | | - <include name="*.g" /> |
46 | | - <include name="*.smap" /> |
47 | | - </fileset> |
48 | | - </delete> |
49 | | - </target> |
| 38 | + <delete dir="bin" /> |
| 39 | + <delete file="pde.jar" /> |
| 40 | + <delete> |
| 41 | + <fileset dir="${generated}"> |
| 42 | + <include name="*.java" /> |
| 43 | + <include name="*.tokens" /> |
| 44 | + <include name="*.txt" /> |
| 45 | + <include name="*.g" /> |
| 46 | + <include name="*.smap" /> |
| 47 | + </fileset> |
| 48 | + </delete> |
| 49 | + </target> |
50 | 50 |
|
51 | | - <target name="preproc" depends="clean" description="Compile ANTLR grammar"> |
52 | | - <antlr target="${grammars}/java15.g" outputdirectory="${generated}"> |
53 | | - <classpath path="${antlrjar}" /> |
54 | | - </antlr> |
55 | | - <antlr target="${grammars}/pde.g" outputdirectory="${generated}" glib="${grammars}/java15.g"> |
56 | | - <classpath path="${antlrjar}" /> |
57 | | - </antlr> |
58 | | - </target> |
| 51 | + <target name="preproc" depends="clean" description="Compile ANTLR grammar"> |
| 52 | + <antlr target="${grammars}/java15.g" outputdirectory="${generated}"> |
| 53 | + <classpath path="${antlrjar}" /> |
| 54 | + </antlr> |
| 55 | + <antlr target="${grammars}/pde.g" outputdirectory="${generated}" glib="${grammars}/java15.g"> |
| 56 | + <classpath path="${antlrjar}" /> |
| 57 | + </antlr> |
| 58 | + </target> |
59 | 59 |
|
60 | | - <target name="compile" depends="preproc" description="Compile sources"> |
61 | | - <condition property="core-built"> |
62 | | - <available file="../core/core.jar" /> |
63 | | - </condition> |
64 | | - <fail unless="core-built" |
65 | | - message="Please build the core library first and make sure it sits in ../core/core.jar" /> |
| 60 | + <target name="compile" depends="preproc" description="Compile sources"> |
| 61 | + <condition property="core-built"> |
| 62 | + <available file="../core/core.jar" /> |
| 63 | + </condition> |
| 64 | + <fail unless="core-built" |
| 65 | + message="Please build the core library first and make sure it sits in ../core/core.jar" /> |
66 | 66 |
|
67 | | - <mkdir dir="bin" /> |
| 67 | + <mkdir dir="bin" /> |
68 | 68 |
|
69 | | - <!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE |
| 69 | + <!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE |
70 | 70 | subfolder instead of the actual JDK found at JAVA_HOME. |
71 | 71 | To avoid this, we grab the actual JAVA_HOME environment variable |
72 | 72 | and use that to specify the location of tools.jar. --> |
| 73 | + <!-- if someone is better with ant please help clean this up --> |
73 | 74 |
|
74 | | - <!-- if someone is better with ant please help clean this up --> |
75 | | - <property environment="env" /> |
76 | | - <property name="java_home" value="${env.JAVA_HOME}" /> |
| 75 | + <property environment="env" /> |
| 76 | + <property name="java_home" value="${env.JAVA_HOME}" /> |
77 | 77 |
|
78 | | - <condition property="linux"> |
79 | | - <os family="unix" /> |
80 | | - </condition> |
81 | | - <fail if="linux" unless="java_home" |
82 | | - message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Ubuntu Linux, this might be /usr/lib/jvm/java-6-sun." /> |
| 78 | + <condition property="linux"> |
| 79 | + <os family="unix" /> |
| 80 | + </condition> |
| 81 | + <fail if="linux" unless="java_home" |
| 82 | + message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Ubuntu Linux, this might be /usr/lib/jvm/java-6-sun." /> |
83 | 83 |
|
84 | | - <condition property="windows"> |
85 | | - <os family="windows" /> |
86 | | - </condition> |
87 | | - <fail if="windows" unless="java_home" |
88 | | - message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Windows, this might be c:\jdk1.6.0_18." /> |
| 84 | + <condition property="windows"> |
| 85 | + <os family="windows" /> |
| 86 | + </condition> |
| 87 | + <fail if="windows" unless="java_home" |
| 88 | + message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Windows, this might be c:\jdk1.6.0_18." /> |
89 | 89 |
|
90 | | - <!-- |
91 | | - <dirname property="blah" file="${java.home}" /> |
92 | | - <echo message="here! ${java.home}/lib/tools.jar or there: ${blah}" /> |
93 | | - <echo message="override ${env.JAVA_HOME}/lib/tools.jar" /> |
94 | | - <fail /> |
95 | | ---> |
96 | | - <javac target="1.5" |
97 | | - destdir="bin" |
98 | | - excludes="**/tools/format/**" |
99 | | - encoding="UTF-8" |
100 | | - includeAntRuntime="false" |
101 | | - 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" |
102 | | - debug="on" |
103 | | - > |
104 | | - <src path="src" /> |
105 | | - <src path="generated" /> |
106 | | - </javac> |
107 | | - <javac target="1.5" |
108 | | - srcdir="../android/tool/src" |
109 | | - destdir="bin" |
110 | | - encoding="UTF-8" |
111 | | - includeAntRuntime="false" |
112 | | - 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" |
113 | | - /> |
114 | | - </target> |
| 90 | + <!-- |
| 91 | + <dirname property="blah" file="${java.home}" /> |
| 92 | + <echo message="here! ${java.home}/lib/tools.jar or there: ${blah}" /> |
| 93 | + <echo message="override ${env.JAVA_HOME}/lib/tools.jar" /> |
| 94 | + <fail /> |
| 95 | + --> |
| 96 | + <javac target="1.5" |
| 97 | + destdir="bin" |
| 98 | + excludes="**/tools/format/**" |
| 99 | + encoding="UTF-8" |
| 100 | + includeAntRuntime="false" |
| 101 | + 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" |
| 102 | + debug="on" |
| 103 | + > |
| 104 | + <src path="src" /> |
| 105 | + <src path="generated" /> |
| 106 | + </javac> |
| 107 | + <javac target="1.5" |
| 108 | + srcdir="../android/tool/src" |
| 109 | + destdir="bin" |
| 110 | + encoding="UTF-8" |
| 111 | + includeAntRuntime="false" |
| 112 | + 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" |
| 113 | + /> |
| 114 | + </target> |
115 | 115 |
|
116 | | - <target name="build" depends="compile" description="Build PDE"> |
117 | | - <jar basedir="bin" destfile="pde.jar" /> |
118 | | - </target> |
| 116 | + <target name="build" depends="compile" description="Build PDE"> |
| 117 | + <jar basedir="bin" destfile="pde.jar" /> |
| 118 | + </target> |
119 | 119 | </project> |
0 commit comments