aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
blob: f5c07ff9b21b22f353428781a1605299c810168f (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
<?xml version="1.0"?>

<!-- ======================================================================= -->
<!-- JBoss build file                                                       -->
<!-- ======================================================================= -->

<project name="javassist" default="jar" basedir=".">

  <property name="dist-version" value="javassist-2.7"/>

  <property environment="env"/>
  <property name="src.dir" value="${basedir}/src/main"/>
  <property name="build.dir" value="${basedir}/build"/>
  <property name="build.classes.dir" value="${build.dir}/classes"/>

  <!-- Build classpath -->
  <path id="classpath">
    <pathelement location="${build.classes.dir}"/>
  </path>

  <property name="build.classpath" refid="classpath"/>

  <!-- =================================================================== -->
  <!-- Prepares the build directory                                        -->
  <!-- =================================================================== -->
  <target name="prepare" >
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${build.classes.dir}"/>
  </target>

  <!-- =================================================================== -->
  <!-- Compiles the source code                                            -->
  <!-- =================================================================== -->
  <target name="compile" depends="prepare">
    <javac srcdir="${src.dir}"
           destdir="${build.classes.dir}"
           debug="on"
           deprecation="on"
           optimize="off"
           includes="**">
            <classpath refid="classpath"/>
    </javac>
  </target>

  <target name="sample" depends="compile">
    <javac srcdir="${basedir}"
           destdir="${build.classes.dir}"
           debug="on"
           deprecation="on"
           optimize="off"
           includes="sample/**">
            <classpath refid="classpath"/>
    </javac>
    <copy file="sample/vector/Test.j"
          todir="${build.classes.dir}/sample/vector"/>
    <copy todir="${build.classes.dir}/sample/evolve">
      <fileset dir="sample/evolve"/>
    </copy>
    <echo>To run the sample programs, change the current directory 
to ${build.classes.dir}.</echo>
  </target>

  <target name="jar" depends="compile">
    <jar jarfile="javassist.jar" manifest="${src.dir}/META-INF/MANIFEST.MF">
      <fileset dir="${build.classes.dir}">
      	  <include name="**/*.class"/>
      </fileset>
     </jar>
  </target>

  <target name="javadocs">
    <javadoc packagenames="javassist.*"
           excludepackagenames="javassist.compiler.*,javassist.convert.*"
           sourcepath="src/main"
           defaultexcludes="yes"
           destdir="html"
           author="true"
           version="true"
           use="true"
           Locale="en_US"
           charset="iso-8859-1"
           Public="true"
           nohelp="true"
           windowtitle="Javassist API">
      <doctitle><![CDATA[<h1>Javassist</h1>]]></doctitle>
      <bottom><![CDATA[<i>Javassist, a Java-bytecode translator toolkit. 
Copyright (C) 1999-2004 Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
    </javadoc>
  </target>

  <target name="dist" depends="jar,javadocs">
    <delete file="${dist-version}.zip"/>
    <zip zipfile="${dist-version}.zip">
       <zipfileset dir="${basedir}" prefix="${dist-version}">
          <include name="**"/>
          <exclude name="build/**"/>
          <exclude name="local/**"/>
          <exclude name="${dist-version}.zip"/>
       </zipfileset>
    </zip>
  </target>

  <target name="clean">
    <delete dir="build"/>
    <delete dir="html"/>
    <delete file="javassist.jar"/>
    <delete file="${dist-version}.zip"/>
  </target>
</project>