File: build.xml

package info (click to toggle)
airport-utils 2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,048 kB
  • sloc: java: 30,844; xml: 571; sh: 563; makefile: 10
file content (111 lines) | stat: -rw-r--r-- 3,479 bytes parent folder | download | duplicates (5)
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
<?xml version="1.0" ?>

<!--
ANT build.xml file for HostMonitor

 -> ant jar to build a jarfile (HostMonitor.jar)
 -> ant native to build a native, dynamically linked executable (airport-hostmonitor)
 -> ant clean or ant distclean to clean up after the builds

Copyright (C) 2006 Julien BLACHE <jblache@debian.org>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2 as
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-->

<project name="HostMonitor" default="post" basedir=".">

  <property name="mainclassname" value="airporthostmon.HostMonitor"/>
  <property name="builddir" value="build" />
  <property name="executable" value="airport-hostmonitor" />
  <property name="jarname" value="HostMonitor.jar" />

  <target name="common-init">
  </target>

  <target name="jar-init" depends="common-init">
    <mkdir dir="${builddir}" />
  </target>

  <target name="native-init" depends="common-init">
  </target>

  <target name="jar-compile" depends="jar-init">
    <javac srcdir="." destdir="${builddir}" debug="off" optimize="on" nowarn="on" />

  </target>

  <target name="jar" depends="jar-compile">
    <jar jarfile="${jarname}" basedir="${builddir}" includes="**">

      <manifest>
	<attribute name="Main-Class" value="${mainclassname}" />
      </manifest>
    </jar>
  </target>

  <target name="native-compile" depends="native-init">
    <apply executable="gcj" parallel="false" relative="true" failonerror="true">
      <arg value="-fjni" />
      <arg value="-g0" />
      <arg value="-c" />
      <arg value="-o" />
      <targetfile />
      <srcfile />
      <fileset dir="." includes="**/*.java" />
      <mapper type="glob" from="*.java" to="*.o" />
    </apply>
  </target>

  <target name="native" depends="native-compile, objects-up-to-date" unless="objects_up_to_date">
    <dependset>
      <srcfileset dir="." includes="**/*.o" />
      <targetfilelist dir="." files="${executable}" />
    </dependset>    

    <apply executable="gcj" dest="." parallel="true" skipemptyfilesets="true">
      <arg line="--main=${mainclassname}" />
      <arg value="-o" />
      <targetfile />
      <srcfile />
      <fileset dir="." includes="**/*.o" />
      <mapper type="merge" to="${executable}" />
    </apply>

    <apply executable="strip">
      <fileset dir="." includes="${executable}" />
    </apply>
  </target>

  <target name="objects-up-to-date">
    <uptodate property="objects_up_to_date" targetfile="${executable}">
      <srcfiles dir= "." includes="**/*.o" />
    </uptodate>
  </target>

  <target name="clean">
    <delete quiet="true" dir="${builddir}" />
    <delete quiet="true" file="${jarname}" />
    <delete quiet="true" file="${executable}" />
    <delete>
      <fileset dir="." includes="**/*.o" />
    </delete>
  </target>

  <target name="distclean" depends="clean">
    <delete>
      <fileset dir="." includes="**/*~" defaultexcludes="no" />
    </delete>
  </target>

</project>