2 <project name=
"boo" default=
"all">
4 <property name=
"boo.major.minor.release.version" value=
"0.8.1" />
5 <property name=
"boo.svn.revision" value=
"2896" />
6 <property name=
"boo.version" value=
"${boo.major.minor.release.version}.${boo.svn.revision}" dynamic=
"True" />
7 <property name=
"boo.assembly.version" value=
"2.0.0.0" />
9 <property name=
"debug" value=
"true" />
10 <property name=
"optimize" value=
"false" />
11 <property name=
"verbose" value=
"false" />
13 <property name=
"antlr.jar" value=
"lib/antlr-2.7.5/antlr-2.7.5.jar" />
14 <property name=
"java" value=
"java" />
16 <property name=
"ngen.exe" value=
"${framework::get-framework-directory(framework::get-target-framework())}/ngen.exe" />
17 <property name=
"skip.ngen" value=
"True" />
18 <property name=
"skip.antlr" value=
"False" />
19 <property name=
"skip.ast" value=
"False" />
20 <property name=
"skip.vs2005" value=
"False" />
22 <property name=
"build.dir" value=
"build" dynamic=
"True"/>
23 <property name=
"distrobuild.dir" value=
"distrobuild"/>
25 <property name=
"install.prefix" value=
"/usr/local" />
26 <property name=
"install.destdir" value=
"/" />
28 <property name=
"install.share" value=
"${path::combine(install.prefix,'share')}" />
29 <property name=
"install.bindir" value=
"${path::combine(install.prefix,'bin')}" />
30 <property name=
"install.libdir" value=
"${path::combine(install.prefix,'lib')}" />
31 <property name=
"install.boolib" value=
"${path::combine(install.libdir,'boo')}" />
33 <property name=
"fakeroot.boolib" value=
"${install.destdir}/${install.boolib}" />
34 <property name=
"fakeroot.bindir" value=
"${install.destdir}/${install.bindir}" />
35 <property name=
"fakeroot.libdir" value=
"${install.destdir}/${install.libdir}" />
36 <property name=
"fakeroot.share" value=
"${install.destdir}/${install.share}" />
38 <include buildfile=
"build.properties" if=
"${file::exists('build.properties')}" />
40 <property name=
"boo.distro.name" value=
"boo-${boo.version}" />
42 <property name=
"supported.runtimes.net-1.1" value=
"<supportedRuntime version="v1.1.4322"/>
43 <supportedRuntime version="v2.0.50727"/>" />
45 <property name=
"supported.runtimes.net-2.0"
46 value=
"<supportedRuntime version="v2.0.50727"/>
47 <supportedRuntime version="v1.1.4322"/>" />
49 <property name=
"supported.runtimes" value=
"${supported.runtimes.net-2.0}" />
51 <property name=
"csc.noconfig" value=
"false" />
52 <property name=
"csc.define" value=
"NET_2_0;TRACE;DEBUG" />
54 <property name=
"fixture" value=
"" dynamic=
"true" />
56 <property name=
"keyfile.path" value=
"src/boo.snk" overwrite=
"false" />
58 <target name=
"all" depends=
"booc, booi, booish, boo-pkgconfig, Boo.Lang.CodeDom, Boo.Lang.Useful, boo, Boo.Microsoft.Build.Tasks, update-vs2005-env">
61 <target name=
"set-release-configuration">
62 <property name=
"debug" value=
"false" />
63 <property name=
"optimize" value=
"true" />
64 <property name=
"csc.define" value=
"NET_2_0" />
67 <target name=
"nostdlib">
68 <property name=
"csc.define" value=
"${csc.define};NO_SYSTEM_DLL" />
69 <property name=
"csc.noconfig" value=
"true" />
72 <target name=
"test" depends=
"all">
74 basedir=
"${nant::get-base-directory()}"
77 useruntimeengine=
"true">
78 <arg value=
"-D:fixture=${fixture}" if=
"${fixture != ''}" />
83 <target name=
"test-vs-bin">
85 basedir=
"${nant::get-base-directory()}"
88 useruntimeengine=
"true">
89 <arg value=
"-D:fixture=${fixture}" if=
"${fixture != ''}" />
90 <arg value=
"run-vs-bin" />
94 <target name=
"compile-tests" depends=
"all">
96 basedir=
"${nant::get-base-directory()}"
99 useruntimeengine=
"true">
100 <arg value=
"compile" />
104 <target name=
"boo" depends=
"Boo.Lang.Useful, Boo.Lang.Interpreter">
107 output=
"${build.dir}/boo.exe"
110 keyfile=
"${keyfile.path}">
112 <sources basedir=
"src/boo">
113 <include name=
"*.boo" />
116 <references basedir=
"${build.dir}">
117 <include name=
"Boo.Lang.Useful.dll" />
118 <include name=
"Boo.Lang.Interpreter.dll" />
123 <target name=
"booish" depends=
"Boo.Lang.Interpreter">
126 output=
"${build.dir}/booish.exe"
129 keyfile=
"${keyfile.path}">
131 <sources basedir=
"src/booish">
132 <include name=
"*.boo" />
133 <exclude name=
"booish.boo" /><!-- old booish -->
136 <references basedir=
"${build.dir}">
137 <include name=
"Boo.Lang.Interpreter.dll" />
138 <include name=
"Boo.Lang.Compiler.dll" />
142 <copy file=
"extras/template.config.in" tofile=
"${build.dir}/booish.exe.config">
144 <replacestring from=
"@SUPPORTEDVERSIONS@"
145 to=
"${supported.runtimes}" />
149 <if test=
"${not(platform::is-win32())}">
150 <copy file=
"extras/booish.in" tofile=
"${build.dir}/booish" inputencoding=
"ASCII">
152 <replacestring from=
"@RUNTIME@" to=
"mono" />
153 <replacestring from=
"@prefix@" to=
"${install.prefix}" />
159 <target name=
"booi" depends=
"core, Boo.Lang.Useful, Boo.Lang.Parser">
163 output=
"${build.dir}/booi.exe"
166 keyfile=
"${keyfile.path}">
168 <references basedir=
"${build.dir}">
169 <include name=
"Boo.Lang.Parser.dll" />
170 <include name=
"Boo.Lang.Compiler.dll" />
171 <include name=
"Boo.Lang.Useful.dll" />
174 <sources basedir=
"src/booi">
175 <include name=
"*.boo" />
179 <copy file=
"extras/template.config.in" tofile=
"${build.dir}/booi.exe.config">
181 <replacestring from=
"@SUPPORTEDVERSIONS@"
182 to=
"${supported.runtimes}" />
186 <if test=
"${not(platform::is-win32())}">
187 <copy file=
"extras/booi.in" tofile=
"${build.dir}/booi" inputencoding=
"ASCII">
189 <replacestring from=
"@RUNTIME@" to=
"mono" />
190 <replacestring from=
"@prefix@" to=
"${install.prefix}" />
196 print(
"Hello from boo task!")
197 print(
"Framework directory: ${Project.TargetFramework.FrameworkAssemblyDirectory}")
202 <target name=
"dump-properties" depends=
"core">
204 for p as System.Collections.DictionaryEntry in Project.Properties:
205 print(
"${p.Key}: ${p.Value}")
209 <target name=
"Boo.Lang.Interpreter" depends=
"core">
210 <booc target=
"library"
211 output=
"${build.dir}/Boo.Lang.Interpreter.dll"
214 keyfile=
"${keyfile.path}">
215 <sources basedir=
"src/Boo.Lang.Interpreter">
216 <include name=
"*.boo" />
218 <references basedir=
"${build.dir}">
219 <include name=
"Boo.Lang.Compiler.dll" />
224 <target name=
"Boo.NAnt.Tasks" depends=
"booc">
225 <uptodate property=
"Boo.NAnt.Tasks-is-uptodate">
226 <sourcefiles basedir=
"src/Boo.NAnt.Tasks">
227 <include name=
"*.boo" />
230 <include name=
"${build.dir}/Boo.NAnt.Tasks.dll" />
235 <property name=
"debugflag" value=
"-debug"/>
237 <if test=
"${not debug}">
238 <property name=
"debugflag" value=
"-debug-"/>
241 <exec program=
"${build.dir}/booc.exe" useruntimeengine=
"true" unless=
"${Boo.NAnt.Tasks-is-uptodate}">
243 <arg value=
"-noconfig" />
244 <arg value=
"${debugflag}" />
245 <arg value=
"-out:${build.dir}/Boo.NAnt.Tasks.dll" />
246 <arg value=
"-target:library" />
247 <!--arg value="-keyfile:${keyfile.path}" /-->
248 <arg value=
"-lib:${nant::get-base-directory()}" />
249 <arg value=
"-r:NAnt.Core.dll" />
250 <arg value=
"-r:NAnt.DotNetTasks.dll" />
251 <arg value=
"src/Boo.NAnt.Tasks/UpdateAssemblyVersionTask.boo" />
252 <arg value=
"src/Boo.NAnt.Tasks/InsertLicenseTask.boo" />
253 <arg value=
"src/Boo.NAnt.Tasks/BoocTask.boo" />
254 <arg value=
"src/Boo.NAnt.Tasks/BooTask.boo" />
255 <arg value=
"src/Boo.NAnt.Tasks/AbstractBooTask.boo" />
258 <loadtasks assembly=
"${build.dir}/Boo.NAnt.Tasks.dll" />
261 <target name=
"booc" depends=
"corecs">
263 output=
"${build.dir}/booc.exe"
265 optimize=
"${optimize}"
266 define=
"${csc.define}"
267 keyfile=
"${keyfile.path}">
268 <sources basedir=
"src/booc">
269 <include name=
"*.cs" />
273 <include name=
"${build.dir}/Boo.Lang.dll" />
274 <include name=
"${build.dir}/Boo.Lang.Compiler.dll" />
275 <include name=
"${build.dir}/Boo.Lang.Parser.dll" />
279 <if test=
"${not(platform::is-win32())}">
280 <copy file=
"extras/booc.in" tofile=
"${build.dir}/booc" inputencoding=
"ASCII">
282 <replacestring from=
"@RUNTIME@" to=
"mono" />
283 <replacestring from=
"@prefix@" to=
"${install.prefix}" />
288 <copy todir=
"${build.dir}" file=
"src/booc/booc.rsp" />
290 <copy file=
"extras/template.config.in" tofile=
"${build.dir}/booc.exe.config">
292 <replacestring from=
"@SUPPORTEDVERSIONS@"
293 to=
"${supported.runtimes}" />
297 <exec program='${ngen.exe}'
if=
"${file::exists(ngen.exe)}" unless=
"${skip.ngen}">
298 <arg file='${build.dir}/Boo.Lang.dll'
/>
299 <arg file='${build.dir}/Boo.Lang.Compiler.dll'
/>
300 <arg file='${build.dir}/Boo.Lang.Extensions.dll'
/>
301 <arg file='${build.dir}/Boo.Lang.Parser.dll'
/>
302 <arg file='${build.dir}/booc.exe'
/>
306 <target name=
"corecs" depends=
"Boo.Lang, Boo.Lang.Compiler, Boo.Lang.Parser">
309 <target name=
"core" depends=
"corecs, Boo.Lang.Extensions, Boo.NAnt.Tasks" />
311 <target name=
"update-bin" depends=
"all">
314 <fileset basedir=
"bin">
315 <include name=
"*.Tasks.dll" />
316 <include name=
"*.targets" />
317 <include name=
"*.config" />
318 <include name=
"*.exe" />
322 <fileset basedir=
"${build.dir}">
323 <include name=
"pt/Boo.Lang.resources.dll" />
324 <include name=
"Boo.*.dll" />
325 <include name=
"boo*.exe" />
326 <include name=
"boo*.rsp" />
327 <include name=
"*.config" />
328 <include name=
"*.targets" />
333 <target name=
"Boo.Microsoft.Build.Tasks" depends=
"core">
334 <call target=
"msbuild" if=
"${'net-2.0' == framework::get-target-framework()}"/>
335 <!-- MSBuild doesn't appear to be supported in mono-2.0 -->
338 <target name=
"msbuild">
339 <booc target=
"library"
340 output=
"${build.dir}/Boo.Microsoft.Build.Tasks.dll"
344 keyfile=
"${keyfile.path}">
345 <sources basedir=
"src/Boo.Microsoft.Build.Tasks">
346 <include name=
"**/*.boo" />
348 <references basedir=
"${build.dir}">
349 <include name=
"Microsoft.Build.Utilities.dll" />
350 <include name=
"Microsoft.Build.Tasks.dll" />
351 <include name=
"Microsoft.Build.Framework.dll" />
354 <copy todir=
"${build.dir}">
355 <fileset basedir=
"src/Boo.Microsoft.Build.Tasks">
356 <include name=
"Boo.Microsoft.Build.targets" />
361 <target name=
"Boo.Lang.Useful" depends=
"core">
362 <uptodate property=
"useful-grammars-uptodate">
363 <sourcefiles basedir=
"src/Boo.Lang.Useful">
364 <include name=
"**/*.g" />
366 <targetfiles basedir=
"src/Boo.Lang.Useful">
367 <include name=
"**/*Lexer.boo" />
371 <if test=
"${not useful-grammars-uptodate}">
372 <exec program=
"${java}" failonerror=
"true">
374 <arg file=
"${antlr.jar}" />
375 <arg value=
"antlr.Tool" />
376 <!-- <arg value="-traceParser" /> -->
378 <arg value=
"src/Boo.Lang.Useful/IO/Impl" />
379 <arg value=
"src/Boo.Lang.Useful/IO/PreProcessorExpressions.g" />
383 <booc target=
"library"
384 output=
"${build.dir}/Boo.Lang.Useful.dll"
387 keyfile=
"${keyfile.path}">
388 <sources basedir=
"src/Boo.Lang.Useful">
389 <include name=
"**/*.boo" />
391 <references basedir=
"${build.dir}">
392 <include name=
"Boo.Lang.Parser.dll" />
393 <include name=
"Boo.Lang.Compiler.dll" />
398 <target name=
"Boo.Lang.CodeDom" depends=
"core">
399 <booc target=
"library"
400 output=
"${build.dir}/Boo.Lang.CodeDom.dll"
403 keyfile=
"${keyfile.path}">
404 <sources basedir=
"src/Boo.Lang.CodeDom">
405 <include name=
"**/*.boo" />
407 <references basedir=
"${build.dir}">
409 <include name="System.Data.dll" />
410 <include name="System.Xml.dll" />
412 <include name=
"Boo.Lang.Compiler.dll" />
417 <target name=
"Boo.Lang.Extensions" depends=
"corecs, Boo.NAnt.Tasks">
418 <uptodate property=
"skip.Boo.Lang.Extensions">
419 <sourcefiles basedir=
"src/Boo.Lang.Extensions">
420 <include name=
"**/*.boo" />
422 <targetfiles basedir=
"${build.dir}">
423 <include name=
"Boo.Lang.Extensions.*" />
426 <delete file=
"${build.dir}/Boo.Lang.Extensions.dll" failonerror=
"false" unless=
"${skip.Boo.Lang.Extensions}"/>
427 <booc target=
"library"
428 output=
"${build.dir}/Boo.Lang.Extensions.dll"
432 unless=
"${skip.Boo.Lang.Extensions}"
433 keyfile=
"${keyfile.path}">
434 <sources basedir=
"src/Boo.Lang.Extensions">
435 <include name=
"**/*.boo" />
437 <references basedir=
"${build.dir}">
438 <include name=
"Boo.Lang.Compiler.dll" />
443 <target name=
"Boo.Lang.Compiler" depends=
"Boo.Lang, Boo.Lang.Ast">
444 <csc target=
"library"
445 output=
"${build.dir}/Boo.Lang.Compiler.dll"
447 optimize=
"${optimize}"
448 define=
"${csc.define}"
449 keyfile=
"${keyfile.path}">
451 <sources basedir=
"src/Boo.Lang.Compiler">
452 <include name=
"**/*.cs" />
456 <include name=
"${build.dir}/Boo.Lang.dll" />
457 <!--include name="${build.dir}/Boo.Lang.Ast.dll" /-->
462 <target name=
"Boo.Lang.Ast" depends=
"Boo.Lang, generate-ast">
465 output="${build.dir}/Boo.Lang.Ast.dll"
467 optimize="${optimize}"
468 define="${csc.define}">
470 <sources basedir="src/Boo.Lang.Ast">
471 <include name="**/*.cs" />
475 <include name="${build.dir}/Boo.Lang.dll" />
480 <target name="Boo.Lang" depends="resources">
483 output="${build.dir}/Boo.Lang.dll"
485 optimize="${optimize}"
486 if="${string::starts-with(framework::get-target-framework(), 'net-')}"
487 define="${csc.define}"
488 noconfig="${csc.noconfig}">
490 <sources basedir="src/Boo.Lang">
491 <include name="**/*.cs" />
494 <resources basedir="${build.dir}">
495 <include name="strings.resources" />
497 <resources basedir="${build.dir}/pt">
498 <include name="strings.pt.resources" />
500 <resources basedir="${build.dir}/it">
501 <include name="strings.it.resources" />
507 output="${build.dir}/Boo.Lang.dll"
509 optimize="${optimize}"
510 unless="${string::starts-with(framework::get-target-framework(), 'net-')}"
511 define="${csc.define}"
512 noconfig="${csc.noconfig}">
514 <sources basedir="src/Boo.Lang">
515 <include name="**/*.cs" />
518 <resources basedir="${build.dir}">
519 <include name="strings.resources" />
524 <target name="boo-pkgconfig">
525 <copy file="extras/boo.pc.in" tofile="${build.dir}/boo.pc" if="${not(platform::is-win32())}" inputencoding="ASCII">
527 <replacestring from="@prefix@" to="${install.prefix}" />
528 <replacestring from="@VERSION@" to="${boo.version}" />
533 <target name="install" depends="booc, booish, booi">
534 <call target="install-win32" if="${platform::is-win32()}"/>
535 <call target="install-linux" if="${not(platform::is-win32())}"/>
538 <target name="install-linux" depends="booc, booish, booi">
540 Use pkg-config to find the proper locations for several
541 key files for mime detection, etc
544 <property name=
"sharedmime.prefix" value=
"${pkg-config::get-variable('shared-mime-info','prefix')}" />
545 <property name=
"fakeroot.sharedmime" value=
"${install.destdir}/${sharedmime.prefix}" />
546 <property name=
"gsv.prefix" value=
"${pkg-config::get-variable('gtksourceview-1.0','prefix')}" />
547 <property name=
"fakeroot.gsv" value=
"${install.destdir}/${gsv.prefix}" />
549 <mkdir dir=
"${fakeroot.boolib}"/>
550 <mkdir dir=
"${fakeroot.bindir}"/>
552 <copy todir=
"${fakeroot.boolib}">
553 <fileset basedir=
"${build.dir}">
554 <include name=
"*.exe"/>
555 <include name=
"*.rsp"/>
556 <include name=
"*.config"/>
557 <include name=
"*.targets"/>
558 <include name=
"*.Tasks.dll" />
562 <foreach item=
"File" property=
"filename">
565 <include name=
"${build.dir}/Boo.Lang*.dll" />
569 <exec program=
"gacutil" useruntimeengine=
"false" workingdir=
"${build.dir}">
571 <arg value=
"${path::get-file-name(filename)}" />
572 <arg value=
"/package" />
574 <arg value=
"/root" />
575 <arg value=
"${fakeroot.libdir}" />
580 <copy todir=
"${fakeroot.boolib}/pt">
581 <fileset basedir=
"${build.dir}/pt">
586 <copy todir=
"${fakeroot.bindir}">
587 <fileset basedir=
"${build.dir}">
588 <include name=
"booc"/>
589 <include name=
"booish"/>
590 <include name=
"booi"/>
594 <copy todir=
"${fakeroot.sharedmime}/share/mime-info">
595 <fileset basedir=
"extras">
596 <include name=
"boo.keys" />
597 <include name=
"boo.mime" />
601 <copy file=
"extras/boo.lang" todir=
"${fakeroot.gsv}/share/gtksourceview-1.0/language-specs/" />
602 <copy file=
"${build.dir}/boo.pc" todir=
"${fakeroot.libdir}/pkgconfig/" />
603 <copy file=
"extras/boo-mime-info.xml" todir=
"${fakeroot.sharedmime}/share/mime/packages/" />
605 <exec program=
"chmod" commandline=
"+x ${fakeroot.bindir}/booc" />
606 <exec program=
"chmod" commandline=
"+x ${fakeroot.bindir}/booi" />
607 <exec program=
"chmod" commandline=
"+x ${fakeroot.bindir}/booish" />
610 <target name=
"install-win32" depends=
"all">
612 <fail unless=
"${property::exists('mono.prefix')}">
613 Please set the property 'mono.prefix' to point to the prefix of your
614 mono installation (example: c:\dotnet\mono-
1.1.8).
617 <copy todir=
"${path::combine(mono.prefix, 'lib/boo')}">
618 <fileset basedir=
"${build.dir}">
619 <include name=
"*.exe"/>
620 <include name=
"*.rsp"/>
621 <include name=
"*.config"/>
622 <include name=
"*.targets"/>
623 <include name=
"*.Tasks.dll" />
627 <foreach item=
"File" property=
"filename">
630 <include name=
"${build.dir}/Boo.Lang*.dll" />
634 <exec program=
"${path::combine(mono.prefix, 'bin/gacutil.bat')}"
635 useruntimeengine=
"false" workingdir=
"${build.dir}">
637 <arg value=
"${path::get-file-name(filename)}" />
638 <arg value=
"/package" />
646 <target name=
"uninstall">
647 <call target=
"uninstall-linux" if=
"${not(platform::is-win32())}"/>
648 <call target=
"uninstall-win32" if=
"${platform::is-win32()}"/>
651 <target name=
"uninstall-linux">
653 Use pkg-config to find the proper locations for several
654 key files for mime detection, etc
657 <property name=
"sharedmime.prefix" value=
"${pkg-config::get-variable('shared-mime-info','prefix')}" />
658 <property name=
"fakeroot.sharedmime" value=
"${install.destdir}/${sharedmime.prefix}" />
659 <property name=
"gsv.prefix" value=
"${pkg-config::get-variable('gtksourceview-1.0','prefix')}" />
660 <property name=
"fakeroot.gsv" value=
"${install.destdir}/${gsv.prefix}" />
662 <foreach item=
"File" property=
"filename">
665 <include name=
"bin/Boo.Lang*.dll" />
669 <exec program=
"gacutil" useruntimeengine=
"false">
671 <arg value=
"${path::get-file-name-without-extension(filename)}" />
672 <arg value=
"/package" />
678 <delete dir=
"${fakeroot.boolib}" />
680 <delete file=
"${fakeroot.sharedmime}/share/mime-info/boo.keys" />
681 <delete file=
"${fakeroot.sharedmime}/share/mime-info/boo.mime" />
682 <delete file=
"${fakeroot.gsv}/share/gtksourceview-1.0/language-specs/boo.lang" />
683 <delete file=
"${fakeroot.libdir}/pkgconfig/boo.pc" />
684 <delete file=
"${fakeroot.sharedmime}/share/mime/packages/boo-mime-info.xml" />
685 <delete file=
"${fakeroot.bindir}/booi" />
686 <delete file=
"${fakeroot.bindir}/booc" />
687 <delete file=
"${fakeroot.bindir}/booish" />
690 <target name=
"uninstall-win32">
691 <exec program='${ngen.exe}'
if=
"${file::exists(ngen.exe)}" unless=
"${skip.ngen}">
692 <arg value='/delete'
/>
693 <arg value='Boo.Lang'
/>
694 <arg value='Boo.Lang.Compiler'
/>
695 <arg value='Boo.Lang.Parser'
/>
696 <arg file='${build.dir}/booc.exe'
/>
700 <target name=
"Boo.Lang.Parser" depends=
"Boo.Lang.Compiler, compile-grammar">
701 <csc target=
"library"
702 output=
"${build.dir}/Boo.Lang.Parser.dll"
704 optimize=
"${optimize}"
705 define=
"${csc.define}"
706 keyfile=
"${keyfile.path}">
707 <sources basedir=
"src/Boo.Lang.Parser">
708 <include name=
"**/*.cs" />
711 <include name=
"${build.dir}/Boo.Lang.dll" />
712 <include name=
"${build.dir}/Boo.Lang.Compiler.dll" />
715 <warning number=
"618,219,162" />
720 <target name=
"insert-license" depends=
"core">
721 <insertLicense license=
"notice.txt">
722 <fileset basedir=
"src">
723 <include name=
"**/*.cs" />
724 <include name=
"**/*.boo" />
725 <exclude name=
"Boo.Lang.Parser/antlr/**" />
727 <fileset basedir=
"examples">
728 <include name=
"**/*.boo" />
733 <target name=
"update-stable-branch" depends=
"SVNUtil">
734 <boo src=
"scripts/update-stable-branch.boo">
735 <references basedir=
"${build.dir}">
736 <include name=
"SVNUtil.dll" />
741 <target name=
"create-distro-tag" depends=
"SVNUtil">
742 <boo src=
"scripts/create-distro-tag.boo">
743 <references basedir=
"${build.dir}">
744 <include name=
"SVNUtil.dll" />
749 <target name=
"SVNUtil" depends=
"core">
750 <booc target=
"library" output=
"${build.dir}/SVNUtil.dll">
751 <sources basedir=
"scripts">
752 <include name=
"SVNUtil.boo" />
757 <target name=
"upload-distro" depends=
"make-bin-dist">
760 <arg file=
"${boo.distro.name}-bin.zip" />
761 <arg file=
"${boo.distro.name}-src.zip" />
762 <arg file=
"${boo.distro.name}-bin.tar.bz2" />
763 <arg file=
"${boo.distro.name}-src.tar.bz2" />
764 <arg file=
"${boo.distro.name}.tar.gz" />
765 <arg value=
"${distro-user}@beaver.codehaus.org:/home/projects/boo/dist/distributions/" />
769 <target name=
"distro">
770 <call target=
"distro-win32" if=
"${platform::is-win32()}"/>
771 <call target=
"distro-linux" if=
"${not(platform::is-win32())}"/>
774 <!-- Deprecated, now that binaries are built for multiple frameworks. -->
775 <target name=
"distro-linux" depends=
"src-distro">
778 <!-- meant to be run on Windows with both .net 1.1 and .net 2.0 installed -->
779 <target name=
"distro-win32">
780 <fail unless=
"${nant.platform.win32}">
781 Use the make-bin-dist or install targets instead on non-win32 platforms.
783 <delete dir=
"${distrobuild.dir}" if=
"${directory::exists(distrobuild.dir)}" />
784 <mkdir dir=
"${distrobuild.dir}"/>
786 <!-- We call nant externally so we can target multiple frameworks. -->
787 <exec program=
"${nant.location}/NAnt.exe">
788 <arg value=
"-t:net-2.0" />
789 <arg value=
"distro-net-2.0" />
792 <!-- Here we actually build the zip files. -->
793 <call target=
"src-distro" />
796 <target name=
"distro-net-2.0">
797 <call target=
"rebuild" />
798 <call target=
"update-bin" />
801 <target name=
"prepare-bin-distro" depends=
"insert-license">
802 <property name=
"distro.dir" value=
"${build.dir}/${boo.distro.name}" />
804 <delete dir=
"${distro.dir}" if=
"${directory::exists(distro.dir)}" />
805 <mkdir dir=
"${distro.dir}" />
807 <copy todir=
"${distro.dir}">
809 <include name=
"readme.txt" />
810 <include name=
"license.txt" />
811 <include name=
"ast.model.boo" />
812 <include name=
"docs/**/*.boo" />
813 <include name=
"docs/**/*.build" />
814 <include name=
"docs/**/*.sxw" />
815 <include name=
"bin/**/*.dll" />
816 <include name=
"bin/**/*.exe" />
817 <include name=
"bin/**/*.rsp" />
818 <include name=
"bin/**/*.config" />
819 <include name=
"bin/**/*.targets" />
821 <include name=
"extras/**/*.boo" />
822 <include name=
"extras/**/*.cs" />
823 <include name=
"extras/**/*.png" />
824 <include name=
"extras/**/*.ico" />
825 <include name=
"extras/**/*.prjx" />
826 <include name=
"extras/**/*.xml" />
827 <include name=
"extras/**/*.build" />
828 <include name=
"extras/**/*.lang" />
829 <include name=
"extras/**/*.keys" />
830 <include name=
"extras/**/*.mime" />
831 <include name=
"extras/install-gtksourceview-mode" />
832 <include name=
"extras/SharpDevelop/**/*.xshd" />
833 <include name=
"extras/SharpDevelop/**/*.xft" />
834 <include name=
"extras/SharpDevelop/**/*.xpt" />
835 <include name=
"extras/SharpDevelop/**/*.txtres" />
836 <include name=
"extras/SharpDevelop/**/*.addin" />
838 <include name=
"examples/**/*.boo" />
839 <include name=
"examples/**/*.xml" />
840 <include name=
"examples/**/*.aspx" />
841 <include name=
"examples/**/*.build" />
842 <include name=
"examples/**/*.config" />
847 <target name=
"bin-distro" depends=
"prepare-bin-distro">
848 <zip zipfile=
"${boo.distro.name}-bin.zip" ziplevel=
"9">
849 <fileset basedir=
"${distro.dir}">
850 <include name=
"**" />
855 <target name=
"prepare-src-distro" depends=
"bin-distro">
856 <copy todir=
"${distro.dir}">
858 <include name=
"extras/*.in" />
859 <include name=
"default.build" />
860 <include name=
"notice.txt" />
861 <include name=
"scripts/*.boo" />
862 <include name=
"scripts/Templates/*.cs" />
863 <include name=
"lib/**/*.jar" />
864 <include name=
"configure.in.in" />
865 <include name=
"Makefile.am" />
866 <include name=
"bin/Makefile.am" />
867 <include name=
"extras/Makefile.am" />
869 <include name=
"${keyfile.path}" />
870 <include name=
"src/**/*.cs" />
871 <include name=
"src/**/*.boo" />
872 <include name=
"src/**/*.rsp" />
873 <include name=
"src/**/*.g" />
874 <include name=
"src/**/*.prjx" />
875 <include name=
"src/**/*.cmbx" />
876 <include name=
"src/**/*.targets" />
877 <include name=
"src/Boo.Lang/Resources/**/*.txt" />
879 <include name=
"tests/nunit.inc" />
880 <include name=
"tests/test.snk" />
881 <include name=
"tests/**/*.boo" />
882 <include name=
"tests/**/*.cs" />
883 <include name=
"tests/**/*.txt" />
884 <include name=
"tests/**/*.build" />
885 <include name=
"tests/**/*.prjx" />
890 <target name=
"src-distro" depends=
"prepare-src-distro">
891 <zip zipfile=
"${boo.distro.name}-src.zip" ziplevel=
"9">
892 <fileset basedir=
"${distro.dir}">
893 <include name=
"**" />
897 <tar destfile=
"${boo.distro.name}-src.tar.bz2" compression=
"BZip2">
898 <fileset basedir=
"${build.dir}">
899 <include name=
"${boo.distro.name}/**/*"/>
904 <target name=
"make-bin-dist">
905 <copy file=
"configure.in.in" tofile=
"configure.in" inputencoding=
"ASCII">
907 <replacestring from=
"VERSION" to=
"${boo.version}" />
911 <!-- Needed to keep automake from freaking -->
913 <touch file=
"AUTHORS"/>
914 <touch file=
"ChangeLog"/>
915 <touch file=
"README"/>
917 <!-- "./autogen.sh", effectively -->
918 <exec program=
"aclocal" useruntimeengine=
"false" />
919 <exec program=
"autoconf" useruntimeengine=
"false" />
920 <exec program=
"automake" useruntimeengine=
"false">
921 <arg value=
"--add-missing" />
924 <exec program=
"./configure" useruntimeengine=
"false" />
926 <exec program=
"make" useruntimeengine=
"false">
930 <exec program=
"make" useruntimeengine=
"false">
931 <arg value=
"distclean" />
934 <!-- Clean up all the crap autotools spits out everywhere -->
937 <include name=
"NEWS" />
938 <include name=
"AUTHORS" />
939 <include name=
"ChangeLog" />
940 <include name=
"README" />
941 <include name=
"COPYING" />
942 <include name=
"INSTALL" />
943 <include name=
"**/Makefile.in" />
944 <exclude name=
"lib/**/*.*" />
945 <include name=
"configure" />
946 <include name=
"autom4te.cache/*" />
947 <include name=
"autom4te.cache" />
948 <include name=
"aclocal.m4" />
949 <include name=
"install-sh" />
950 <include name=
"missing" />
951 <include name=
"configure.in" />
956 <target name=
"resources" depends=
"init">
959 input=
"src/Boo.Lang/Resources/strings.txt"
960 output=
"${build.dir}/strings.resources" />
962 <property name=
"locale" value=
"pt" />
963 <call target=
"build-resource" />
965 <property name=
"locale" value=
"it" />
966 <call target=
"build-resource" />
970 <target name=
"build-resource">
972 <mkdir dir=
"${build.dir}/${locale}" />
974 input=
"src/Boo.Lang/Resources/${locale}/strings.txt"
975 output=
"${build.dir}/${locale}/strings.${locale}.resources" />
979 <target name=
"compile-grammar" depends=
"init" unless=
"${skip.antlr}">
981 <uptodate property=
"parser-is-uptodate">
982 <sourcefiles basedir=
"src/Boo.Lang.Parser">
983 <include name=
"boo.g" />
984 <include name=
"booel.g" />
985 <include name=
"wsaboo.g" />
986 <include name=
"wsabooel.g" />
988 <targetfiles basedir=
"src/Boo.Lang.Parser">
989 <include name=
"BooParserBase.cs" />
990 <include name=
"BooExpressionLexer.cs" />
991 <include name=
"WSABooParserBase.cs" />
992 <include name=
"WSABooExpressionLexer.cs" />
996 <if test=
"${not parser-is-uptodate}">
999 <fileset basedir=
"src/Boo.Lang.Parser">
1000 <include name=
"*TokenTypes.*" />
1004 <exec program=
"${java}" failonerror=
"true">
1006 <arg file=
"${antlr.jar}" />
1007 <arg value=
"antlr.Tool" />
1009 <arg value=
"src/Boo.Lang.Parser/" />
1010 <arg value=
"src/Boo.Lang.Parser/boo.g" />
1013 <exec program=
"${java}" failonerror=
"true">
1015 <arg file=
"${antlr.jar}" />
1016 <arg value=
"antlr.Tool" />
1018 <arg value=
"src/Boo.Lang.Parser/" />
1019 <arg value=
"src/Boo.Lang.Parser/booel.g" />
1022 <exec program=
"${java}" failonerror=
"true">
1024 <arg file=
"${antlr.jar}" />
1025 <arg value=
"antlr.Tool" />
1027 <arg value=
"src/Boo.Lang.Parser/" />
1028 <arg value=
"src/Boo.Lang.Parser/wsaboo.g" />
1031 <exec program=
"${java}" failonerror=
"true">
1033 <arg file=
"${antlr.jar}" />
1034 <arg value=
"antlr.Tool" />
1036 <arg value=
"src/Boo.Lang.Parser/" />
1037 <arg value=
"src/Boo.Lang.Parser/wsabooel.g" />
1040 <touch file=
"src/Boo.Lang.Parser/BooParserBase.cs" />
1044 <target name=
"update-vs2005-env" unless=
"${skip.vs2005}">
1045 <exec program=
"bin/booi.exe" useruntimeengine=
"true">
1046 <arg value=
"scripts/update-vs2005-env.boo" />
1050 <target name=
"generate-ast" depends=
"init" unless=
"${skip.ast}">
1052 <uptodate property=
"ast-is-uptodate">
1054 <include name=
"ast.model.boo" />
1055 <include name=
"scripts/astgen.boo" />
1056 <include name=
"scripts/Templates/*.cs" />
1059 <include name=
"src/Boo.Lang.Compiler/Ast/Impl/CompileUnitImpl.cs" />
1063 <if test=
"${not ast-is-uptodate}">
1064 <delete dir=
"src/Boo.Lang.Compiler/Ast/Impl"
1065 if=
"${directory::exists('src/Boo.Lang.Compiler/Ast/Impl')}" />
1066 <mkdir dir=
"src/Boo.Lang.Compiler/Ast/Impl" />
1067 <exec program=
"bin/booi.exe" useruntimeengine=
"true">
1068 <arg value=
"scripts/astgen.boo" />
1073 <target name=
"update-svn-revision-number" depends=
"SVNUtil, Boo.Lang.Useful">
1075 <references basedir=
"${build.dir}">
1076 <include name=
"SVNUtil.dll" />
1077 <include name=
"Boo.Lang.Useful.dll" />
1082 output = svn(
"info")
1083 revision = /Revision:\s+(\d+)/.Match(output).Groups[
1].Value
1084 Project.Properties[
"boo.svn.revision"] = revision
1085 print Project.Properties[
"boo.version"]
1087 contents = File.ReadAllText(
"default.build")
1088 newContents = /property\s+
name=
"boo.svn.revision"\s+
value=
"\d*"/.Replace(
1090 "property name=\"boo.svn.revision\
" value=\"${revision}\
"")
1091 File.WriteAllText(
"default.build", newContents) if contents != newContents
1095 <target name=
"update-sharpdevelop" depends=
"all">
1096 <copy todir=
"${sharpdevelop.dir}/AddIns/AddIns/BackendBindings/BooBinding">
1097 <fileset basedir=
"${build.dir}">
1098 <include name=
"*.dll" />
1099 <include name=
"*.exe" />
1104 <target name=
"update-assembly-attributes" depends=
"core, update-svn-revision-number">
1108 fname =
"src/Boo.Lang/Builtins.cs"
1109 builtins = File.ReadAllText(fname)
1111 version = Project.Properties[
"boo.version"]
1112 newBuiltins = @/new System.Version\(
".+"\)/.Replace(builtins,
"new System.Version(\"${version}\
")")
1113 if builtins != newBuiltins:
1115 File.WriteAllText(fname, newBuiltins)
1118 <updateAssemblyVersion
1119 version=
"${boo.assembly.version}">
1120 <fileset basedir=
"src">
1121 <include name=
"**/AssemblyInfo.cs" />
1122 <include name=
"**/AssemblyInfo.boo" />
1124 <fileset basedir=
"extras">
1125 <include name=
"**/AssemblyInfo.boo" />
1127 </updateAssemblyVersion>
1129 <updateAssemblyVersion
1130 copyright=
"(C) 2003-2007 Rodrigo Barreto de Oliveira">
1131 <fileset basedir=
"src">
1132 <include name=
"**/AssemblyInfo.cs" />
1133 <include name=
"**/AssemblyInfo.boo" />
1135 <fileset basedir=
"extras">
1136 <include name=
"**/AssemblyInfo.boo" />
1137 <exclude name=
"SharpDevelop/**/*.*" />
1139 </updateAssemblyVersion>
1142 <target name=
"rebuild" depends=
"clean">
1144 <touch file=
"ast.model.boo" />
1145 <touch file=
"src/Boo.Lang.Parser/boo.g" />
1146 <touch file=
"src/Boo.Lang.Parser/booel.g" />
1147 <mkdir dir=
"${build.dir}" />
1148 <call target=
"all" />
1151 <target name=
"clean">
1152 <delete dir=
"${build.dir}" failonerror=
"false" />
1155 <target name=
"init">
1156 <mkdir dir=
"${build.dir}" />
1159 <target name=
"makedeb" depends=
"rebuild">
1160 <!-- force rebuild to make sure everything's ok and wrappers
1161 are sync'ed with current install.prefix
1163 <nant buildfile=
"extras/makedeb.build" />