root/trunk/anttasks/build-tangoexamples-win32.xml

Revision 292, 1.8 kB (checked in by qbert, 5 years ago)

Updated for new DMD syntax

Line 
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <project name="OwnTaskExample" default="compile" basedir=".">
3
4     <taskdef classname="anttasks.D" name="D" />
5     <taskdef classname="anttasks.DModuleBuildNumber" name="DBldNum" />
6     <taskdef classname="anttasks.DModuleBuildNumber" name="foreach" />
7
8     <property name="compiler.dir" value="C:\" />
9     <property name="compiler.type" value="dmd-windows" />
10     <property name="tango.dir" value="C:\dmd\tango" />
11     <property name="tango.examples.dir" value="${tango.dir}\example" />
12
13    
14     <target name="resgen" >
15         <!-- convert any file into a d module as a constant array
16         and read the data directly
17         This data can be any icon or other resource -->
18         <BinToD
19             file="t.d"
20             fqn="t"
21         >
22             <resource file="src/anttasks/BinToD.java" id="bintod" variable="bintod" version="all" />
23         </BinToD>
24     </target>   
25        
26     <target name="build-number" >
27         <DBldNum file="${tango.examples.hello}_bn.d" fqn="hello_bn" />
28     </target>   
29    
30     <macrodef name="compile" >
31         <attribute name="bldtrg" />
32         <sequential>
33             <D
34               type        = "${compiler.type}"
35               mode        = "executable"
36               compilerdir = "${compiler.dir}"
37               destfile    = "${tango.examples.dir}/@{bldtrg}.exe"
38               cleanup     = "true"
39             >
40 <!--                <version value="Posix" /> -->
41                
42                 <!-- The main modules -->
43                 <mainmodules>
44                     <fileset file="${tango.examples.dir}/@{bldtrg}.d"/>
45                 </mainmodules>
46                
47                 <!-- Modules for compilation and linking, if imported -->
48                 <includemodules>
49                     <dirset file="${tango.examples.dir}" />
50                     <dirset file="${tango.dir}" />
51                 </includemodules>
52    
53                 <!-- Imported modules, only for declarations, no compile/link (libs) -->
54                 <includepath>
55                 </includepath>
56             </D>
57         </sequential>
58     </macrodef>
59    
60     <target name="compile" >
61     <compile bldtrg="console/hello"/>
62     </target>
63
64
65 </project>
Note: See TracBrowser for help on using the browser.