File: nant.build

package info (click to toggle)
sublib 0.9-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,496 kB
  • ctags: 1,237
  • sloc: sh: 12,882; cs: 6,558; makefile: 55; xml: 5
file content (114 lines) | stat: -rw-r--r-- 3,718 bytes parent folder | download | duplicates (3)
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
<?xml version="1.0" ?>

<project name="SubLib" default="build" basedir=".">
   	<description>SubLib - Subtitles Library.</description>
	<include buildfile="build.properties" />
	
	<target name="prepare" description="prepares to build">
		<mkdir dir="${build.dir}" />
	</target>
		
	<target name="clean" description="cleans the generated files">
		<delete dir="${build.dir}" failonerror="false" />
	</target>
	
	<target name="build" depends="prepare">
		<csc target="library" output="${library.build.path}" doc="${build.dir}/${sublib.name.lowercase}.xml">
			<sources basedir="${src.dir}">
				<include name="${external.name}/**/*.cs" />
				<include name="${sublib.name}/**/*.cs" />
			</sources>
		</csc>		
	</target>
	
	<target name="rebuild" depends="clean,build" />

	<target name="build-as-exe" depends="prepare">
		<csc target="exe" output="${executable.build.path}">
			<sources basedir="${src.dir}">
				<include name="**/*.cs" />
			</sources>
		</csc>
	</target>
	
	<target name="run" depends="build-as-exe">
		<exec program="mono">
			<arg value="${executable.build.path}" />
		</exec>
	</target>

	<target name="build-docs" depends="build">
		<ndoc>
			<assemblies>
				<include name="${library.build.path}" />
			</assemblies>
			<summaries>
				<include name="${docs.namespace.summary.path}" />
			</summaries>
			<documenters>
				<documenter name="MSDN">
					<property name="OutputDirectory" value="${docs.build.dir}" />
					<property name="OutputTarget" value="Web" />
					<property name="SkipNamespacesWithoutSummaries" value="true" />
					<property name="AutoDocumentConstructors" value="true" />
					<property name="AutoPropertyBackerSummaries" value="true" />
					<property name="Preliminary" value="false" />
					<property name="OutputTarget" value="Web" />
					<property name="Title" value="SubLib Subtitle Library" />
					<property name="SdkLinksOnWeb" value="true" />
					<property name="FooterHtml" value='This documentation is part of the
						&#60;a href="http://sublib.sourceforge.net"&#62;SubLlib&#60;/a&#62; project.' />
					<property name="ShowMissingSummaries" value="false" />
					<property name="ShowMissingReturns" value="false" />
					<property name="ShowMissingParams" value="false" />
				</documenter>
			</documenters>
		</ndoc>
    </target>

	<target name="clean-release">
		<delete dir="${release.dir}" failonerror="false" />
	</target>
	
	<target name="prepare-release">
		<fail if="${not property::exists('release.version')}"
			message="The release.version property must be defined in order to build a release." />
		<fail if="${not property::exists('release.type')}"
			message="The release.type property must be defined in order to build a release." />
		
		<delete dir="${release.path}" failonerror="false" />
		<mkdir dir="${release.path}" />
	</target>
	
	<target name="archive-release">
		<zip zipfile="${release.path}.zip">
			<fileset basedir="${release.dir}">
				<include name="${release.name}/**" />
			</fileset>
		</zip>
	</target>
	
	<target name="release-exe" depends="build-as-exe">
		<property name="release.type" value="exe" />
		<call target="prepare-release" />
		<copy todir="${release.path}">
			<fileset refid="executable.release.files" />
		</copy>
		<copy todir="${release.path}">
			<fileset refid="executable.release.build.files" />
		</copy>
		<call target="archive-release" />
	</target>
	
	<target name="release-src" depends="build">
		<property name="release.type" value="src" />
		<call target="prepare-release" />
		<copy todir="${release.path}">
			<fileset refid="source.release.files" />
		</copy>
		<call target="archive-release" />
	</target>

	<target name="release" depends="release-src, release-exe" />
	
</project>