1
|
<?xml version="1.0"?>
|
2
|
<project name="C5" default="build" basedir=".">
|
3
|
<description>C5 Generic Collection Library</description>
|
4
|
|
5
|
<!-- Build Environment Setup -->
|
6
|
|
7
|
<property name="debug" value="true" overwrite="false" />
|
8
|
|
9
|
<property name="baseDir" value="${project::get-base-directory()}" />
|
10
|
<if test="${debug == 'true'}">
|
11
|
<property name="releaseConfig" value="Debug" />
|
12
|
</if>
|
13
|
<if test="${debug == 'false'}">
|
14
|
<property name="releaseConfig" value="Release" />
|
15
|
</if>
|
16
|
|
17
|
<property name="buildDirC5" value="${baseDir}/C5/bin" />
|
18
|
<property name="buildDirDocNet" value="${baseDir}/docNet/bin" />
|
19
|
<property name="buildDirNunit" value="${baseDir}/nunit/bin" />
|
20
|
<property name="buildDirPreProcess" value="${baseDir}/PreProcess/bin" />
|
21
|
|
22
|
<property name="outputDirC5" value="${buildDirC5}/${releaseConfig}" />
|
23
|
<property name="outputDirDocNet" value="${buildDirDocNet}/${releaseConfig}" />
|
24
|
<property name="outputDirNunit" value="${buildDirNunit}/${releaseConfig}" />
|
25
|
<property name="outputDirPreProcess" value="${buildDirPreProcess}/${releaseConfig}" />
|
26
|
|
27
|
<!-- NUnit Environment Setup -->
|
28
|
|
29
|
<property name="nunitBaseDir" value="C:/Program Files/NUnit 2.2.6" />
|
30
|
<property name="nunit.framework.dll"
|
31
|
value="${nunitBaseDir}/bin/nunit.framework.dll" />
|
32
|
<property name="nunit-console.exe"
|
33
|
value="${nunitBaseDir}/bin/nunit-console.exe" />
|
34
|
|
35
|
<!-- Create output directories -->
|
36
|
|
37
|
<target name="makedirs">
|
38
|
<mkdir dir="${outputDirC5}/" />
|
39
|
<mkdir dir="${outputDirDocNet}/" />
|
40
|
<mkdir dir="${outputDirNunit}/" />
|
41
|
<mkdir dir="${outputDirPreProcess}/" />
|
42
|
|
43
|
<mkdir dir="${baseDir}/docNet/docbuild/types" />
|
44
|
</target>
|
45
|
|
46
|
<!-- Clean up output directories -->
|
47
|
|
48
|
<target name="clean" description="remove all generated files">
|
49
|
<delete dir="${buildDirC5}" failonerror="false" />
|
50
|
<delete dir="${buildDirDocNet}" failonerror="false" />
|
51
|
<delete dir="${buildDirNunit}" failonerror="false" />
|
52
|
<delete dir="${buildDirPreProcess}" failonerror="false" />
|
53
|
|
54
|
<delete dir="${baseDir}/docNet/docbuild/types" />
|
55
|
</target>
|
56
|
|
57
|
<!-- Run the pre-processing program to generate source code -->
|
58
|
|
59
|
<target name="preprocess" depends="makedirs">
|
60
|
<csc target="exe" output="${outputDirPreProcess}/PreProcess.exe" debug="${debug}">
|
61
|
<sources basedir="${baseDir}/PreProcess">
|
62
|
<include name="Program.cs" />
|
63
|
</sources>
|
64
|
</csc>
|
65
|
<exec program="${outputDirPreProcess}/PreProcess.exe" workingdir="${outputDirPreProcess}/" />
|
66
|
</target>
|
67
|
|
68
|
<!-- Build the C5 library -->
|
69
|
|
70
|
<target name="build" depends="preprocess">
|
71
|
<csc target="library" output="${outputDirC5}/C5.dll" debug="${debug}">
|
72
|
<sources basedir="${baseDir}/C5">
|
73
|
<include name="arrays/CircularQueue.cs" />
|
74
|
<include name="arrays/HashedArrayList.cs" />
|
75
|
<include name="AssemblyInfo.cs"/>
|
76
|
<include name="Attributes.cs" />
|
77
|
<include name="Builtin.cs" />
|
78
|
<include name="Comparer.cs"/>
|
79
|
<include name="Delegates.cs" />
|
80
|
<include name="Enums.cs" />
|
81
|
<include name="Exceptions.cs" />
|
82
|
<include name="Formatting.cs" />
|
83
|
<include name="Hashers.cs" />
|
84
|
<include name="Events.cs" />
|
85
|
<include name="Collections.cs"/>
|
86
|
<include name="Dictionaries.cs"/>
|
87
|
<include name="Interfaces.cs"/>
|
88
|
<include name="linkedlists/HashedLinkedList.cs" />
|
89
|
<include name="Random.cs" />
|
90
|
<include name="Records.cs" />
|
91
|
<include name="Sorting.cs" />
|
92
|
<include name="ViewSupport.cs" />
|
93
|
<include name="MappedEnumerators.cs" />
|
94
|
<include name="WrappedArray.cs" />
|
95
|
<include name="Wrappers.cs" />
|
96
|
<include name="arrays/ArrayList.cs" />
|
97
|
<include name="arrays/HashedArrayList.cs" />
|
98
|
<include name="arrays/SortedArray.cs" />
|
99
|
<include name="hashing/HashBag.cs" />
|
100
|
<include name="hashing/HashDictionary.cs" />
|
101
|
<include name="hashing/HashTable.cs" />
|
102
|
<include name="heaps/IntervalHeap.cs" />
|
103
|
<include name="linkedlists/HashedLinkedList.cs" />
|
104
|
<include name="linkedlists/LinkedList.cs" />
|
105
|
<include name="trees/RedBlackTreeSet.cs" />
|
106
|
<include name="trees/RedBlackTreeBag.cs" />
|
107
|
<include name="trees/RedBlackTreeDictionary.cs" />
|
108
|
</sources>
|
109
|
</csc>
|
110
|
</target>
|
111
|
|
112
|
<!-- Build documentation tool -->
|
113
|
|
114
|
<target name="docnet" depends="build">
|
115
|
<csc target="exe" output="${outputDirDocNet}/docNet.exe" debug="${debug}">
|
116
|
<sources basedir="${baseDir}/docNet">
|
117
|
<include name="AssemblyInfo.cs" />
|
118
|
<include name="docnet.cs" />
|
119
|
<include name="Test.cs" />
|
120
|
<include name="Timer.cs" />
|
121
|
</sources>
|
122
|
<references>
|
123
|
<include name="${outputDirC5}/C5.dll" />
|
124
|
</references>
|
125
|
</csc>
|
126
|
|
127
|
<copy todir="${outputDirDocNet}/">
|
128
|
<fileset basedir="${outputDirC5}/">
|
129
|
<include name="*.*" />
|
130
|
</fileset>
|
131
|
</copy>
|
132
|
|
133
|
<!-- Not running dodoc.cmd here, since it waits for user input.. -->
|
134
|
|
135
|
</target>
|
136
|
|
137
|
<!-- Build and run NUnit tests -->
|
138
|
|
139
|
<target name="test" depends="build">
|
140
|
<csc target="library" output="${outputDirNunit}/nunit.dll" debug="${debug}">
|
141
|
<sources basedir="${baseDir}/nunit">
|
142
|
<include name="PreProcess/Program.cs" />
|
143
|
<include name="arrays/CircularQueueTest.cs" />
|
144
|
<include name="AssemblyInfo.cs" />
|
145
|
<include name="BasesTest.cs" />
|
146
|
<include name="Records.cs" />
|
147
|
<include name="Sorting.cs" />
|
148
|
<include name="SupportClasses.cs" />
|
149
|
<include name="arrays/ArrayListTest.cs" />
|
150
|
<include name="arrays/HashedArrayListTest.cs" />
|
151
|
<include name="arrays/SortedArrayTests.cs" />
|
152
|
<include name="hashing/HashBagTests.cs" />
|
153
|
<include name="hashing/HashDictionaryTests.cs" />
|
154
|
<include name="hashing/HashTableTests.cs" />
|
155
|
<include name="heaps/HeapTests.cs" />
|
156
|
<include name="linkedlists/HashedLinkedListTest.cs" />
|
157
|
<include name="linkedlists/LinkedListTest.cs" />
|
158
|
<include name="templates/Clone.cs" />
|
159
|
<include name="templates/Events.cs" />
|
160
|
<include name="templates/GenericCollectionTester.cs" />
|
161
|
<include name="templates/List.cs" />
|
162
|
<include name="trees/Bag.cs" />
|
163
|
<include name="trees/Dictionary.cs" />
|
164
|
<include name="trees/RedBlackTreeSetTests.cs" />
|
165
|
<include name="WrappersTest.cs" />
|
166
|
</sources>
|
167
|
<references>
|
168
|
<include name="${outputDirC5}/C5.dll" />
|
169
|
<include name="${nunit.framework.dll}" />
|
170
|
</references>
|
171
|
</csc>
|
172
|
|
173
|
<copy todir="${outputDirNunit}/">
|
174
|
<fileset basedir="${outputDirC5}/">
|
175
|
<include name="*.*" />
|
176
|
</fileset>
|
177
|
</copy>
|
178
|
|
179
|
<exec program="${nunit-console.exe}"
|
180
|
commandline="${outputDirNunit}/nunit.dll /nologo" />
|
181
|
</target>
|
182
|
|
183
|
</project>
|