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

Side by Side Diff: compiler/darta.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: 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
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
10 <!--
11 The file build.properties does not exist. If provided, properties can be cus tomized.
12 -->
13 <property file="build.properties" />
14
15 <!--
16 Configuration properties.
17 -->
18 <property name="build.dir" value="out"/>
19
20 <property name="build.classes.dir" value="${build.dir}/classes"/>
21
22 <property name="build.test.classes.dir" value="${build.dir}/test/classes"/>
23
24 <property name="darta.jar" value="${build.dir}/darta.jar"/>
25
26 <property name="dist.dir" value="${build.dir}/dist"/> <!-- overriden on cmdlin e -->
27
28 <property name="test.report.dir" value="${build.dir}/test"/>
29
30 <property name="third_party.dir" value="../third_party"/>
31
32 <property name="test_py" location="../tools/test.py"/>
33
34 <!--
35 Define buildtime and runtime classpaths.
36 -->
37 <path id="classpath.compile">
38 <pathelement location="${third_party.dir}/args4j/2.0.12/args4j-2.0.12.jar"/>
39 <pathelement location="${third_party.dir}/guava/r09/guava-r09.jar"/>
40 <pathelement location="${third_party.dir}/json/r2_20080312/json.jar"/>
41 </path>
42
43 <path id="classpath.runtime">
44 <path refid="classpath.compile"/>
45 </path>
46
47 <path id="classpath.compile.tests">
48 <path refid="classpath.compile"/>
49 <pathelement location="${build.classes.dir}"/>
50 <pathelement location="${third_party.dir}/junit/v4_8_2/junit.jar"/>
51 </path>
52
53 <path id="classpath.run.tests">
54 <path refid="classpath.compile.tests"/>
55 <pathelement location="${build.test.classes.dir}"/>
56 </path>
57
58 <target name="compile" description="Compiles all of the java source and copies resources to the classes directory.">
59 <!--
60 Ensure the necessary subdirectories exist.
61 -->
62 <mkdir dir="${build.classes.dir}"/>
63
64 <javac destdir="${build.classes.dir}"
65 sourcepath=""
66 srcdir="java"
67 includes="${java_sources}"
68 fork="true"
69 debug="true">
70 <classpath refid="classpath.compile"/>
71 </javac>
72 <!--
73 Copy all non-java resources.
74 -->
75 <copy todir="${build.classes.dir}">
76 <filelist refid="java_resources"/>
77 </copy>
78 </target>
79
80 <target name="compile-tests" depends="compile" description="Compiles all of th e java tests and copies the resources to the test classes directory." >
81 <mkdir dir="${build.test.classes.dir}"/>
82 <javac destdir="${build.test.classes.dir}"
83 sourcepath=""
84 srcdir="javatests"
85 includes="${javatests_sources}"
86 excludes="com/google/dart/compiler/vm/**"
87 fork="true"
88 debug="true">
89 <classpath refid="classpath.compile.tests"/>
90 </javac>
91 <!--
92 Copy the non-java resources.
93 -->
94 <copy todir="${build.test.classes.dir}">
95 <filelist refid="javatests_resources"/>
96 </copy>
97 </target>
98
99 <target name="darta.jar" depends="compile" description="Creates a jar for dart c without bundling the dependencies.">
100 <jar destfile="${darta.jar}" basedir="${build.classes.dir}" manifest="darta. mf"/>
101 </target>
102
103 <target name="dist" depends="darta.jar,copyscripts" description="Creates a dir ectory that contains a standalone distribution for dartc.">
104 </target>
105
106 <target name="copyscripts">
107 <!--
108 Ensure the necessary subdirectories exist.
109 -->
110 <mkdir dir="${dist.dir}"/>
111
112 <!--
113 Copy the dart jar to the lib folder.
114 -->
115 <copy file="${darta.jar}" todir="${dist.dir}"/>
116
117 <!--
118 Re-root the classpaths from third_party into the lib folder of the distro.
119 -->
120 <pathconvert property="dartc.classpath.runtime.unix" targetos="unix" refid=" classpath.runtime">
121 <regexpmapper from="${third_party.dir}/(.*)" to="$DARTA_HOME/\1"/>
122 </pathconvert>
123
124 <copy file="scripts/darta.sh" tofile="${dist.dir}/darta">
125 <filterset>
126 <filter token="CLASSPATH" value="$DARTA_HOME/darta.jar:${dartc.classpath .runtime.unix}"/>
127 </filterset>
128 </copy>
129 <chmod file="${dist.dir}/darta" perm="a+rx"/>
130
131 <!--
132 TODO: The following files are not strictly due to dist, move them out.
133 -->
134 <copy todir="${build.dir}">
135 <fileset dir="scripts">
136 <include name="darta_run.sh"/>
137 <include name="darta_metrics.sh"/>
138 </fileset>
139 <filterset>
140 <filter token="CLASSPATH" value="$DARTA_HOME/darta.jar:${dartc.classpath .runtime.unix}"/>
141 </filterset>
142 </copy>
143 <chmod file="${build.dir}/darta_run.sh" perm="a+rx"/>
144 <chmod file="${build.dir}/darta_metrics.sh" perm="a+rx"/>
145
146 <!--
147 Copy of all of the dartc dependencies to the lib folder.
148 -->
149 <copy todir="${dist.dir}/">
150 <path refid="classpath.runtime"/>
151 <regexpmapper from="${third_party.dir}/(.*)" to="\1"/>
152 </copy>
153 </target>
154
155 <target name="clean" description="Deletes the build output directory.">
156 <delete dir="${build.dir}"/>
157 <delete dir="${dist.dir}"/>
158 </target>
159
160 <target name="tests.jar" depends="compile-tests">
161 <jar destfile="${build.dir}/tests.jar" basedir="${build.test.classes.dir}"/>
162 </target>
163 </project>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698