forked from Ryugoron/point-groups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
86 lines (63 loc) · 2.74 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
<project name="pointGroups" default="setup" basedir=".">
<description>
Download jReality and create local maven repository from it.
</description>
<!-- set global properties for this build -->
<property name="lib" location="lib"/>
<property name="src" location="src"/>
<target name='compile' depends='compile-polymake'>
</target>
<target name='init'>
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${lib}"/>
<mkdir dir="${lib}/jreality"/>
<mkdir dir="${lib}/polymake"/>
</target>
<target name="download-jReality" depends="init">
<!-- download jReality sources -->
<get src="http://www3.math.tu-berlin.de/jreality/download/latest/jReality.jar"
dest="${lib}/jreality/jReality.jar"
verbose="true"
usetimestamp="true" skipexisting='true'/>
<get src="http://www3.math.tu-berlin.de/jreality/download/latest/jReality-3rd-party.zip"
dest="${lib}/jreality/jReality-3rd-party.zip"
verbose="true"
usetimestamp="true" skipexisting='true'/>
<!-- unzip jReality 3rd party libs -->
<unzip src="${lib}/jreality/jReality-3rd-party.zip" dest="${lib}/jreality"/>
</target>
<target name="setup" depends='init, download-jReality'>
<!-- add each jreality jar file -->
<apply executable='${src}/main/bash/add_jreality_jar_to_maven.sh' parallel="false" verbose='true'>
<fileset dir="${lib}/jreality" includes="**/*.jar"/>
</apply>
</target>
<target name="download-polymake" depends="init, check-polymake-exists" unless='polymake.exists'>
<!-- download polymake sources -->
<get src="http://polymake.org/lib/exe/fetch.php/download/polymake-2.12-rc3.tar.bz2"
dest="${lib}/polymake"
verbose="true"
usetimestamp="true" skipexisting='true'/>
<!-- unzip polymake -->
<!--<untar src="${lib}/polymake/polymake-2.12-rc3.tar.bz2" dest="${lib}/polymake" compression='bzip2'/>-->
<exec dir="${lib}/polymake" executable="tar" >
<arg line="-xvf polymake-2.12-rc3.tar.bz2"/>
</exec>
</target>
<target name='check-polymake-exists'>
<available file="${lib}/polymake/bin/polymake" property="polymake.exists"/>
</target>
<target name='compile-polymake' depends='init, check-polymake-exists, download-polymake' unless='polymake.exists'>
<exec dir="${lib}/polymake/polymake-2.12/" executable="chmod" failonerror="true">
<arg line="+x ./configure"/>
</exec>
<exec dir="${lib}/polymake/polymake-2.12/" executable="./configure" failonerror="true">
<arg line="--prefix=${lib}/polymake"/>
</exec>
<exec dir="${lib}/polymake/polymake-2.12/" executable="make" failonerror="true">
<arg line="-j4"/>
</exec>
</target>
</project>