GitLab will be upgraded on 30 Jan 2023 from 2.00 pm (AEDT) to 3.00 pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

common.xml 5.07 KB
Newer Older
1
2
3
4
5
6
7
8
<!--
 * Copyright (c) 2009 The Australian National University.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0.
 * You may obtain the license at
 * 
 *    http://www.opensource.org/licenses/apache2.0.php
 -->
steveb-oss's avatar
steveb-oss committed
9
<project name="common">
10
11
12
13
14
15
16
17
18
	<import file="../util.xml"/>
	<import file="../libs/libs.xml"/>
	<property file="dacapo.properties"/>
	<property file="local.properties"/>
	<property file="default.properties"/>

	<property name="bm-files" value="${basedir}/bms/${bm-name}"/>
	<property name="bm-build-dir" value="${bm-files}/build"/>
	<property name="bm-output-dir" value="${bm-files}/dist"/>
19
20
	<property name="bm-output-harness-dir" value="${bm-files}/dist/harness"/>
	<property name="bm-output-benchmark-dir" value="${bm-files}/dist/benchmark"/>
21
22
23
24
	<property name="bm-deps-output-dir" value="${bm-files}/deps"/>
	<property name="bm-data" value="${bm-files}/data"/>
	<available file="${bm-data}" property="bm-data-exists" type="dir"/>
	<property name="bm-src-dir" value="${bm-files}/src"/>
john's avatar
john committed
25
	<property name="bm-src-harness-dir" value="${bm-files}/harness/src"/>
26
	<property name="bm-src-benchmark-dir" value="${bm-files}/benchmark"/>
27
28
29
30
31
32
	<property name="bm-downloads" value="${bm-files}/downloads"/>

	<property name="bm-jars" value="${bm-output-dir}/jar"/>
	<property name="bm-dat" value="${bm-output-dir}/dat"/>
	<property name="bm-cnf" value="${bm-output-dir}/cnf"/>

33
	<property name="harness-classpath" value="harness/dist/harness"/>
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

	<target name="all" depends="source, svn-source, cvs-source, pre-build, build, complete"/>

	<target name="incremental">
		<property name="incremental-build" value="true"/>
		<antcall target="all"/>
	</target>

	<target name="source" if="bm-url">
		<antcall target="check-source">
			<param name="target-dir" value="${bm-downloads}"/>
			<param name="target-url" value="${bm-url}"/>
			<param name="target-file" value="${bm-src}"/>
		</antcall>
	</target>

	<target name="svn-source" if="bm-svn-url">
		<condition property="fail-on-error" value="no" else="yes">
			<isset property="bm-ignore-failure"/>
		</condition>
		<antcall target="check-svn-source">
			<param name="target-dir" value="${bm-downloads}"/>
			<param name="svn-url" value="${bm-svn-url}"/>
			<param name="svn-revision" value="${bm-svn-revision}"/>
			<param name="target-file" value="${bm-src}"/>
			<param name="fail-on-error" value="${bm-fail-on-error}"/>
		</antcall>
	</target>

	<target name="cvs-source" if="bm-cvs-root">
		<condition property="fail-on-error" value="no" else="yes">
			<isset property="bm-ignore-failure"/>
		</condition>
		<antcall target="check-cvs-source">
			<param name="target-dir" value="${bm-downloads}"/>
			<param name="cvs-root" value="${bm-cvs-root}"/>
			<param name="cvs-package" value="${bm-cvs-package}"/>
			<param name="cvs-date" value="${bm-cvs-date}"/>
			<param name="target-file" value="${bm-src}"/>
		</antcall>
	</target>

	<target name="pre-build" depends="clean, init, unpack"/>

	<target name="clean">
		<delete dir="${bm-output-dir}"/>
		<delete dir="${bm-build-dir}"/>
		<delete dir="${bm-deps-output-dir}"/>
	</target>

	<target name="init" depends="clean">
85
		<mkdir dir="${bm-build-dir}"/>
86
		<mkdir dir="${bm-output-dir}"/>
87
		<mkdir dir="${bm-output-harness-dir}"/>
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
		<mkdir dir="${bm-jars}"/>
		<mkdir dir="${bm-dat}"/>
		<mkdir dir="${bm-cnf}"/>
	</target>

	<target name="unpack"/>

	<target name="build" depends="dacapo-harness, benchmark, config, harness"/>

	<target name="benchmark" depends="bm-build, jar, data"/>

	<target name="bm-build"/>

	<target name="config">
		<copy file="${bm-files}/${bm-name}.cnf" todir="${bm-cnf}"/>
	</target>

105
106
107
108
109
110
111
	<target name="harness" depends="bm-harness-with,bm-harness-without"/>

	<target name="bm-harness-without" unless="bm-harness-classpath">
		<javac srcdir="${bm-src-harness-dir}" classpath="${harness-classpath}" destdir="${bm-output-harness-dir}"
			includes="org/dacapo/harness/**"
			debug="true" debuglevel="lines,vars,source"/>
	</target>
112

113
114
115
116
	<target name="bm-harness-with" if="bm-harness-classpath">
		<javac srcdir="${bm-src-harness-dir}" classpath="${harness-classpath}:${bm-harness-classpath}" destdir="${bm-output-harness-dir}"
			includes="org/dacapo/harness/**"
			debug="true" debuglevel="lines,vars,source"/>
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
	</target>

	<target name="dacapo-harness" unless="incremental-build">
		<ant antfile="harness/build.xml"/>
	</target>

	<target name="patch">
		<patch patchfile="${bm-files}/${bm-name}.patch" dir="${bm-build-dir}" strip="0" ignorewhitespace="yes"/>
	</target>

	<target name="untar" depends="build-init">
		<untar src="${bm-downloads}/${bm-src}" dest="${bm-build-dir}/" compression="gzip"/>
	</target>

	<target name="unzip" depends="build-init">
		<unzip src="${bm-downloads}/${bm-src}" dest="${bm-build-dir}/"/>
	</target>

	<target name="build-init">
		<mkdir dir="${bm-build-dir}"/>
	</target>

	<target name="jar"/>

	<target name="data" if="bm-data-exists">
		<zip basedir="${bm-data}" includes="**" destfile="${bm-dat}/${bm-name}.zip"/>
	</target>

	<target name="complete">
		<jar jarfile="${jar-target}" basedir="${bm-output-dir}" update="true"/>
	</target>
steveb-oss's avatar
steveb-oss committed
148

149
</project>