Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Side by Side Diff: compiler/dartc.xml

Issue 9702034: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: junit tests fixed Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « compiler/dartc.mf ('k') | compiler/eclipse.workspace/dartc/.classpath » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
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
4 BSD-style license that can be found in the LICENSE file.
5 -->
6 <project default="dist">
7 <import file="sources.xml"/>
8 <import file="test_sources.xml"/>
9 <import file="corelib_sources.xml"/>
10 <import file="compiler_corelib_sources.xml"/>
11 <import file="domlib_sources.xml"/>
12 <import file="htmllib_sources.xml"/>
13 <import file="jsonlib_sources.xml"/>
14 <import file="isolatelib_sources.xml"/>
15
16 <!--
17 The file build.properties does not exist. If provided, properties can be cus tomized.
18 -->
19 <property file="build.properties" />
20
21 <!--
22 Configuration properties.
23 -->
24 <property name="build.dir" value="out"/>
25
26 <property name="build.classes.dir" value="${build.dir}/classes"/>
27
28 <property name="corelib.source.dir" value="${build.dir}/corelib"/>
29
30 <property name="domlib.source.dir" value="${build.dir}/../client/dom/"/>
31
32 <property name="htmllib.source.dir" value="${build.dir}/../client/html/"/>
33
34 <property name="jsonlib.source.dir" value="${build.dir}/../lib/json/"/>
35
36 <property name="isolatelib.source.dir" value="${build.dir}/../lib/isolate/"/>
37
38 <property name="build.test.classes.dir" value="${build.dir}/test/classes"/>
39
40 <property name="dartc.jar" value="${build.dir}/dartc.jar"/>
41
42 <property name="corelib.jar" value="${build.dir}/corelib.jar"/>
43
44 <property name="domlib.jar" value="${build.dir}/domlib.jar"/>
45
46 <property name="htmllib.jar" value="${build.dir}/htmllib.jar"/>
47
48 <property name="jsonlib.jar" value="${build.dir}/jsonlib.jar"/>
49
50 <property name="isolatelib.jar" value="${build.dir}/isolatelib.jar"/>
51
52 <property name="dist.dir" value="${build.dir}/dist"/>
53
54 <property name="test.report.dir" value="${build.dir}/test"/>
55
56 <property name="third_party.dir" value="../third_party"/>
57
58 <property name="test_py" location="../tools/test.py"/>
59
60 <!--
61 Define buildtime and runtime classpaths.
62 -->
63 <path id="classpath.compile">
64 <pathelement location="${third_party.dir}/args4j/2.0.12/args4j-2.0.12.jar"/>
65 <pathelement location="${third_party.dir}/guava/r09/guava-r09.jar"/>
66 <pathelement location="${third_party.dir}/json/r2_20080312/json.jar"/>
67 </path>
68
69 <path id="classpath.runtime">
70 <path refid="classpath.compile"/>
71 </path>
72
73 <path id="classpath.compile.tests">
74 <path refid="classpath.compile"/>
75 <pathelement location="${build.classes.dir}"/>
76 <pathelement location="${third_party.dir}/junit/v4_8_2/junit.jar"/>
77 </path>
78
79 <path id="classpath.run.tests">
80 <path refid="classpath.compile.tests"/>
81 <pathelement location="${build.test.classes.dir}"/>
82 <pathelement location="${third_party.dir}/hamcrest/v1_3/hamcrest-core-1.3.0R C2.jar"/>
83 <pathelement location="${third_party.dir}/hamcrest/v1_3/hamcrest-generator-1 .3.0RC2.jar"/>
84 <pathelement location="${third_party.dir}/hamcrest/v1_3/hamcrest-integration -1.3.0RC2.jar"/>
85 <pathelement location="${third_party.dir}/hamcrest/v1_3/hamcrest-library-1.3 .0RC2.jar"/>
86 </path>
87
88 <target name="compile" description="Compiles all of the java source and copies resources to the classes directory.">
89 <!--
90 Ensure the necessary subdirectories exist.
91 -->
92 <mkdir dir="${build.classes.dir}"/>
93
94 <javac destdir="${build.classes.dir}"
95 sourcepath=""
96 srcdir="java"
97 includes="${java_sources}"
98 fork="true"
99 debug="true">
100 <classpath refid="classpath.compile"/>
101 </javac>
102 <!--
103 Copy all non-java resources.
104 -->
105 <copy todir="${build.classes.dir}">
106 <filelist refid="java_resources"/>
107 </copy>
108 </target>
109
110 <!--
111 We rely on GYP to call these targets when the dartc dependencies change, hen ce this
112 ant file cannot be used standalone.
113 -->
114 <target name="corelib.jar" description="Packages the corelib resources into on e jar file." >
115 <delete file="${corelib.jar}"/>
116 <mkdir dir="${corelib.source.dir}"/>
117 <copy todir="${corelib.source.dir}/com/google/dart/corelib/src">
118 <filelist refid="corelib_resources"/>
119 </copy>
120 <copy todir="${corelib.source.dir}/com/google/dart/corelib">
121 <filelist refid="compiler_corelib_resources"/>
122 </copy>
123 <jar destfile="${corelib.jar}" basedir="${corelib.source.dir}"/>
124 <touch file="${build.dir}/corelib.jar.stamp"/>
125 </target>
126
127 <target name="domlib.jar" description="Packages the dom library resources into one jar file." >
128 <delete dir="${build.dir}/api/dart/dom"/>
129 <delete file="${domlib.jar}"/>
130 <mkdir dir="${domlib.source.dir}"/>
131 <copy todir="${domlib.source.dir}/dom">
132 <filelist refid="domlib_resources"/>
133 </copy>
134 <jar destfile="${domlib.jar}" basedir="${domlib.source.dir}"/>
135 <touch file="${build.dir}/domlib.jar.stamp"/>
136 </target>
137
138 <target name="htmllib.jar" description="Packages the html library resources in to one jar file." >
139 <delete dir="${build.dir}/api/dart/html"/>
140 <delete file="${htmllib.jar}"/>
141 <mkdir dir="${htmllib.source.dir}"/>
142 <copy todir="${htmllib.source.dir}/html" preservelastmodified="true">
143 <filelist refid="htmllib_resources"/>
144 </copy>
145 <jar destfile="${htmllib.jar}" basedir="${htmllib.source.dir}"/>
146 <touch file="${build.dir}/htmllib.jar.stamp"/>
147 </target>
148
149 <target name="jsonlib.jar" description="Packages the json library resources in to one jar file." >
150 <delete dir="${build.dir}/api/dart/json"/>
151 <delete file="${jsonlib.jar}"/>
152 <mkdir dir="${jsonlib.source.dir}"/>
153 <copy todir="${jsonlib.source.dir}/json">
154 <filelist refid="jsonlib_resources"/>
155 </copy>
156 <jar destfile="${jsonlib.jar}" basedir="${jsonlib.source.dir}"/>
157 <touch file="${build.dir}/jsonlib.jar.stamp"/>
158 </target>
159
160 <target name="isolatelib.jar" description="Packages the isolate library resour ces into one jar file." >
161 <delete dir="${build.dir}/api/dart/isolate"/>
162 <delete file="${isolatelib.jar}"/>
163 <mkdir dir="${isolatelib.source.dir}"/>
164 <copy todir="${isolatelib.source.dir}/isolate">
165 <filelist refid="isolatelib_resources"/>
166 </copy>
167 <jar destfile="${isolatelib.jar}" basedir="${isolatelib.source.dir}"/>
168 <touch file="${build.dir}/isolatelib.jar.stamp"/>
169 </target>
170
171
172 <target name="compile-tests" depends="compile" description="Compiles all of th e java tests and copies the resources to the test classes directory." >
173 <mkdir dir="${build.test.classes.dir}"/>
174 <javac destdir="${build.test.classes.dir}"
175 sourcepath=""
176 srcdir="javatests"
177 includes="${javatests_sources}"
178 excludes="com/google/dart/compiler/vm/**"
179 fork="true"
180 debug="true">
181 <classpath refid="classpath.compile.tests"/>
182 </javac>
183 <!--
184 Copy the non-java resources.
185 -->
186 <copy todir="${build.test.classes.dir}">
187 <filelist refid="javatests_resources"/>
188 </copy>
189 </target>
190
191 <target name="dartc.jar" depends="compile" description="Creates a jar for dart c without bundling the dependencies.">
192 <jar destfile="${dartc.jar}" basedir="${build.classes.dir}" manifest="dartc. mf"/>
193 </target>
194
195 <target name="syslib" depends="corelib.jar,domlib.jar,htmllib.jar,jsonlib.jar, isolatelib.jar" description="Stub for system library task">
196 <!--
197 Copy the system library jars to the lib folder.
198 -->
199 <copy file="${corelib.jar}" todir="${dist.dir}/lib"/>
200 <copy file="${domlib.jar}" todir="${dist.dir}/lib"/>
201 <copy file="${htmllib.jar}" todir="${dist.dir}/lib"/>
202 <copy file="${jsonlib.jar}" todir="${dist.dir}/lib"/>
203 <copy file="${isolatelib.jar}" todir="${dist.dir}/lib"/>
204
205 <touch file="${build.dir}/syslib.stamp"/>
206 </target>
207
208 <target name="syslib_clean" description="Clean out the system libraries">
209 <delete file="${build.dir}/syslib.stamp"/>
210 </target>
211
212 <target name="dist" depends="dartc.jar" description="Creates a directory that contains a standalone distribution for dartc.">
213 <!--
214 Ensure the necessary subdirectories exist.
215 -->
216 <mkdir dir="${dist.dir}/bin"/>
217 <mkdir dir="${dist.dir}/lib"/>
218
219 <!--
220 Copy the dart jar to the lib folder.
221 -->
222 <copy file="${dartc.jar}" todir="${dist.dir}/lib"/>
223
224 <!--
225 Re-root the classpaths from third_party into the lib folder of the distro.
226 -->
227 <pathconvert property="dartc.classpath.runtime.unix" targetos="unix" refid=" classpath.runtime">
228 <regexpmapper from="${third_party.dir}/(.*)" to="$DARTC_LIBS/\1"/>
229 </pathconvert>
230
231 <copy file="scripts/dartc.sh" tofile="${dist.dir}/bin/dartc">
232 <filterset>
233 <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}"/>
234 </filterset>
235 </copy>
236 <chmod file="${dist.dir}/bin/dartc" perm="a+rx"/>
237
238 <!--
239 TODO: The following files are not strictly due to dist, move them out.
240 -->
241 <copy todir="${build.dir}">
242 <fileset dir="scripts">
243 <include name="dartc_run.sh"/>
244 <include name="dartc_metrics.sh"/>
245 </fileset>
246 <filterset>
247 <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}"/>
248 </filterset>
249 </copy>
250 <chmod file="${build.dir}/dartc_run.sh" perm="a+rx"/>
251 <chmod file="${build.dir}/dartc_metrics.sh" perm="a+rx"/>
252
253 <!--
254 Copy of all of the dartc dependencies to the lib folder.
255 -->
256 <copy todir="${dist.dir}/lib">
257 <path refid="classpath.runtime"/>
258 <regexpmapper from="${third_party.dir}/(.*)" to="\1"/>
259 </copy>
260 </target>
261
262 <target name="clean" description="Deletes the build output directory.">
263 <delete dir="${build.dir}"/>
264 <delete dir="${dist.dir}"/>
265 </target>
266
267 <target name="tests.jar" depends="compile-tests">
268 <jar destfile="${build.dir}/tests.jar" basedir="${build.test.classes.dir}"/>
269 </target>
270 </project>
OLDNEW
« no previous file with comments | « compiler/dartc.mf ('k') | compiler/eclipse.workspace/dartc/.classpath » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698