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 | 9 |
10 <!-- | 10 <!-- |
11 The file build.properties does not exist. If provided, properties can be cus tomized. | 11 The file build.properties does not exist. If provided, properties can be cus tomized. |
12 --> | 12 --> |
13 <property file="build.properties" /> | 13 <property file="build.properties" /> |
14 | 14 |
15 <!-- | 15 <!-- |
16 Configuration properties. | 16 Configuration properties. |
17 --> | 17 --> |
18 <property name="build.dir" value="out"/> | 18 <property name="build.dir" value="out"/> |
19 | 19 |
20 <property name="build.classes.dir" value="${build.dir}/classes"/> | 20 <property name="build.classes.dir" value="${build.dir}/classes"/> |
21 | 21 |
22 <property name="build.test.classes.dir" value="${build.dir}/test/classes"/> | 22 <property name="build.test.classes.dir" value="${build.dir}/test/classes"/> |
23 | 23 |
24 <property name="dartc.jar" value="${build.dir}/dartc.jar"/> | 24 <property name="dart_analyzer.jar" value="${build.dir}/dart_analyzer.jar"/> |
25 | 25 |
26 <property name="dist.dir" value="${build.dir}/dist"/> | 26 <property name="dist.dir" value="${build.dir}/dist"/> |
27 | 27 |
28 <property name="test.report.dir" value="${build.dir}/test"/> | 28 <property name="test.report.dir" value="${build.dir}/test"/> |
29 | 29 |
30 <property name="third_party.dir" value="../third_party"/> | 30 <property name="third_party.dir" value="../third_party"/> |
31 | 31 |
32 <property name="test_py" location="../tools/test.py"/> | 32 <property name="test_py" location="../tools/test.py"/> |
33 | 33 |
34 <!-- | 34 <!-- |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 </javac> | 77 </javac> |
78 <!-- | 78 <!-- |
79 Copy all non-java resources. | 79 Copy all non-java resources. |
80 --> | 80 --> |
81 <copy todir="${build.classes.dir}"> | 81 <copy todir="${build.classes.dir}"> |
82 <filelist refid="java_resources"/> | 82 <filelist refid="java_resources"/> |
83 </copy> | 83 </copy> |
84 </target> | 84 </target> |
85 | 85 |
86 <!-- | 86 <!-- |
87 We rely on GYP to call these targets when the dartc dependencies change, hen ce this | 87 We rely on GYP to call these targets when the dart_analyzer dependencies cha nge, hence this |
88 ant file cannot be used standalone. | 88 ant file cannot be used standalone. |
89 --> | 89 --> |
90 <target name="compile-tests" depends="compile" description="Compiles all of th e java tests and copies the resources to the test classes directory." > | 90 <target name="compile-tests" depends="compile" description="Compiles all of th e java tests and copies the resources to the test classes directory." > |
91 <mkdir dir="${build.test.classes.dir}"/> | 91 <mkdir dir="${build.test.classes.dir}"/> |
92 <javac destdir="${build.test.classes.dir}" | 92 <javac destdir="${build.test.classes.dir}" |
93 sourcepath="" | 93 sourcepath="" |
94 srcdir="javatests" | 94 srcdir="javatests" |
95 includes="${javatests_sources}" | 95 includes="${javatests_sources}" |
96 excludes="com/google/dart/compiler/vm/**" | 96 excludes="com/google/dart/compiler/vm/**" |
97 fork="true" | 97 fork="true" |
98 debug="true"> | 98 debug="true"> |
99 <classpath refid="classpath.compile.tests"/> | 99 <classpath refid="classpath.compile.tests"/> |
100 </javac> | 100 </javac> |
101 <!-- | 101 <!-- |
102 Copy the non-java resources. | 102 Copy the non-java resources. |
103 --> | 103 --> |
104 <copy todir="${build.test.classes.dir}"> | 104 <copy todir="${build.test.classes.dir}"> |
105 <filelist refid="javatests_resources"/> | 105 <filelist refid="javatests_resources"/> |
106 </copy> | 106 </copy> |
107 </target> | 107 </target> |
108 | 108 |
109 <target name="dartc.jar" depends="compile" description="Creates a jar for dart c without bundling the dependencies."> | 109 <target name="dart_analyzer.jar" depends="compile" |
110 <jar destfile="${dartc.jar}" basedir="${build.classes.dir}" manifest="dartc. mf"/> | 110 description="Creates a jar for dart analyzer w/o bundling dependencies."> |
111 <jar destfile="${dart_analyzer.jar}" basedir="${build.classes.dir}" | |
112 manifest="dart_analyzer.mf"/> | |
111 </target> | 113 </target> |
112 | 114 |
113 <target name="dist" depends="dartc.jar" description="Creates a directory that contains a standalone distribution for dartc."> | 115 <target name="dist" depends="dart_analyzer.jar" |
116 description="Creates a directory with a standalone distribution."> | |
114 <!-- | 117 <!-- |
115 Ensure the necessary subdirectories exist. | 118 Ensure the necessary subdirectories exist. |
116 --> | 119 --> |
117 <mkdir dir="${dist.dir}/bin"/> | 120 <mkdir dir="${dist.dir}/bin"/> |
118 <mkdir dir="${dist.dir}/lib"/> | 121 <mkdir dir="${dist.dir}/util"/> |
122 <mkdir dir="${dist.dir}/util/analyzer"/> | |
119 | 123 |
120 <!-- | 124 <!-- |
121 Copy the dart jar to the lib folder. | 125 Copy the dart jar to the lib folder. |
122 --> | 126 --> |
123 <copy file="${dartc.jar}" todir="${dist.dir}/lib"/> | 127 <copy file="${dart_analyzer.jar}" todir="${dist.dir}/util/analyzer"/> |
124 | 128 |
125 <!-- | 129 <!-- |
126 Re-root the classpaths from third_party into the lib folder of the distro. | 130 Re-root the classpaths from third_party into the library folder of the dis tro. |
127 --> | 131 --> |
128 <pathconvert property="dartc.classpath.runtime.unix" targetos="unix" refid=" classpath.runtime"> | 132 <pathconvert property="analyzer.classpath.runtime.unix" targetos="unix" refi d="classpath.runtime"> |
129 <regexpmapper from="${third_party.dir}/(.*)" to="$DARTC_LIBS/\1"/> | 133 <regexpmapper from="${third_party.dir}/(.*)" to="$DART_ANALYZER_LIBS/\1"/> |
130 </pathconvert> | 134 </pathconvert> |
131 | 135 |
132 <copy file="scripts/dartc.sh" tofile="${dist.dir}/bin/dartc"> | 136 <copy file="scripts/dart_analyzer.sh" tofile="${dist.dir}/bin/dart_analyzer" > |
133 <filterset> | 137 <filterset> |
134 <filter token="CLASSPATH" value="$DARTC_LIBS/dartc.jar:${dartc.classpath .runtime.unix}"/> | 138 <filter token="CLASSPATH" value="$DART_ANALYZER_LIBS/dart_analyzer.jar:$ {analyzer.classpath.runtime.unix}"/> |
135 </filterset> | 139 </filterset> |
136 </copy> | 140 </copy> |
137 <chmod file="${dist.dir}/bin/dartc" perm="a+rx"/> | 141 <chmod file="${dist.dir}/bin/dart_analyzer" perm="a+rx"/> |
138 | 142 |
139 <!-- | 143 <!-- |
140 TODO: The following files are not strictly due to dist, move them out. | 144 TODO: The following files are not strictly due to dist, move them out. |
141 --> | 145 --> |
142 <copy todir="${build.dir}"> | 146 <copy todir="${build.dir}"> |
143 <fileset dir="scripts"> | 147 <fileset dir="scripts"> |
144 <include name="dartc_run.sh"/> | 148 <include name="analyzer_metrics.sh"/> |
145 <include name="dartc_metrics.sh"/> | |
146 </fileset> | 149 </fileset> |
147 <filterset> | 150 <filterset> |
148 <filter token="CLASSPATH" value="$DARTC_LIBS/dartc.jar:${dartc.classpath .runtime.unix}"/> | 151 <filter token="CLASSPATH" value="$DART_ANALYZER_LIBS/dart_analyzer.jar:$ {analyzer.classpath.runtime.unix}"/> |
149 </filterset> | 152 </filterset> |
150 </copy> | 153 </copy> |
151 <chmod file="${build.dir}/dartc_run.sh" perm="a+rx"/> | 154 <chmod file="${build.dir}/anlaysis_metrics.sh" perm="a+rx"/> |
scheglov
2012/04/11 19:51:59
May be also "analyzer"?
And BTW right now it is mi
zundel
2012/04/17 10:00:41
Done.
| |
152 <chmod file="${build.dir}/dartc_metrics.sh" perm="a+rx"/> | |
153 | 155 |
154 <!-- | 156 <!-- |
155 Copy of all of the dartc dependencies to the lib folder. | 157 Copy of all of the dart anaysis dependencies to the library folder. |
scheglov
2012/04/11 19:51:59
analyzer ?
misspelled
zundel
2012/04/17 10:00:41
Done.
| |
156 --> | 158 --> |
157 <copy todir="${dist.dir}/lib"> | 159 <copy todir="${dist.dir}/util/analyzer"> |
158 <path refid="classpath.runtime"/> | 160 <path refid="classpath.runtime"/> |
159 <regexpmapper from="${third_party.dir}/(.*)" to="\1"/> | 161 <regexpmapper from="${third_party.dir}/(.*)" to="\1"/> |
160 </copy> | 162 </copy> |
161 </target> | 163 </target> |
162 | 164 |
163 <target name="clean" description="Deletes the build output directory."> | 165 <target name="clean" description="Deletes the build output directory."> |
164 <delete dir="${build.dir}"/> | 166 <delete dir="${build.dir}"/> |
165 <delete dir="${dist.dir}"/> | 167 <delete dir="${dist.dir}"/> |
166 </target> | 168 </target> |
167 | 169 |
168 <target name="tests.jar" depends="compile-tests"> | 170 <target name="tests.jar" depends="compile-tests"> |
169 <jar destfile="${build.dir}/tests.jar" basedir="${build.test.classes.dir}"/> | 171 <jar destfile="${build.dir}/tests.jar" basedir="${build.test.classes.dir}"/> |
170 </target> | 172 </target> |
171 </project> | 173 </project> |
OLD | NEW |