forked from AbFab3D/AbFab3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_common.xml
executable file
·65 lines (58 loc) · 2.35 KB
/
build_common.xml
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
<?xml version="1.0" standalone="yes"?>
<project name="Common build file" default="all" basedir="" >
<macrodef name="compilejava">
<attribute name="srcdir" default="${src.dir}/java" />
<attribute name="libdir" default="${lib.dir}" />
<attribute name="classpath" default="${classes.dir}" />
<attribute name="package"/>
<attribute name="extra" default="" />
<attribute name="jars" default="none" />
<attribute name="target" default="1.6" />
<attribute name="source" default="1.6" />
<attribute name="include" default="*.java" />
<attribute name="destdir" default="${classes.dir}" />
<element name="exclude-elements" optional="true" />
<element name="classpath-elements" optional="true" />
<sequential>
<echo message="Compiling @{package}" />
<javac listfiles="false" sourcepath="" destdir="@{destdir}" debug="true" srcdir="@{srcdir}"
includeAntRuntime="false" source="@{source}" target="@{target}">
<include name="@{package}/@{include}" />
<exclude-elements />
<classpath>
<pathelement path="@{classpath}" />
<classpath-elements />
<fileset dir="@{libdir}" includes="@{jars}">
</fileset>
</classpath>
</javac>
</sequential>
</macrodef>
<macrodef name="extras">
<attribute name="srcdir" default="${src.dir}" />
<attribute name="package"/>
<attribute name="excludes" default=""/>
<attribute name="includes" default="" />
<attribute name="todir" default="${classes.dir}/@{package}" />
<sequential>
<!-- <echo message="Copying Extras @{package} to: ${classes.dir}/@{package}" /> -->
<copy todir="@{todir}" includeEmptyDirs="false">
<fileset dir="@{srcdir}/@{package}" includes="@{includes}" excludes="Makefile @{excludes}">
<depth max="0" />
</fileset>
</copy>
</sequential>
</macrodef>
<macrodef name="createjar" >
<attribute name="name" />
<attribute name="version" />
<attribute name="includes" />
<attribute name="excludes" default="" />
<attribute name="manifest" default="" />
<sequential>
<jar destfile="${jar.dir}/@{name}_@{version}.jar" manifest="${manifest.dir}/@{manifest}" >
<fileset dir="${classes.dir}" includes="@{includes}" excludes="@{excludes}" />
</jar>
</sequential>
</macrodef>
</project>