Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 222 lines (201 sloc) 8.463 kb
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
1 <?xml version="1.0"?>
2 <project name="erjang" default="all">
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
3 <property name="erjang.version" value="0.1" />
4d194ef @krestenkrab Support building self-contained Erjang+OTP jar file
krestenkrab authored
4 <property file="erjang_cfg.properties" />
5
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
6 <path id="erjang.classpath">
7 <pathelement location="target/classes/" />
1cbc07d @krestenkrab A clone of Basho's erlang_js driver based on Mozilla Rhino.
krestenkrab authored
8 <pathelement location="lib/js.jar" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
9 <pathelement location="lib/kilim-0.6-krab.jar" />
10 <pathelement location="lib/OtpErlang.jar" />
11 <pathelement location="lib/junit.jar" />
9375e33 @krestenkrab Replace clojure dependency with clj-ds (http://github.com/krukow/clj-ds)...
krestenkrab authored
12 <pathelement location="lib/clj-ds.jar" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
13 <pathelement location="lib/antlr-3.2.jar" />
14 <pathelement path="${java.class.path}" />
15 </path>
16 <path id="erjang.testwovenclasspath">
17 <pathelement location="target/classes/" />
18 <pathelement location="target/test-classes/" />
19 <pathelement location="lib/kilim-0.6-krab.jar" />
20 <pathelement location="lib/OtpErlang.jar" />
9375e33 @krestenkrab Replace clojure dependency with clj-ds (http://github.com/krukow/clj-ds)...
krestenkrab authored
21 <pathelement location="lib/clj-ds.jar" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
22 <pathelement location="lib/junit.jar" />
23 <pathelement location="lib/antlr-3.2.jar" />
24 <pathelement path="${java.class.path}" />
25 </path>
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
26
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
27 <target name="all" depends="clean,weave,jar" />
411f9f3 @pavlobaron separated test compilation from test execution
pavlobaron authored
28 <target name="all_with_test" depends="all,weavetest" />
5e5b4a9 EStones performance test added as test step
Erik Søe Sørensen authored
29 <target name="test" depends="all_with_test,testwoven,perf_test" />
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
30
61b2bb2 Interpreter: part of the build process now.
Erik Søe Sørensen authored
31 <target name="gen-interpreter">
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
32 <echo message="generating interpreter code ===================" />
b7f7e96 build.xml: Aborting if gen-interpreter action fails.
Erik Søe Sørensen authored
33 <exec dir="src/main/java/erjang/beam/interpreter" executable="perl" input="src/main/java/erjang/beam/interpreter/ops.spec" failonerror="yes">
61b2bb2 Interpreter: part of the build process now.
Erik Søe Sørensen authored
34 <arg value="-W"/>
0fd2222 Interpreter generator refactoring, part 2.
Erik Søe Sørensen authored
35 <arg value="ErjIG_Main.pl"/>
61b2bb2 Interpreter: part of the build process now.
Erik Søe Sørensen authored
36 </exec>
37 </target>
38
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
39 <target name="create-dirs">
40 <mkdir dir="target" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
41 <mkdir dir="target/classes" />
42 <mkdir dir="target/test-classes" />
61bcf85 Ant: mkdir of directory use by test suite.
Erik Søe Sørensen authored
43 <mkdir dir="target/test-beam" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
44 <mkdir dir="target/compiled" />
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
45 </target>
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
46
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
47 <target name="gen-test-classes" description="generate test classes based on a generic one" depends="create-dirs">
48 <echo message="generating test classes ===================" />
49 <java classname="erjang.AllTests"
50 failonerror="true"
51 fork="true">
52 <jvmarg value="-Derjang.configfile=erjang_cfg.properties" />
53 <arg value="src/test/java/erjang/"/>
54 <classpath>
55 <pathelement location="target/test-classes" />
56 </classpath>
57 <classpath refid="erjang.classpath" />
58 </java>
59 </target>
60
61 <target name="compile" depends="gen-interpreter,create-dirs">
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
62 <echo message="Compiling src ===================" />
293a803 @krestenkrab Enable debug in compilation
krestenkrab authored
63 <javac debug="true" srcdir="src/main/java" destdir="target/classes" classpathref="erjang.classpath" deprecation="on" debuglevel="lines,vars,source"/>
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
64 </target>
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
65
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
66 <target name="testcompile" depends="compile">
67 <echo message="Compiling test ===================" />
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
68 <javac debug="true" srcdir="src/test/java" destdir="target/test-classes" debuglevel="lines,vars,source">
69 <classpath>
70 <pathelement location="target/test-classes" />
71 </classpath>
72 <classpath refid="erjang.classpath" />
73 </javac>
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
74 </target>
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
75
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
76 <target name="gen-test-compile" depends="testcompile,gen-test-classes">
77 <echo message="Compiling generated test classes ===================" />
78 <javac debug="true" srcdir="src/test/java" destdir="target/test-classes" debuglevel="lines,vars,source">
79 <classpath>
80 <pathelement location="target/test-classes" />
81 </classpath>
82 <classpath refid="erjang.classpath" />
83 </javac>
84 </target>
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
85
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
86 <target name="weave" depends="compile">
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
87 <echo message="Weaving files ===================" />
88 <java classname="kilim.tools.Weaver" fork="yes">
89 <classpath refid="erjang.classpath" />
90 <assertions>
91 <enable />
92 </assertions>
93 <arg value="-d" />
94 <arg value="./target/classes" />
95 <arg line="./target/classes" />
96 </java>
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
97 </target>
98
99 <target name="weavetest" depends="gen-test-compile">
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
100 <echo message="Weaving test classes ==============" />
101 <java classname="kilim.tools.Weaver" fork="yes">
d3a50ed @pavlobaron weavetest: replaced woven classpath through normal classpath
pavlobaron authored
102 <classpath refid="erjang.classpath" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
103 <assertions>
104 <enable />
105 </assertions>
106 <arg value="-d" />
107 <arg value="./target/test-classes" />
108 <arg line="./target/test-classes" />
109 </java>
110 </target>
111
112 <target name="clean">
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
113 <echo message="deleting files ===================" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
114 <delete>
115 <fileset defaultexcludes="no" dir="." includes="*~,#*,foo,bar,x,y" />
116 </delete>
117 <delete dir="./target" />
118 <delete dir="./.erj" />
411f9f3 @pavlobaron separated test compilation from test execution
pavlobaron authored
119 <delete>
120 <fileset dir="src/test/java/erjang" includes="**/*_TEST.java" />
121 </delete>
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
122 </target>
123
124 <!-- This runs those tests depend on generated classes in testclasses-->
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
125 <target name="testwoven" depends="weavetest">
3678cc7 build.xml: Format junit test results as XML so that it's usable for the ...
Erik Søe Sørensen authored
126 <echo message="Testing Tasks ======================" />
0edeafd build.xml: Some more CI-server related junit changes.
Erik Søe Sørensen authored
127 <mkdir dir="test-outputs" />
128 <junit fork="yes" showoutput="yes" printsummary="true">
3678cc7 build.xml: Format junit test results as XML so that it's usable for the ...
Erik Søe Sørensen authored
129 <formatter type="xml"/> <!-- For CI server use. -->
130 <!-- <formatter type="brief" usefile="false"/> -->
131 <classpath>
132 <pathelement location="target/test-classes" />
133 <pathelement location="target/test-classes/generated/classes" />
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
134 </classpath>
135 <classpath refid="erjang.classpath" />
f88abd9 Environment (and other) configuration has been reworked; Erjang now uses...
Erik Søe Sørensen authored
136 <assertions><enable /></assertions>
3dc4413 build.xml: Adjusted Java memory settings for test process. (Build server...
Erik Søe Sørensen authored
137 <jvmarg value="-Xmx700m"/>
99c9105 @pavlobaron fix: implemented precompilation/preloading of erlang modules for single ...
pavlobaron authored
138 <jvmarg value="-Xss50m"/>
139 <jvmarg value="-XX:PermSize=128m"/>
3dc4413 build.xml: Adjusted Java memory settings for test process. (Build server...
Erik Søe Sørensen authored
140 <jvmarg value="-XX:MaxPermSize=700m"/>
99c9105 @pavlobaron fix: implemented precompilation/preloading of erlang modules for single ...
pavlobaron authored
141 <jvmarg value="-Derjang.configfile=erjang_cfg.properties" />
10655bf @pavlobaron erl tests are now running in ej and compared with erl
pavlobaron authored
142 <batchtest todir="test-outputs">
99c9105 @pavlobaron fix: implemented precompilation/preloading of erlang modules for single ...
pavlobaron authored
143 <fileset dir="target/test-classes" includes="**/*_TEST.class" />
10655bf @pavlobaron erl tests are now running in ej and compared with erl
pavlobaron authored
144 <!-- <fileset dir="target/test-classes" includes="**/float_tests_erl_TEST.class" />-->
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
145 </batchtest>
3678cc7 build.xml: Format junit test results as XML so that it's usable for the ...
Erik Søe Sørensen authored
146 </junit>
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
147 </target>
148
0bda0f8 Boot stats test added
Erik Søe Sørensen authored
149 <target name="perf_test" depends="estone_test,boot_stat_test"/>
150 <target name="estone_test">
5e5b4a9 EStones performance test added as test step
Erik Søe Sørensen authored
151 <exec dir="." executable="bash" failonerror="no">
152 <arg value="src/test/shell/run-estone.sh"/>
75593e1 Performance test: making numbers-relative-to-Beam report.
Erik Søe Sørensen authored
153 <arg value="test-outputs/estone"/>
5e5b4a9 EStones performance test added as test step
Erik Søe Sørensen authored
154 </exec>
155 </target>
0bda0f8 Boot stats test added
Erik Søe Sørensen authored
156 <target name="boot_stat_test">
157 <exec dir="." executable="bash" failonerror="no">
158 <arg value="src/test/shell/run-boot.sh"/>
159 <arg value="test-outputs/boot-stats"/>
160 </exec>
161 </target>
5e5b4a9 EStones performance test added as test step
Erik Søe Sørensen authored
162
163
b88ce78 build.xml: reverting accidentally committed local change.
Erik Søe Sørensen authored
164 <target name="jar" description="generate the distribution" depends="clean,weave">
0264154 @pavlobaron implemented generation/execution of single test classes for compiled bea...
pavlobaron authored
165 <echo message="Packaging ======================" />
a55e02d @krestenkrab fix build.xml License->LICENSE; add NOTICE to distro
krestenkrab authored
166 <copy file="LICENSE" todir="classes/erjang" />
167 <copy file="NOTICE" todir="classes/erjang" />
06a4b38 @krestenkrab Include the erjang "logo" in the jar file.
krestenkrab authored
168 <copy file="erjang_logo4.png" todir="classes/erjang" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
169 <jar jarfile="erjang-${erjang.version}.jar" basedir="target/classes">
170 <zipgroupfileset dir="lib" includes="*.jar">
171 <exclude name="junit.jar" />
172 <exclude name="asm-all-2.2.3.jar" />
173 </zipgroupfileset>
174 <exclude name="erjang/test/**" />
175 <exclude name="erjang/examples/**" />
176 <exclude name="erjang/bench/**" />
177 <manifest>
5c098d3 @krestenkrab New erjang.Main, now runs as "java -jar erjang.jar"
krestenkrab authored
178 <attribute name="Main-Class" value="erjang.Main" />
0cdf885 @krestenkrab implement first round of ets:match (and friends)
krestenkrab authored
179 </manifest>
180 </jar>
181 </target>
90105d5 Documentation of data representation class hierarchy.
Erik Søe Sørensen authored
182
4d194ef @krestenkrab Support building self-contained Erjang+OTP jar file
krestenkrab authored
183 <target name="otpjar">
184 <jar jarfile="otp-${erjang.otp.version}.jar" basedir="${erjang.otp.root}">
185 <exclude name="**/*.so" />
186 <exclude name="**/*.dll" />
187 <exclude name="**/*.a" />
188 <exclude name="**/*.erl" />
189 <exclude name="**/bin/beam" />
190 <exclude name="**/bin/beam.smp" />
191 <exclude name="lib/megaco-*/**" />
192 <exclude name="lib/wx-*/**" />
193 <exclude name="lib/hipe-*/**" />
194 <exclude name="lib/jinterface-*/**" />
08c28fe @jetztgradnet exclude some more files: C code, C headers, Java code, examples
jetztgradnet authored
195 <exclude name="lib/erl_interface-*/**" />
196 <exclude name="lib/ic-*/java_src/**" />
197 <exclude name="usr/include/**" />
198 <exclude name="**/examples/**" />
7c351cd @jetztgradnet Changed task "otpjar" to create an OTP-only jar without Erjang, which ca...
jetztgradnet authored
199 </jar>
200 </target>
4d194ef @krestenkrab Support building self-contained Erjang+OTP jar file
krestenkrab authored
201
7c351cd @jetztgradnet Changed task "otpjar" to create an OTP-only jar without Erjang, which ca...
jetztgradnet authored
202 <target name="alljar" depends="jar,otpjar">
203 <jar jarfile="erjang-${erjang.version}-otp-${erjang.otp.version}.jar" basedir="${erjang.otp.root}">
4d194ef @krestenkrab Support building self-contained Erjang+OTP jar file
krestenkrab authored
204 <!-- include all of erjang -->
205 <zipgroupfileset dir="." includes="erjang-${erjang.version}.jar" />
7c351cd @jetztgradnet Changed task "otpjar" to create an OTP-only jar without Erjang, which ca...
jetztgradnet authored
206 <!-- include all of OTP -->
207 <zipgroupfileset dir="." includes="otp-${erjang.otp.version}.jar" />
4d194ef @krestenkrab Support building self-contained Erjang+OTP jar file
krestenkrab authored
208
209 <manifest>
210 <attribute name="Main-Class" value="erjang.Main" />
211 </manifest>
212 </jar>
213 </target>
90105d5 Documentation of data representation class hierarchy.
Erik Søe Sørensen authored
214
215 <target name="javadoc" description="generate Javadoc documentation">
216 <javadoc destdir="target/doc">
217 <fileset dir="src"><include name="**/*.java"/></fileset>
218 </javadoc>
219 </target>
220
1aa836f @krestenkrab compiling to .erj
krestenkrab authored
221 </project>
Something went wrong with that request. Please try again.