aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/CSharp2/all.antlr3.runtime.net.build
blob: 67720b891fdc26d3fde169314a10c3644475b484 (plain)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<?xml version="1.0" encoding='iso-8859-1' ?>
<project name="all" default="usage">

	<property name="base.dir" 			value="${path::get-full-path( project::get-base-directory() )}" />
	<property name="sharedlibrary.dir" 	value="${base.dir}/Libraries" />
	<property name="tools.dir" 			value="${base.dir}/Tools" />
	<property name="tempdir" 			value="tempdir" />

	<property name="version" 			value="3.1b1" />

	<include buildfile="antlr3.runtime.net.common.inc" />

  	<!-- =================================================================== -->
  	<!-- Help on usage                                                       -->
  	<!-- =================================================================== -->
  	
  	<target name="usage">
    	<echo message="ANTLR v3 C# Runtime - Nant Build file"/>
    	<echo message="-------------------------------------------------------------"/>
    	<echo message=""/>
    	<echo message="available targets are:"/>
    	<echo message=""/>
    	<echo message="  build      - build debug or release version in '${base.dir}/build/${framework::get-target-framework()}'"/>
    	<echo message="                 (use -Ddebug=true or -Ddebug=false )"/>
    	<echo message=""/>
    	<echo message="  release    - build release version in '${base.dir}/build/${framework::get-target-framework()}'"/>
    	<echo message=""/>
    	<echo message="  dist       - build src/bin/docs distro in '${base.dir}'"/>
    	<echo message="                 (uses **pre-built** binaries.)"/>
    	<echo message=""/>
    	<echo message="  cleanall   - delete all the Nant and VS.NET build artifacts"/>
    	<echo message="  clean      - delete all the Nant build artifacts only"/>
    	<echo message=""/>
    	<echo message="  usage      - show this message (default)"/>
    	<echo message=""/>
    	<echo message="-------------------------------------------------------------"/>
  	</target>

	<target name="build" 
			depends="clean, init, build.v3.runtime, build.v3.utility, copytobuilddir"
			description="Build debug or release version ( -Ddebug=true|false )"
	/>

    <target name="release" depends="clean" description="Builds release (i.e. non-debug) version">
        <!-- build a clean release distribution for release -->
        <property name="debug" value="false"/>
        <call target="build"/>
    </target>

	<target name="cleanall" depends="clean" description="Cleans all the Nant and VS.NET build artifacts">
		<nant buildfile="Sources/Antlr3.Runtime/default.build" target="clean.vsnet" inheritall="true" />
		<nant buildfile="Sources/Antlr3.Utility/default.build" target="clean.vsnet" inheritall="true" />
	</target>
	
	<target name="dist" 
			depends="releaseDocs, zipsource, zip11, zip20, zipdoc"
			description="Creates src/bin/docs distros (uses pre-built binaries)"
	/>
	

	<target name="clean" description="Cleans Nant build artifacts">
		<delete dir="${build.working.dir}" failonerror="false" />
		<delete dir="${build.dest.dir}"    failonerror="false" />
		<!-- <delete dir="${doc.dir}"           failonerror="false" /> -->
	</target>
	
	<target name="init">
		<mkdir dir="${build.working.dir}" />
		<mkdir dir="${build.dest.dir}" />
		<call target="copy_build_dependencies" />
	</target>
	
	<target name="copy_build_dependencies">
		<copy todir="${build.dest.dir}">
			<fileset basedir="${sharedlibrary.dir}/MbUnit">
				<include name="MbUnit.Framework.dll" />
				<include name="QuickGraph.Algorithms.dll" />
				<include name="QuickGraph.dll" />
			</fileset>
		</copy>
		<copy todir="${build.dest.dir}">
			<fileset basedir="${sharedlibrary.dir}/StringTemplate.NET/${target.clr}">
				<include name="StringTemplate.dll" />
				<include name="antlr.runtime.dll" />
			</fileset>
		</copy>
	</target>

	<target name="build.v3.runtime" depends="init">
		<nant buildfile="Sources/Antlr3.Runtime/default.build" target="build" inheritall="true" />
	</target>
	
	<target name="build.v3.utility" depends="init">
		<nant buildfile="Sources/Antlr3.Utility/default.build" target="build" inheritall="true" />
	</target>
	
	<target name="copytobuilddir">
		<copy todir="${build.dest.dir}">
			<fileset basedir="${build.working.dir}">
				<include name="Antlr3.Runtime.dll" />
				<include name="Antlr3.Runtime.xml" />
				<include name="Antlr3.Utility.dll" />
				<include name="Antlr3.Utility.xml" />
				<include name="StringTemplate.dll" />
				<include name="antlr.runtime.dll" />
				
				<include name="Antlr3.Runtime.pdb" />
				<include name="Antlr3.Utility.pdb" />
				<include name="StringTemplate.pdb" />
				<include name="antlr.runtime.pdb" />
			</fileset>
		</copy>
	</target>
	
	<target name="zip11">
		<zip zipfile="${base.dir}/Antlr3.C#.Runtime.v${version}.net-1.1.zip">
			<fileset basedir="${base.dir}/build">
				<include name="net-1.1/Antlr3.Runtime.dll" />
				<include name="net-1.1/Antlr3.Utility.dll" />
				<include name="net-1.1/StringTemplate.dll" />
				<include name="net-1.1/antlr.runtime.dll" />
			</fileset>
			<fileset basedir="${base.dir}">
				<include name="README.TXT" />
				<include name="LICENSE.TXT" />
				<include name="NOTICE.TXT" />
				<include name="CHANGES.TXT" />
			</fileset>
			<fileset basedir="${base.dir}/docs">
				<include name="Antlr3.Runtime.chm" />
				<include name="Antlr3.Utility.chm" />
			</fileset>
		</zip>
	</target>

	<target name="zip20">
		<zip zipfile="${base.dir}/Antlr3.C#.Runtime.v${version}.net-2.0.zip">
			<fileset basedir="${base.dir}/build">
				<include name="net-2.0/Antlr3.Runtime.dll" />
				<include name="net-2.0/Antlr3.Utility.dll" />
				<include name="net-2.0/StringTemplate.dll" />
				<include name="net-2.0/antlr.runtime.dll" />
			</fileset>
			<fileset basedir="${base.dir}">
				<include name="README.TXT" />
				<include name="LICENSE.TXT" />
				<include name="NOTICE.TXT" />
				<include name="CHANGES.TXT" />
			</fileset>
			<fileset basedir="${base.dir}/docs">
				<include name="Antlr3.Runtime.chm" />
				<include name="Antlr3.Utility.chm" />
			</fileset>
		</zip>
	</target>
	
	<target name="zipdoc">
		<zip zipfile="${base.dir}/Antlr3.C#.Runtime.v${version}.api-doc.zip">
			<fileset basedir="${base.dir}/docs">
				<include name="Antlr3.Runtime.chm" />
				<include name="Antlr3.Utility.chm" />
			</fileset>
		</zip>
	</target>

	<target name="zipsource">
		<zip zipfile="${base.dir}/Antlr3.C#.Runtime.v${version}.src.zip">
			<fileset basedir="${base.dir}">
				<include name="**/*.build" />
				<include name="**/*.xml" />
				<include name="**/*.inc" />
				<include name="**/*.sln" />
				<include name="**/*.cs" />
				<include name="**/*.csproj" />
				<include name="**/*.resx" />
				<include name="**/*.ico" />
				<include name="**/*.html" />
				<include name="**/*.jpg" />
				<include name="**/*.pdf" />

				<include name="${sharedlibrary.dir}/**/*.dll" />

				<include name="${tools.dir}/**/*.dll" />
				<include name="${tools.dir}/**/*.exe" />
				
				<include name="README.TXT" />
				<include name="LICENSE.TXT" />
				<include name="NOTICE.TXT" />
				<include name="CHANGES.TXT" />

				<exclude name="*.snk" />
				<exclude name="**/obj/Debug/*.*" />
				<exclude name="**/obj/Debug/net-1.1/*.*" />
				<exclude name="**/obj/Debug/net-2.0/*.*" />
				<exclude name="**/bin/Debug/*.*" />
				<exclude name="**/bin/Debug/net-1.1/*.*" />
				<exclude name="**/bin/Debug/net-2.0/*.*" />
				<exclude name="**/bin/*.*" />
				<exclude name="bin/**/*.*" />
				<exclude name="build/**/*.*" />
				<exclude name="**/*.user" />
				<exclude name="**/*.resharperoptions" />
				<exclude name="**/*.obj" />
				<exclude name="**/*.pch" />
				<exclude name="**/*.pdb" />
				<exclude name="**/*.idb" />
				<exclude name="**/*.log*" />
				<exclude name="**/*.suo" />
				<exclude name="**/*.bak" />
				<exclude name="**/*.new" />
				<exclude name="**/*.original" />
			</fileset>
		</zip>
	</target>
	
	<!-- Documentation generation. -->
	<property name="base.dir" value="." />
	<property name="doc.dir" value="${base.dir}/docs" />
	<property name="tempBin.dir" value="${doc.dir}/bin"/>
	<property name="outputDocs.file" value="Antlr3.Runtime"/>
	
	<!-- Docs generation properties. -->
	<property name="ShowMissing" value="false"/>
	<property name="ShowPrivate" value="false"/>
	<property name="OutputTarget" value="HTMLHelp"/>

<!--		
		description: 
			Generates documentation with default properties.
-->	
	<target name="releaseDocs" depends="clean.docs">
		<call target="copyFilesToDocument"/>
		<call target="generateReleaseDocs"/>
	</target>
	
<!--		
		description: 
			Generates documentation for developers, with all missing information indicated and private members visible.
-->	
	<target name="devDocs" depends="clean.docs">
		<property name="ShowMissing" value="true"/>
		<property name="ShowPrivate" value="true"/>
		<property name="outputDocs.file" value="Antlr3.Runtime.Dev"/>
		<call target="copyFilesToDocument"/>
		<call target="generateReleaseDocs"/>
	</target>
		
<!--		
		description: 
			 Generates documentation for release.
-->	
	<target name="generateReleaseDocs">
		<ndoc failonerror="true">
			<assemblies basedir="${tempBin.dir}">
				<include name="Antlr3.Runtime.dll"/>
				<include name="Antlr3.Utility.dll"/>
			</assemblies>
			<referencepaths>
				<include name="Libraries/StringTemplate.NET/${framework::get-target-framework()}"/>
			</referencepaths>
			<documenters>
				<documenter name="MSDN">
					<property name="OutputTarget" value="${OutputTarget}" />
					<property name="Preliminary" value="true" />
					<property name="BinaryTOC" value="true" />
					<property name="CleanIntermediates" value="true" />
					<property name="SdkLinksOnWeb" value="true" />
					
					<property name="OutputDirectory" value="${doc.dir}" />
					<property name="HtmlHelpName" value="${outputDocs.file}" />
					<property name="IncludeFavorites" value="True" />
					<property name="SplitTOCs" value="False" />
					
					<property name="Title" value="ANTLR v3 C# Runtime Library API documentation" />	
					<property name="DefaulTOC" value="Antlr.Runtime" />
					
					<property name="ShowVisualBasic" value="True" />
					<property name="ShowMissingSummaries" value="${ShowMissing}" />
					<property name="ShowMissingRemarks" value="${ShowMissing}" />
					<property name="ShowMissingParams" value="${ShowMissing}" />
					<property name="ShowMissingReturns" value="${ShowMissing}" />
					<property name="ShowMissingValues" value="${ShowMissing}" />
					<property name="DocumentEmptyNamespaces" value="${ShowMissing}" />
					
					<property name="AutoPropertyBackerSummaries" value="true" />
					<property name="AutoDocumentConstructors" value="true" />
					<property name="DocumentProtected" value="True" />
					<property name="DocumentInternals" value="${ShowPrivate}" />
					<property name="DocumentPrivates" value="${ShowPrivate}" />
					
					<property name="IncludeAssemblyVersion" value="True" />
					<property name="CopyrightText" value="Copyright 2005-2007 - Kunle Odutola" />
					<property name="CopyrightHref" value="http://www.antlr.org" />
				</documenter>
			</documenters>
		</ndoc>
	</target>

<!--		
		description: 
			Copies all files to be documented to a single location to speed up the documentation process.
-->	
	<target name="copyFilesToDocument">
		<copy todir="${tempBin.dir}" flatten="true">
			<fileset basedir="build/${target.clr}">
				<include name="Antlr3.Runtime.dll"/>
				<include name="Antlr3.Runtime.xml"/>
				<include name="Antlr3.Utility.dll"/>
				<include name="Antlr3.Utility.xml"/>
			</fileset>
		</copy>
	</target>
		
<!--		
		description: 
			 Cleans up prior to documentation generation.
-->	
	<target name="clean.docs">
		<delete>
			<fileset>
<!--
				<include name="${doc.dir}/**"/>
-->				
				<exclude name="**/*.chm"/>
			</fileset>
		</delete>
	</target>

</project>