-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnant.build
92 lines (83 loc) · 2.77 KB
/
nant.build
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
<?xml version='1.0' encoding='utf-8'?>
<project name="numdiff" default="all" basedir="." verbose="true">
<property name="product.name" value="numdiff"/>
<property name="verbosity" value="true"/>
<property name="project.dir" value="${project::get-base-directory()}" dynamic="true"/>
<property name="target.dir" value="${project.dir}/build"/>
<property name="tools.dir" value="${project.dir}/tools"/>
<property name="cygwin.home" value="c:/cygwin"/>
<property name="cygwin.bin" value="${cygwin.home}\bin"/>
<target name="all" depends="init,build,test"/>
<target name="init">
<call target="convertCygwinProjectPath"/>
</target>
<target name="clean">
<exec program="make.exe" basedir="${cygwin.bin}"
workingdir="${project.dir}">
<arg value='clean'/>
<environment>
<variable name="PATH">
<path>
<pathelement dir='C:\cygwin\bin'/>
<pathelement dir='c:\Python27'/>
<pathelement path='%PATH%'/>
</path>
</variable>
</environment>
</exec>
<exec program="make.exe" basedir="${cygwin.bin}"
workingdir="${project.dir}\test">
<arg value='clean'/>
<environment>
<variable name="PATH">
<path>
<pathelement dir='C:\cygwin\bin'/>
<pathelement dir='c:\Python27'/>
<pathelement path='%PATH%'/>
</path>
</variable>
</environment>
</exec>
</target>
<target name="build" depends="clean,init">
<echo message="building ${product.name}"/>
<exec program="make.exe" basedir="${cygwin.bin}"
workingdir="${project.dir}">
<arg value='build'/>
<arg value='dist'/>
<environment>
<variable name="PATH">
<path>
<pathelement dir='C:\cygwin\bin'/>
<pathelement dir='c:\Python27'/>
<pathelement path='%PATH%'/>
</path>
</variable>
</environment>
</exec>
</target>
<target name="test" depends="build">
<echo message="testing ${product.name}"/>
<exec program="make.exe" basedir="${cygwin.bin}"
verbose="${verbosity}" workingdir="${project.dir}\test">
<arg value="test"/>
<environment>
<variable name="PATH">
<path>
<pathelement dir='C:\cygwin\bin'/>
<pathelement dir='c:\Python27'/>
<pathelement path='%PATH%'/>
° </path>
</variable>
</environment>
</exec>
</target>
<target name="convertCygwinProjectPath">
<!-- workaround for ${cygpath::get-unix-path()} to convert ${project.dir} in CYGWIN syntax -->
<property name="temp.file" value="_name.tmp"/>
<exec program="cygpath.exe" basedir="${cygwin.bin}" commandline="-u ${project.dir}" output="${temp.file}"/>
<loadfile file="${temp.file}" property="project.dir.cygwin"/>
<property name="project.dir.cygwin" value="${string::trim(project.dir.cygwin)}"/>
<delete file="${temp.file}"/>
</target>
</project>