WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.6% of users enabled 2FA.

common.xml 6.73 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
	<import file="../util.xml"/>
	<import file="../libs/libs.xml"/>
12 13 14 15 16

	<tstamp>
		<format property="build.time" pattern="yyyyMMdd-hhmm"/>
	</tstamp>

17 18 19 20 21 22
	<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"/>
23
	<property name="bm-doc-dir" value="${bm-files}/doc"/>
24
	<property name="bm-output-dir" value="${bm-files}/dist"/>
25
	<property name="bm-output-doc-dir" value="${bm-files}/dist/doc/${bm-name}"/>
26
	<property name="bm-output-harness-dir" value="${bm-files}/dist"/>
27
	<property name="bm-output-benchmark-dir" value="${bm-files}/dist/benchmark"/>
28 29 30 31
	<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
32
	<property name="bm-src-harness-dir" value="${bm-files}/harness/src"/>
33
	<property name="bm-src-benchmark-dir" value="${bm-files}/benchmark"/>
34 35 36 37 38 39
	<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"/>

40
	<property name="harness-classpath" value="harness/dist/"/>
41

42
	<target name="all" depends="source,svn-source,cvs-source,hg-source,pre-build,build,complete"/>
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

	<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>

83 84 85 86 87 88 89 90 91 92 93 94 95
	<target name="hg-source" if="bm-hg-url">
		<condition property="fail-on-error" value="no" else="yes">
			<isset property="bm-ignore-failure"/>
		</condition>
		<antcall target="check-hg-source">
			<param name="target-dir" value="${bm-downloads}"/>
			<param name="hg-url" value="${bm-hg-url}"/>
			<param name="hg-revision" value="${bm-hg-revision}"/>
			<param name="target-file" value="${bm-src}"/>
			<param name="fail-on-error" value="${bm-fail-on-error}"/>
		</antcall>
	</target>

96 97 98 99 100 101 102 103 104
	<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">
105
		<mkdir dir="${bm-build-dir}"/>
106
		<mkdir dir="${bm-output-dir}"/>
107
		<mkdir dir="${bm-output-harness-dir}"/>
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
		<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>

125 126 127 128 129 130
	<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"/>
131 132 133 134 135 136
		<copy todir="${bm-output-doc-dir}">
			<fileset dir="${bm-doc-dir}">
				<include name="**"/>
			</fileset>
		</copy>
		<javadoc sourcepath="${bm-src-harness-dir}" classpath="${harness-classpath}" destdir="${bm-output-doc-dir}"/>
137
	</target>
138

139 140 141 142
	<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"/>
143 144 145 146 147 148
		<copy todir="${bm-output-doc-dir}">
			<fileset dir="${bm-doc-dir}">
				<include name="**"/>
			</fileset>
		</copy>
		<javadoc sourcepath="${bm-src-harness-dir}" classpath="${harness-classpath}:${bm-harness-classpath}" destdir="${bm-output-doc-dir}"/>
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
	</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">
John Zhang's avatar
John Zhang committed
178
		<unjar src="${build.target-jar}" dest="${bm-output-dir}" overwrite="yes">
179 180 181 182 183 184 185 186 187 188 189 190
			<patternset>
				<include name="doc/menu.html"/>
			</patternset>
		</unjar>
		<tempfile property="temp.file" destdir="${bm-output-dir}/doc"/>
		<java jar="${toolsdir}/transformer/bin/transformer.jar" fork="yes">
			<arg value="${bm-output-dir}/doc/menu.html"/>
			<arg value="${bm-name}"/>
			<arg value="${temp.file}"/>
		</java>
		<copy file="${temp.file}" tofile="${bm-output-dir}/doc/menu.html"/>
		<delete file="${temp.file}"/>
John Zhang's avatar
John Zhang committed
191
		<jar jarfile="${build.target-jar}" basedir="${bm-output-dir}" update="true"/>
192
	</target>
steveb-oss's avatar
steveb-oss committed
193

194
</project>