~gryle-devel/gryle/trunk-deleted

« back to all changes in this revision

Viewing changes to build.xml

  • Committer: Chris Lamb
  • Date: 2007-01-13 23:37:40 UTC
  • mto: (1.2.18 gryle)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: csueaj@viglab-29-20070113233740-4h2ere24gxasebeh
Cleanup building, nice build script

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
                Build Gryle.
10
10
        </description>
11
11
 
12
 
    <property name="src"      location="src/"/>
13
 
        <property name="bin"      location="bin/"/>
14
 
        <property name="dist"     location="dist/"/>
15
 
        <property name="javadoc"  location="javadoc/"/>
16
 
        <property name="classes"  location="uk/org/wuglug/gryle" />
 
12
        <property name="distprefix"  value="gryle-0.1"/>
 
13
    <property name="src"         location="src"/>
 
14
        <property name="bin"         location="bin"/>
 
15
        <property name="dist"        location="dist"/>
 
16
        <property name="javadoc"     location="javadoc"/>
 
17
        <property name="classes"     location="uk/org/wuglug/gryle"/>
 
18
        <property name="mainclass"   value="uk.org.wuglug.gryle.Main"/>
17
19
        
18
20
        <!-- Clean -->
19
21
    <target name="clean">
20
22
                <delete dir="${bin}"/>
21
23
                <delete dir="${javadoc}"/>
22
 
                <delete dir="${dist"/>
 
24
                <delete dir="${dist}"/>
23
25
        </target>
24
26
 
25
27
    <!-- Build -->
26
 
    <target name="build" description="Build Gryle">
27
 
                <mkdir dir="{$bin}"/>
 
28
    <target name="build" depends="clean" description="Build Gryle">
 
29
                <mkdir dir="${bin}"/>
28
30
        <javac debug="true" debuglevel="source,lines,vars" destdir="bin" source="1.5" target="1.5">
29
31
            <src path="${src}"/>
30
32
        </javac>
31
33
    </target>
32
34
 
 
35
        <!-- Run -->
 
36
        <target name="run" depends="jars" description="Run Gryle">
 
37
                <java jar="${dist}/gryle.jar" fork="true"/>
 
38
        </target>
 
39
 
33
40
        <!-- Javadoc -->
34
41
        <target name="javadoc" description="Generate documentation">
35
 
                <mkdir dir="{$javadoc}"/>
 
42
                <mkdir dir="${javadoc}"/>
36
43
                <javadoc destdir="${javadoc">
37
44
                        <packageset dir="${src}" includes="${classes}"/>
38
45
                </javadoc>
40
47
 
41
48
        <!-- Jars -->
42
49
        <target name="jars" depends="build" description="Creates JAR files">
43
 
                
 
50
                <mkdir dir="${dist}"/>
 
51
                <jar destfile="${dist}/gryle.jar" basedir="${bin}">
 
52
                        <manifest>
 
53
                                <attribute name="Main-Class" value="${mainclass}"/>
 
54
                        </manifest>
 
55
                </jar>
44
56
        </target>
45
57
 
46
58
        <!-- Dist -->
47
59
        <target name="dist" depends="jars" description="Generate distribution tarballs">
48
 
                <mkdir dir="${dist}"/>
 
60
        <tar destfile="${dist}/gryle.tar">
 
61
            <tarfileset dir="." prefix="${distprefix}">
 
62
                <include name="COPYING"/>
 
63
                                <include name="TODO"/>
 
64
                        </tarfileset>
 
65
                        <tarfileset dir="contrib" prefix="${distprefix}">
 
66
                                <include name="gryle.bat"/>
 
67
                                <include name="gryle"/>
 
68
                        </tarfileset>
 
69
                    <tarfileset dir="${dist}" prefix="${distprefix}">
 
70
                    <include name="*.jar"/>
 
71
                </tarfileset>
 
72
                </tar>
 
73
                <gzip src="${dist}/gryle.tar" destfile="${dist}/${distprefix}.tar.gz"/>
 
74
                <delete file="${dist}/gryle.tar"/>
 
75
                <delete dir="${bin}"/>
49
76
        </target>
50
77
        
51
 
        
52
78
</project>