-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.main.xml
104 lines (89 loc) · 5.27 KB
/
build.main.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="UTF-8"?>
<project name="MetaC" default="all">
<!-- Key input modules -->
<property name="sdfmodule" value="MetaC"/>
<property name="metasdfmodule" value="Stratego-MetaC"/>
<property name="esvmodule" value="MetaC"/>
<property name="strmodule" value="metac"/>
<!-- Project directories -->
<property name="trans" location="trans"/>
<property name="src-gen" location="editor/java"/>
<property name="syntax" location="syntax"/>
<property name="include" location="include"/>
<property name="lib" location="lib"/>
<property name="build" location="bin"/>
<property name="dist" location="bin/dist"/>
<property name="basec" location="BaseC" />
<property name="statemachine" location="Statemachine" />
<!-- Imports -->
<property name="build.sdf.imports" value="
-I "${basec}"/syntax
-I "${statemachine}"/syntax"/>
<property name="build.stratego.args" value="
--library
-I "${trans}"
-I "${basedir}"
-la stratego-lib -la stratego-sglr -la stratego-gpp -la stratego-xtc -la stratego-aterm -la stratego-parallel"/>
<!-- Optional: external .def and .jar locations
<property name="externaldef" location="syntax/${sdfmodule}.def"/>
<property name="externaljar" value="../lib.jar"/>
<property name="externaljarflags" value="-la org.lib"/>
-->
<!-- Environment configuration for command-line builds -->
<condition property="build.strategoxt.sdf" value="${eclipse.spoofaximp.nativeprefix}" else="">
<isset property="eclipse.spoofaximp.nativeprefix"/>
</condition>
<property name="build.strategoxt.stratego" location="${user.home}/.nix-profile/bin"/>
<!-- used for building inside of Eclipse -->
<import file="build.generated.xml"/>
<!-- Main target -->
<target name="all" depends="link-lib-files, copy-lib-files, spoofaximp.default.ctree" />
<target name="os-detection">
<condition property="isWin">
<os family="windows" />
</condition>
</target>
<target name="copy-lib-files" if="isWin" depends="os-detection">
<!-- Copy NBL libraries, Ant is stupid and cannot link on Windows :( -->
<copy todir="${basedir}/lib/nabl">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/nabl/" includes="**" />
</copy>
<copy todir="${basedir}/lib/index">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/index/" includes="**" />
</copy>
<copy todir="${basedir}/lib/task">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/task/" includes="**" />
</copy>
<copy todir="${basedir}/lib/types">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/types/" includes="**" />
</copy>
<copy todir="${basedir}/lib/analysis">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/analysis/" includes="**" />
</copy>
<copy todir="${basedir}/lib/editor">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/editor/" includes="**" />
</copy>
<copy todir="${basedir}/lib/tmpl">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/tmpl/" includes="**" />
</copy>
<copy todir="${basedir}/lib/relations">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/relations/" includes="**" />
</copy>
<copy todir="${basedir}/lib/properties">
<fileset dir="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/properties/" includes="**" />
</copy>
</target>
<target name="link-lib-files" unless="isWin" depends="os-detection">
<!-- Link to NBL libraries. -->
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/analysis/" link="${basedir}/lib/analysis" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/editor/" link="${basedir}/lib/editor" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/index/" link="${basedir}/lib/index" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/nabl/" link="${basedir}/lib/nabl" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/modelware/" link="${basedir}/lib/modelware" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/properties/" link="${basedir}/lib/properties" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/relations/" link="${basedir}/lib/relations" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/task/" link="${basedir}/lib/task" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/tmpl/" link="${basedir}/lib/tmpl" overwrite="true" />
<symlink resource="${basedir}/../runtime-libraries/org.spoofax.meta.runtime.libraries/types/" link="${basedir}/lib/types" overwrite="true" />
</target>
</project>