| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 for details. All rights reserved. Use of this source code is governed by a | 3 for details. All rights reserved. Use of this source code is governed by a |
| 4 BSD-style license that can be found in the LICENSE file. | 4 BSD-style license that can be found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <project default="dist"> | 6 <project default="dist"> |
| 7 <import file="sources.xml"/> | 7 <import file="sources.xml"/> |
| 8 <import file="test_sources.xml"/> | 8 <import file="test_sources.xml"/> |
| 9 <import file="corelib_sources.xml"/> | 9 <import file="corelib_sources.xml"/> |
| 10 <import file="compiler_corelib_sources.xml"/> | 10 <import file="compiler_corelib_sources.xml"/> |
| 11 <import file="domlib_sources.xml"/> | 11 <import file="domlib_sources.xml"/> |
| 12 <import file="htmllib_sources.xml"/> | 12 <import file="htmllib_sources.xml"/> |
| 13 <import file="jsonlib_sources.xml"/> | 13 <import file="jsonlib_sources.xml"/> |
| 14 <import file="isolatelib_sources.xml"/> |
| 14 | 15 |
| 15 <!-- | 16 <!-- |
| 16 The file build.properties does not exist. If provided, properties can be cus
tomized. | 17 The file build.properties does not exist. If provided, properties can be cus
tomized. |
| 17 --> | 18 --> |
| 18 <property file="build.properties" /> | 19 <property file="build.properties" /> |
| 19 | 20 |
| 20 <!-- | 21 <!-- |
| 21 Configuration properties. | 22 Configuration properties. |
| 22 --> | 23 --> |
| 23 <property name="build.dir" value="out"/> | 24 <property name="build.dir" value="out"/> |
| 24 | 25 |
| 25 <property name="build.classes.dir" value="${build.dir}/classes"/> | 26 <property name="build.classes.dir" value="${build.dir}/classes"/> |
| 26 | 27 |
| 27 <property name="corelib.source.dir" value="${build.dir}/corelib"/> | 28 <property name="corelib.source.dir" value="${build.dir}/corelib"/> |
| 28 | 29 |
| 29 <property name="domlib.source.dir" value="${build.dir}/../client/dom/"/> | 30 <property name="domlib.source.dir" value="${build.dir}/../client/dom/"/> |
| 30 | 31 |
| 31 <property name="htmllib.source.dir" value="${build.dir}/../client/html/"/> | 32 <property name="htmllib.source.dir" value="${build.dir}/../client/html/"/> |
| 32 | 33 |
| 33 <property name="jsonlib.source.dir" value="${build.dir}/../lib/json/"/> | 34 <property name="jsonlib.source.dir" value="${build.dir}/../lib/json/"/> |
| 34 | 35 |
| 36 <property name="isolatelib.source.dir" value="${build.dir}/../lib/isolate/"/> |
| 37 |
| 35 <property name="build.test.classes.dir" value="${build.dir}/test/classes"/> | 38 <property name="build.test.classes.dir" value="${build.dir}/test/classes"/> |
| 36 | 39 |
| 37 <property name="dartc.jar" value="${build.dir}/dartc.jar"/> | 40 <property name="dartc.jar" value="${build.dir}/dartc.jar"/> |
| 38 | 41 |
| 39 <property name="corelib.jar" value="${build.dir}/corelib.jar"/> | 42 <property name="corelib.jar" value="${build.dir}/corelib.jar"/> |
| 40 | 43 |
| 41 <property name="domlib.jar" value="${build.dir}/domlib.jar"/> | 44 <property name="domlib.jar" value="${build.dir}/domlib.jar"/> |
| 42 | 45 |
| 43 <property name="htmllib.jar" value="${build.dir}/htmllib.jar"/> | 46 <property name="htmllib.jar" value="${build.dir}/htmllib.jar"/> |
| 44 | 47 |
| 45 <property name="jsonlib.jar" value="${build.dir}/jsonlib.jar"/> | 48 <property name="jsonlib.jar" value="${build.dir}/jsonlib.jar"/> |
| 46 | 49 |
| 50 <property name="isolatelib.jar" value="${build.dir}/isolatelib.jar"/> |
| 51 |
| 47 <property name="dist.dir" value="${build.dir}/dist"/> | 52 <property name="dist.dir" value="${build.dir}/dist"/> |
| 48 | 53 |
| 49 <property name="test.report.dir" value="${build.dir}/test"/> | 54 <property name="test.report.dir" value="${build.dir}/test"/> |
| 50 | 55 |
| 51 <property name="third_party.dir" value="../third_party"/> | 56 <property name="third_party.dir" value="../third_party"/> |
| 52 | 57 |
| 53 <property name="test_py" location="../tools/test.py"/> | 58 <property name="test_py" location="../tools/test.py"/> |
| 54 | 59 |
| 55 <!-- | 60 <!-- |
| 56 Define buildtime and runtime classpaths. | 61 Define buildtime and runtime classpaths. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 <delete dir="${build.dir}/api/dart/json"/> | 151 <delete dir="${build.dir}/api/dart/json"/> |
| 147 <delete file="${jsonlib.jar}"/> | 152 <delete file="${jsonlib.jar}"/> |
| 148 <mkdir dir="${jsonlib.source.dir}"/> | 153 <mkdir dir="${jsonlib.source.dir}"/> |
| 149 <copy todir="${jsonlib.source.dir}/json"> | 154 <copy todir="${jsonlib.source.dir}/json"> |
| 150 <filelist refid="jsonlib_resources"/> | 155 <filelist refid="jsonlib_resources"/> |
| 151 </copy> | 156 </copy> |
| 152 <jar destfile="${jsonlib.jar}" basedir="${jsonlib.source.dir}"/> | 157 <jar destfile="${jsonlib.jar}" basedir="${jsonlib.source.dir}"/> |
| 153 <touch file="${build.dir}/jsonlib.jar.stamp"/> | 158 <touch file="${build.dir}/jsonlib.jar.stamp"/> |
| 154 </target> | 159 </target> |
| 155 | 160 |
| 161 <target name="isolatelib.jar" description="Packages the isolate library resour
ces into one jar file." > |
| 162 <delete dir="${build.dir}/api/dart/isolate"/> |
| 163 <delete file="${isolatelib.jar}"/> |
| 164 <mkdir dir="${isolatelib.source.dir}"/> |
| 165 <copy todir="${isolatelib.source.dir}/isolate"> |
| 166 <filelist refid="isolatelib_resources"/> |
| 167 </copy> |
| 168 <jar destfile="${isolatelib.jar}" basedir="${isolatelib.source.dir}"/> |
| 169 <touch file="${build.dir}/isolatelib.jar.stamp"/> |
| 170 </target> |
| 171 |
| 172 |
| 156 <target name="compile-tests" depends="compile" description="Compiles all of th
e java tests and copies the resources to the test classes directory." > | 173 <target name="compile-tests" depends="compile" description="Compiles all of th
e java tests and copies the resources to the test classes directory." > |
| 157 <mkdir dir="${build.test.classes.dir}"/> | 174 <mkdir dir="${build.test.classes.dir}"/> |
| 158 <javac destdir="${build.test.classes.dir}" | 175 <javac destdir="${build.test.classes.dir}" |
| 159 sourcepath="" | 176 sourcepath="" |
| 160 srcdir="javatests" | 177 srcdir="javatests" |
| 161 includes="${javatests_sources}" | 178 includes="${javatests_sources}" |
| 162 excludes="com/google/dart/compiler/vm/**" | 179 excludes="com/google/dart/compiler/vm/**" |
| 163 fork="true" | 180 fork="true" |
| 164 debug="true"> | 181 debug="true"> |
| 165 <classpath refid="classpath.compile.tests"/> | 182 <classpath refid="classpath.compile.tests"/> |
| 166 </javac> | 183 </javac> |
| 167 <!-- | 184 <!-- |
| 168 Copy the non-java resources. | 185 Copy the non-java resources. |
| 169 --> | 186 --> |
| 170 <copy todir="${build.test.classes.dir}"> | 187 <copy todir="${build.test.classes.dir}"> |
| 171 <filelist refid="javatests_resources"/> | 188 <filelist refid="javatests_resources"/> |
| 172 </copy> | 189 </copy> |
| 173 </target> | 190 </target> |
| 174 | 191 |
| 175 <target name="dartc.jar" depends="compile" description="Creates a jar for dart
c without bundling the dependencies."> | 192 <target name="dartc.jar" depends="compile" description="Creates a jar for dart
c without bundling the dependencies."> |
| 176 <jar destfile="${dartc.jar}" basedir="${build.classes.dir}" manifest="dartc.
mf"/> | 193 <jar destfile="${dartc.jar}" basedir="${build.classes.dir}" manifest="dartc.
mf"/> |
| 177 </target> | 194 </target> |
| 178 | 195 |
| 179 <target name="syslib" depends="corelib.jar,domlib.jar,htmllib.jar,jsonlib.jar"
description="Stub for system library task"> | 196 <target name="syslib" depends="corelib.jar,domlib.jar,htmllib.jar,jsonlib.jar,
isolatelib.jar" description="Stub for system library task"> |
| 180 <!-- | 197 <!-- |
| 181 Copy the system library jars to the lib folder. | 198 Copy the system library jars to the lib folder. |
| 182 --> | 199 --> |
| 183 <copy file="${corelib.jar}" todir="${dist.dir}/lib"/> | 200 <copy file="${corelib.jar}" todir="${dist.dir}/lib"/> |
| 184 <copy file="${domlib.jar}" todir="${dist.dir}/lib"/> | 201 <copy file="${domlib.jar}" todir="${dist.dir}/lib"/> |
| 185 <copy file="${htmllib.jar}" todir="${dist.dir}/lib"/> | 202 <copy file="${htmllib.jar}" todir="${dist.dir}/lib"/> |
| 186 <copy file="${jsonlib.jar}" todir="${dist.dir}/lib"/> | 203 <copy file="${jsonlib.jar}" todir="${dist.dir}/lib"/> |
| 204 <copy file="${isolatelib.jar}" todir="${dist.dir}/lib"/> |
| 187 | 205 |
| 188 <touch file="${build.dir}/syslib.stamp"/> | 206 <touch file="${build.dir}/syslib.stamp"/> |
| 189 </target> | 207 </target> |
| 190 | 208 |
| 191 <target name="syslib_clean" description="Clean out the system libraries"> | 209 <target name="syslib_clean" description="Clean out the system libraries"> |
| 192 <delete file="${build.dir}/syslib.stamp"/> | 210 <delete file="${build.dir}/syslib.stamp"/> |
| 193 </target> | 211 </target> |
| 194 | 212 |
| 195 <target name="dist" depends="dartc.jar" description="Creates a directory that
contains a standalone distribution for dartc."> | 213 <target name="dist" depends="dartc.jar" description="Creates a directory that
contains a standalone distribution for dartc."> |
| 196 <!-- | 214 <!-- |
| 197 Ensure the necessary subdirectories exist. | 215 Ensure the necessary subdirectories exist. |
| 198 --> | 216 --> |
| 199 <mkdir dir="${dist.dir}/bin"/> | 217 <mkdir dir="${dist.dir}/bin"/> |
| 200 <mkdir dir="${dist.dir}/lib"/> | 218 <mkdir dir="${dist.dir}/lib"/> |
| 201 | 219 |
| 202 <!-- | 220 <!-- |
| 203 Copy the dart jar to the lib folder. | 221 Copy the dart jar to the lib folder. |
| 204 --> | 222 --> |
| 205 <copy file="${dartc.jar}" todir="${dist.dir}/lib"/> | 223 <copy file="${dartc.jar}" todir="${dist.dir}/lib"/> |
| 206 | 224 |
| 207 <!-- | 225 <!-- |
| 208 Re-root the classpaths from third_party into the lib folder of the distro. | 226 Re-root the classpaths from third_party into the lib folder of the distro. |
| 209 --> | 227 --> |
| 210 <pathconvert property="dartc.classpath.runtime.unix" targetos="unix" refid="
classpath.runtime"> | 228 <pathconvert property="dartc.classpath.runtime.unix" targetos="unix" refid="
classpath.runtime"> |
| 211 <regexpmapper from="${third_party.dir}/(.*)" to="$DARTC_LIBS/\1"/> | 229 <regexpmapper from="${third_party.dir}/(.*)" to="$DARTC_LIBS/\1"/> |
| 212 </pathconvert> | 230 </pathconvert> |
| 213 | 231 |
| 214 <copy file="scripts/dartc.sh" tofile="${dist.dir}/bin/dartc"> | 232 <copy file="scripts/dartc.sh" tofile="${dist.dir}/bin/dartc"> |
| 215 <filterset> | 233 <filterset> |
| 216 <filter token="CLASSPATH" value="$DARTC_LIBS/dartc.jar:$DARTC_LIBS/corel
ib.jar:$DARTC_LIBS/domlib.jar:$DARTC_LIBS/htmllib.jar:$DARTC_LIBS/jsonlib.jar:${
dartc.classpath.runtime.unix}"/> | 234 <filter token="CLASSPATH" value="$DARTC_LIBS/dartc.jar:$DARTC_LIBS/corel
ib.jar:$DARTC_LIBS/domlib.jar:$DARTC_LIBS/htmllib.jar:$DARTC_LIBS/jsonlib.jar:$D
ARTC_LIBS/isolatelib.jar:${dartc.classpath.runtime.unix}"/> |
| 217 </filterset> | 235 </filterset> |
| 218 </copy> | 236 </copy> |
| 219 <chmod file="${dist.dir}/bin/dartc" perm="a+rx"/> | 237 <chmod file="${dist.dir}/bin/dartc" perm="a+rx"/> |
| 220 | 238 |
| 221 <!-- | 239 <!-- |
| 222 TODO: The following files are not strictly due to dist, move them out. | 240 TODO: The following files are not strictly due to dist, move them out. |
| 223 --> | 241 --> |
| 224 <copy todir="${build.dir}"> | 242 <copy todir="${build.dir}"> |
| 225 <fileset dir="scripts"> | 243 <fileset dir="scripts"> |
| 226 <include name="dartc_run.sh"/> | 244 <include name="dartc_run.sh"/> |
| 227 <include name="dartc_metrics.sh"/> | 245 <include name="dartc_metrics.sh"/> |
| 228 </fileset> | 246 </fileset> |
| 229 <filterset> | 247 <filterset> |
| 230 <filter token="CLASSPATH" value="$DARTC_LIBS/dartc.jar:$DARTC_LIBS/corel
ib.jar:$DARTC_LIBS/domlib.jar:$DARTC_LIBS/htmllib.jar:$DARTC_LIBS/jsonlib.jar:${
dartc.classpath.runtime.unix}"/> | 248 <filter token="CLASSPATH" value="$DARTC_LIBS/dartc.jar:$DARTC_LIBS/corel
ib.jar:$DARTC_LIBS/domlib.jar:$DARTC_LIBS/htmllib.jar:$DARTC_LIBS/jsonlib.jar:$D
ARTC_LIBS/isolatelib.jar:${dartc.classpath.runtime.unix}"/> |
| 231 </filterset> | 249 </filterset> |
| 232 </copy> | 250 </copy> |
| 233 <chmod file="${build.dir}/dartc_run.sh" perm="a+rx"/> | 251 <chmod file="${build.dir}/dartc_run.sh" perm="a+rx"/> |
| 234 <chmod file="${build.dir}/dartc_metrics.sh" perm="a+rx"/> | 252 <chmod file="${build.dir}/dartc_metrics.sh" perm="a+rx"/> |
| 235 | 253 |
| 236 <!-- | 254 <!-- |
| 237 Copy of all of the dartc dependencies to the lib folder. | 255 Copy of all of the dartc dependencies to the lib folder. |
| 238 --> | 256 --> |
| 239 <copy todir="${dist.dir}/lib"> | 257 <copy todir="${dist.dir}/lib"> |
| 240 <path refid="classpath.runtime"/> | 258 <path refid="classpath.runtime"/> |
| 241 <regexpmapper from="${third_party.dir}/(.*)" to="\1"/> | 259 <regexpmapper from="${third_party.dir}/(.*)" to="\1"/> |
| 242 </copy> | 260 </copy> |
| 243 </target> | 261 </target> |
| 244 | 262 |
| 245 <target name="clean" description="Deletes the build output directory."> | 263 <target name="clean" description="Deletes the build output directory."> |
| 246 <delete dir="${build.dir}"/> | 264 <delete dir="${build.dir}"/> |
| 247 <delete dir="${dist.dir}"/> | 265 <delete dir="${dist.dir}"/> |
| 248 </target> | 266 </target> |
| 249 | 267 |
| 250 <target name="tests.jar" depends="compile-tests"> | 268 <target name="tests.jar" depends="compile-tests"> |
| 251 <jar destfile="${build.dir}/tests.jar" basedir="${build.test.classes.dir}"/> | 269 <jar destfile="${build.dir}/tests.jar" basedir="${build.test.classes.dir}"/> |
| 252 </target> | 270 </target> |
| 253 </project> | 271 </project> |
| OLD | NEW |