-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
72 lines (62 loc) · 2.06 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
<?xml version="1.0"?>
<project name="de.learn2prog.struktor" default="compile" basedir=".">
<taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="lib/java-cup-11a.jar"/>
<taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="lib/JFlex.jar"/>
<property name="src" value="src" location="src"/>
<property name="target" value="target" location="target"/>
<property name="build" value="build"/>
<property name="parserdir" value="parser" location="parser"/>
<!-- Avoid missing JAVA_HOME in eclipse -->
<target name="configure.eclipse" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<echo message="Configuring compiler for Eclipse..."/>
</target>
<target name="init" depends="configure.eclipse">
<mkdir dir="${build}"/>
</target>
<target name="LexerBuild" depends="init" description="Builds the ProcLexer">
<jflex
file="${parserdir}/processor.lex"
destdir="${target}"
verbose="true"
/>
<jflex
file="${parserdir}/loader.lex"
destdir="${target}"
/>
</target>
<target name="ParserBuild" depends="init" description="Builds the LoadParser">
<cup srcfile="${parserdir}/loadParser.cup"
parser="LoadParser"
symbols = "Lsym"
destdir="${target}"
/>
<cup srcfile="${parserdir}/procParser.cup"
parser="ProcParser"
symbols = "Psym"
destdir="${target}"
/>
</target>
<target name="compile" depends="init,ParserBuild,LexerBuild">
<!-- Compile the java code -->
<javac destdir="${build}">
<src path="${src}"/>
<src path="${target}"/>
</javac>
<copy file="${src}/struktor/Logo.jpg" todir="${build}/struktor"/>
</target>
<target name="clean" description="Removes previous build">
<delete verbose="true">
<fileset dir="${build}"/>
</delete>
</target>
<target name="jar" depends="compile">
<jar destfile="struktor.jar" basedir="${build}" >
</jar>
</target>
<target name="runApplet" depends="jar">
<exec dir="." executable="appletviewer">
<arg value="struktor.html" />
</exec>
</target>
</project>