-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
77 lines (68 loc) · 2.06 KB
/
build.xml
File metadata and controls
77 lines (68 loc) · 2.06 KB
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
<project default="master-build">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="src/Lang/Gen/lib/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
<target name="init-build-system">
<echo message="init-build-system" />
<mkdir dir="src/Lang/Gen/log" />
</target>
<target name="parser-build">
<echo message="start parser-build" />
<foreach target="parser-build-file" param="file">
<path>
<fileset dir="src/Lang/Gen" casesensitive="yes">
<include name="**/*.y" />
</fileset>
</path>
</foreach>
<echo message="finish parser-build" />
</target>
<target name="parser-build-file">
<basename property="filename" file="${file}" suffix=".y" />
<echo message="generate parser for: ${filename}" />
<exec executable="happy">
<arg value="-isrc/Lang/Gen/log/${filename}.log" />
<arg value="--outfile=src/Lang/Gen/${filename}.hs" />
<arg value="${file}" />
</exec>
</target>
<target name="lexer-build">
<echo message="start lexer-build" />
<foreach target="lexer-build-file" param="file">
<path>
<fileset dir="src/Lang/Gen" casesensitive="yes">
<include name="**/*.x" />
</fileset>
</path>
</foreach>
<echo message="finish lexer-build" />
</target>
<target name="lexer-build-file">
<basename property="filename" file="${file}" suffix=".x" />
<echo message="generate lexer for: ${filename}" />
<exec executable="alex">
<arg value="--outfile=src/Lang/Gen/Lexer.hs" />
<arg value="${file}" />
</exec>
</target>
<target name="executable-build">
<echo message="start executable-build" />
<exec executable="cabal">
<arg value="install" />
<arg value="--force-reinstalls" />
<arg value="--only-dependencies" />
</exec>
<exec executable="cabal">
<arg value="configure" />
</exec>
<exec executable="cabal">
<arg value="build" />
</exec>
<echo message="end executable-build" />
</target>
<target name="master-build" depends="init-build-system, lexer-build, parser-build, executable-build">
<echo message="master-build" />
</target>
</project>