forked from utwente-fmt/vercors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
155 lines (137 loc) · 7.03 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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
148
149
150
151
152
153
<!-- -*- tab-width:2 ; indent-tabs-mode:nil -*- -->
<project name="VerCors Tool" default="jar">
<!-- the dependencies are either in the deps sub-directory or two levels up -->
<condition property="deps" value="${basedir}/deps" else="${basedir}/../..">
<available file="${basedir}/deps" type="dir"/>
</condition>
<condition property="sbtcommand" value="${basedir}/windows/bin/vct-sbt.cmd"
else="${basedir}/unix/bin/vct-sbt">
<os family="windows" />
</condition>
<property name="dist" value="${basedir}/dist"/>
<property environment="env"/>
<target name="clean">
<ant antfile="build.xml" dir="${basedir}/viper/viper-api" inheritAll="false" target="clean"/>
<exec dir="${basedir}/viper/silver" executable="${sbtcommand}"> <arg value="clean" /> </exec>
<exec dir="${basedir}/viper/silicon" executable="${sbtcommand}"> <arg value="clean" /> </exec>
<exec dir="${basedir}/viper/carbon" executable="${sbtcommand}"> <arg value="clean" /> </exec>
<ant antfile="build.xml" dir="${basedir}/hre" inheritAll="false" target="clean"/>
<ant antfile="build.xml" dir="${basedir}/core" inheritAll="false" target="clean"/>
<ant antfile="build.xml" dir="${basedir}/main" inheritAll="false" target="clean"/>
<delete dir="${basedir}/doc/api"/>
<delete>
<fileset dir="test" includes="**/*.log,**/TEST-*.xml"/>
</delete>
</target>
<target name="jar">
<ant antfile="build.xml" dir="${basedir}/viper/viper-api" inheritAll="false"/>
<exec dir="${basedir}/viper/silver" executable="${sbtcommand}"> <arg value="compile" /> </exec>
<exec dir="${basedir}/viper/silicon" executable="${sbtcommand}"> <arg value="assembly" /> </exec>
<exec dir="${basedir}/viper/carbon" executable="${sbtcommand}"> <arg value="assembly" /> </exec>
<ant antfile="build.xml" dir="${basedir}/hre" inheritAll="false" target="jar"/>
<ant antfile="build.xml" dir="${basedir}/core" inheritAll="false" target="jar"/>
<ant antfile="build.xml" dir="${basedir}/main" inheritAll="false" target="jar"/>
</target>
<target name="doc" depends="jar">
<mkdir dir="${basedir}/doc/api"/>
<javadoc
overview="${basedir}/src/overview.html"
classpath="${basedir}/main/vct-tool.jar:${basedir}/core/libs/antlr-4.5-complete.jar:${basedir}/libs/commons-lang3-3.1/commons-lang3-3.1.jar"
destdir="${basedir}/doc/api"
author="true"
version="true"
use="true"
windowtitle="VerCors Tool API">
<fileset dir="${basedir}/hre/src" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${basedir}/core/src" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${basedir}/core/gensrc" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${basedir}/viper/viper-api/src" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<fileset dir="${basedir}/main/src" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
<doctitle><![CDATA[<h1>VerCors Tool Documentation</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2011-2012 Stefan Blom. All Rights Reserved.</i>]]></bottom>
<group title="Parsers and Imports" packages="vct.antlr4*"/>
<group title="Provers and Exports" packages="vct.boogie:vct.java.printer"/>
<group title="Hybrid Runtime Environment" packages="hre*"/>
<!--
<tag name="todo" scope="all" description="To do:"/>
<group title="Group 1 Packages" packages="com.dummy.test.a*"/>
<group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
<link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="C:\tmp"/>
<link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
-->
</javadoc>
</target>
<!--
<target name="tutorial">
<exec dir="${basedir}/tex" executable="pdflatex">
<env key="TEXINPUTS" value=".:${basedir}/examples//::"/>
<arg value="tutorial.tex"/>
</exec>
<exec dir="${basedir}/tex" executable="pdflatex">
<env key="TEXINPUTS" value=".:${basedir}/examples//::"/>
<arg value="tutorial.tex"/>
</exec>
</target>
-->
<target name="dist" depends="jar,doc">
<exec executable="git"
failonerror="true"
outputproperty="gitversion"
dir="${basedir}">
<arg value="describe"/>
<arg value="--tags"/>
</exec>
<property name="prefix" value="vercors-${gitversion}"/>
<mkdir dir="${dist}"/>
<zip destfile="${dist}/vercors-${gitversion}.zip" >
<zipfileset dir="${deps}/modules/z3" prefix="${prefix}/deps/modules/z3" excludes="**/*~" />
<zipfileset dir="${deps}/z3" prefix="${prefix}/deps/z3" excludes="**/*~,**/*.cmd,**/*.exe,**/bin/*" />
<zipfileset dir="${deps}/z3" prefix="${prefix}/deps/z3" filemode="755" excludes="**/*~" includes="**/*.cmd,**/*.exe,**/bin/*" />
<zipfileset dir="${deps}/modules/boogie" prefix="${prefix}/deps/modules/boogie" excludes="**/*~" />
<zipfileset dir="${deps}/boogie" prefix="${prefix}/deps/boogie" excludes="**/*~,**/*.cmd,**/*.exe,**/bin/*" />
<zipfileset dir="${deps}/boogie" prefix="${prefix}/deps/boogie" filemode="755" excludes="**/*~" includes="**/*.cmd,**/*.exe,**/bin/*" />
<zipfileset dir="${deps}/modules/chalice" prefix="${prefix}/deps/modules/chalice" excludes="**/*~" />
<zipfileset dir="${deps}/chalice" prefix="${prefix}/deps/chalice" excludes="**/*~,**/*.cmd,**/*.exe,**/bin/*" />
<zipfileset dir="${deps}/chalice" prefix="${prefix}/deps/chalice" filemode="755" excludes="**/*~" includes="**/*.cmd,**/*.exe,**/bin/*" />
<zipfileset dir="." prefix="${prefix}"
includes="README,INSTALL"
/>
<zipfileset dir="unix" prefix="${prefix}/unix"
excludes="*~" filemode="755"
/>
<zipfileset dir="windows" prefix="${prefix}/windows"
excludes="*~" filemode="755"
/>
<zipfileset dir="config" prefix="${prefix}/config"
excludes="*~" filemode="755"
/>
<zipfileset dir="libs" prefix="${prefix}/libs"/>
<zipfileset dir="core/libs" prefix="${prefix}/core/libs"/>
<zipfileset dir="doc" prefix="${prefix}/doc"/>
<zipfileset dir="modules" prefix="${prefix}/modules" filemode="755"
excludes="**/*~,.git,init/*sh,init/perl,init/python,init/lisp,init/modulerc"
/>
<zipfileset dir="examples" prefix="${prefix}/examples"
includes="**/*.java,**/*.pvl,**/*.c,README,**/SEEALSO,backends/**/*"
excludes="**/*~"
/>
<zipfileset dir="." prefix="${prefix}"
includes="hre/hre.jar,core/vct-core.jar,main/vct-tool.jar,
viper/silicon/target/scala-2.11/silicon.jar,
viper/carbon/target/scala-2.11/carbon.jar"
/>
</zip>
<symlink action="delete" link="${dist}/vercors-latest.zip"/>
<symlink link="${dist}/vercors-latest.zip" resource="${dist}/vercors-${gitversion}.zip"/>
</target>
</project>