-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
87 lines (73 loc) · 2.82 KB
/
build.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project
name="Create Megasquirt firmwares JAR for MSLogger"
default="build_firmwares_jar" >
<property name="jar.file" value="firmwares.jar" />
<property name="output.file.location" value="../MSLoggerBase/libs" />
<property name="output.file" value="${output.file.location}/${jar.file}" />
<property name="mslogger.jar.location" value="../MSLoggerBase/libs/${jar.file}" />
<target name="compile_normaliser" depends=".compile_support" >
<mkdir dir="bin" />
<javac
classpath="lib/commons-lang3-3.0.1.jar:common_bin"
destdir="bin"
includeantruntime="false"
srcdir="src" />
</target>
<target name="generate_firmware_java" depends="compile_normaliser" >
<java classname="uk.org.smithfamily.utils.normaliser.Normaliser" >
<arg value="${ini_path}" />
<arg value="." />
<classpath>
<pathelement location="common_bin" />
<pathelement location="bin" />
<pathelement location="lib/commons-lang3-3.0.1.jar" />
</classpath>
</java>
</target>
<target name=".compile_support" >
<mkdir dir="common_bin" />
<javac
destdir="common_bin"
includeantruntime="false"
srcdir="common_src" />
</target>
<target name=".compile_firmware" depends="generate_firmware_java,.compile_support">
<mkdir dir="gen_bin" />
<javac
classpath="common_bin"
debug="on"
destdir="gen_bin"
fork="true"
includeantruntime="false"
memoryinitialsize="256m"
memorymaximumsize="512m"
srcdir="gen_src" />
</target>
<target
name=".construct_firmware_jar"
depends="clean,.compile_firmware" >
<delete file="${mslogger.jar.location}" />
<jar destfile="${mslogger.jar.location}" >
<fileset dir="gen_bin" />
<fileset dir="gen_src" />
<fileset dir="common_bin" />
<fileset dir="common_src" />
</jar>
</target>
<target name="clean" >
<delete file="${output.file}" />
<delete dir="gen_src" />
<delete dir="gen_bin" />
<delete dir="common_bin" />
<delete dir="bin" />
</target>
<target name="build_firmwares_jar" description="Build ${jar.location} containing the full set of firmwares">
<property name="ini_path" value="inis/generationList.txt"/>
<antcall target=".construct_firmware_jar" />
</target>
<target name="build_test_firmwares_jar" description="Build ${jar.location} containing the test set of firmwares">
<property name="ini_path" value="inis/test.txt"/>
<antcall target=".construct_firmware_jar" />
</target>
</project>