source: CIVL/build.xml

main
Last change on this file was 58d9e85, checked in by Alex Wilton <awilton@…>, 3 years ago

Made compile the default target of the root build.xml

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5775 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 4.6 KB
RevLine 
[58d9e85]1<project name="CIVL" basedir="." default="compile"
[d5cb19a]2 xmlns:jacoco="antlib:org.jacoco.ant">
3
[ea777aa]4 <import file="common.xml" />
[d5cb19a]5
6 <!-- Compile -->
7 <target name="compile">
8 <ant dir="${mc.dir}" target="compile" inheritAll="false" />
9 </target>
10
11 <!-- Test -->
12 <target name="test">
13 <ant dir="${sarl.dir}" target="test" inheritAll="false" />
14 <ant dir="${abc.dir}" target="test" inheritAll="false" />
15 <ant dir="${gmc.dir}" target="test" inheritAll="false" />
16 <ant dir="${mc.dir}" target="test" inheritAll="false" />
17 </target>
18
19 <!-- Javadocs -->
20 <target name="javadoc">
21 <ant dir="${sarl.dir}" target="javadoc" inheritAll="false" />
22 <ant dir="${abc.dir}" target="javadoc" inheritAll="false" />
23 <ant dir="${gmc.dir}" target="javadoc" inheritAll="false" />
24 <ant dir="${mc.dir}" target="javadoc" inheritAll="false" />
25 </target>
26
27 <!-- Clean -->
[cb4d4f4]28 <target name="clean" depends="clean-default">
[d5cb19a]29 <ant dir="${sarl.dir}" target="clean" inheritAll="false" />
30 <ant dir="${abc.dir}" target="clean" inheritAll="false" />
31 <ant dir="${gmc.dir}" target="clean" inheritAll="false" />
32 <ant dir="${mc.dir}" target="clean" inheritAll="false" />
33 <delete dir="${lib.dir}" />
34 <delete dir="${app.dir}" />
35 </target>
36
37
38 <!-- Single non-modular JAR creation -->
39
40 <!-- everything in one JAR, including all dependencies -->
41
42 <target name="check.uptodate.complete.jar">
43 <uptodate property="uptodate.complete.jar"
44 targetfile="${civl.complete.jar}" >
45 <srcfiles dir="${sarl.bin.dir}" />
46 <srcfiles dir="${gmc.bin.dir}" />
47 <srcfiles dir="${abc.bin.dir}" />
48 <srcfiles dir="${mc.bin.dir}" />
49 <srcfiles file="${antlr3.runtime.jar}" />
50 <srcfiles file="${antlr4.runtime.jar}" />
51 </uptodate>
52 </target>
53
54 <target name="civl.complete.jar"
55 depends="compile,check.uptodate.complete.jar"
56 unless="uptodate.complete.jar"
57 description="Create single non-modular JAR" >
58 <jar destfile="${civl.complete.jar}">
[d5bee64]59 <fileset dir="${root.dir}" includes="include/"/>
[d5cb19a]60 <fileset dir="${sarl.bin.dir}" excludes="module-info.class" />
61 <fileset dir="${gmc.bin.dir}" excludes="module-info.class" />
62 <fileset dir="${abc.bin.dir}" excludes="module-info.class" />
63 <fileset dir="${mc.bin.dir}" excludes="module-info.class" />
64 <zipfileset includes="**/*.class" excludes="module-info.class"
65 src="${antlr3.runtime.jar}" />
66 <zipfileset includes="**/*.class" excludes="module-info.class"
67 src="${antlr4.runtime.jar}" />
68 <manifest>
69 <attribute name="Build-By" value="${user.name}" />
70 <attribute name="Main-Class" value="${main.class}" />
71 </manifest>
72 </jar>
73 </target>
74
75
76 <!-- Modular JAR creation -->
77
78 <!-- These modular jars contain only the code in the module, not
79 code used by that code. So, e.g., ANTLR runtime code is not
80 included. -->
81
82 <target name="jar.sarl" depends="compile">
83 <mkdir dir="${lib.dir}" />
84 <jar destfile="${lib.dir}/${mod.sarl}.jar"
85 basedir="${sarl.bin.dir}" />
86 </target>
87
88 <target name="jar.gmc" depends="compile">
89 <mkdir dir="${lib.dir}" />
90 <jar destfile="${lib.dir}/${mod.gmc}.jar"
91 basedir="${gmc.bin.dir}" />
92 </target>
93
94 <target name="jar.abc" depends="compile">
95 <mkdir dir="${lib.dir}" />
96 <jar destfile="${lib.dir}/${mod.abc}.jar"
97 basedir="${abc.bin.dir}" />
98 </target>
99
100 <target name="jar.mc" depends="compile">
101 <mkdir dir="${lib.dir}" />
102 <jar destfile="${lib.dir}/${mod.mc}.jar"
103 basedir="${mc.bin.dir}" />
104 </target>
105
106 <target name="lib" depends="jar.sarl,jar.gmc,jar.abc,jar.mc">
107 <copy file="${antlr3.runtime.mod.jar.path}" todir="${lib.dir}" />
108 <copy file="${antlr4.runtime.mod.jar.path}" todir="${lib.dir}" />
109 </target>
110
111 <!-- Stand-alone app with custom JVM -->
112
[cb4d4f4]113 <!-- for reasons I don't understand, the app doesn't get updated
114 even after it and the lib are deleted and ant app is re-run.
115 Where is it getting the old code from? Is it cached somewhere?
116 -->
117
118 <target name="app" depends="lib">
119 <link destdir="${app.dir}" modulepath="${lib.dir}"
120 launchers="civl=${mod.mc}/${main.class}" >
121 <module name="${mod.sarl}" />
122 <module name="${mod.gmc}" />
123 <module name="${mod.abc}" />
124 <module name="${mod.mc}" />
125 <module name="${mod.antlr3}" />
126 <module name="${mod.antlr4}" />
127 <module name="java.base" />
128 </link>
129 </target>
130
[d5cb19a]131 <target name="run" depends="app" description="Run the civl app">
132 <exec executable="${app.dir}/bin/civl" />
133 </target>
134
[9c9ec80]135 <target name="all" depends="civl.complete.jar,app,test,javadoc" />
[d5cb19a]136
137</project>
Note: See TracBrowser for help on using the repository browser.