Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/debugtools/DDR_VM/generate-ddr.xml
5986 views
1
<!--
2
Copyright (c) 2017, 2018 IBM Corp. and others
3
4
This program and the accompanying materials are made available under
5
the terms of the Eclipse Public License 2.0 which accompanies this
6
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
or the Apache License, Version 2.0 which accompanies this distribution and
8
is available at https://www.apache.org/licenses/LICENSE-2.0.
9
10
This Source Code may also be made available under the following
11
Secondary Licenses when the conditions for such availability set
12
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
General Public License, version 2 with the GNU Classpath
14
Exception [1] and GNU General Public License, version 2 with the
15
OpenJDK Assembly Exception [2].
16
17
[1] https://www.gnu.org/software/classpath/license.html
18
[2] http://openjdk.java.net/legal/assembly-exception.html
19
20
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
-->
22
23
<project name="generate-ddr" default="generate-all" basedir=".">
24
25
<target name="-init-for-eclipse" if="eclipse.running">
26
<eclipse.convertPath property="DDR_Artifacts.loc" resourcepath="/DDR_Artifacts" />
27
<eclipse.convertPath property="DDR_VM.loc" resourcepath="/DDR_VM" />
28
</target>
29
30
<target name="-init-no-eclipse" unless="eclipse.running">
31
<fail message="DDR_Artifacts.loc must be defined." unless="DDR_Artifacts.loc" />
32
<fail message="DDR_VM.loc must be defined." unless="DDR_VM.loc" />
33
34
<!-- Refresh does nothing when not running under eclipse. -->
35
<macrodef name="eclipse.refreshLocal">
36
<attribute name="resource" />
37
<sequential />
38
</macrodef>
39
</target>
40
41
<target name="-init" depends="-init-for-eclipse, -init-no-eclipse">
42
<path id="tools.class.path">
43
<pathelement path="${DDR_VM.loc}/bin" />
44
</path>
45
</target>
46
47
<target name="generate-all" depends="-init">
48
<generate-package version="29" />
49
</target>
50
51
<macrodef name="generate-package">
52
<attribute name="version" />
53
<attribute name="superset" default="superset.ibuild.dat" />
54
<sequential>
55
<generate-structure version="@{version}" superset="@{superset}" />
56
57
<!--
58
Refresh now so eclipse can begin compiling the structure stubs which
59
are required by the pointer types we're about to generate.
60
-->
61
<eclipse.refreshLocal resource="/DDR_VM" />
62
63
<generate-pointers version="@{version}" superset="@{superset}" />
64
65
<!-- Refresh again so eclipse can see the final content. -->
66
<eclipse.refreshLocal resource="/DDR_VM" />
67
</sequential>
68
</macrodef>
69
70
<macrodef name="generate-pointers">
71
<attribute name="version" />
72
<attribute name="superset" />
73
<sequential>
74
<java classname="com.ibm.j9ddr.tools.PointerGenerator" classpathref="tools.class.path" fork="true">
75
<jvmarg value="-Dfile.encoding=UTF-8" />
76
77
<arg value="-o" />
78
<arg value="${DDR_VM.loc}/src" />
79
80
<arg value="-p" />
81
<arg value="com.ibm.j9ddr.vm@{version}.pointer.generated" />
82
83
<arg value="-f" />
84
<arg value="${DDR_Artifacts.loc}/supersets/@{version}/" />
85
86
<arg value="-s" />
87
<arg value="@{superset}" />
88
89
<arg value="-v" />
90
<arg value="@{version}" />
91
92
<arg value="-l" />
93
<arg value="true" />
94
</java>
95
</sequential>
96
</macrodef>
97
98
<macrodef name="generate-structure">
99
<attribute name="version" />
100
<attribute name="superset" />
101
<sequential>
102
<java classname="com.ibm.j9ddr.tools.StructureStubGenerator" classpathref="tools.class.path" fork="true">
103
<jvmarg value="-Dfile.encoding=UTF-8" />
104
105
<arg value="-o" />
106
<arg value="${DDR_VM.loc}/src" />
107
108
<arg value="-p" />
109
<arg value="com.ibm.j9ddr.vm@{version}.structure" />
110
111
<arg value="-f" />
112
<arg value="${DDR_Artifacts.loc}/supersets/@{version}/" />
113
114
<arg value="-s" />
115
<arg value="@{superset}" />
116
117
<arg value="-l" />
118
<arg value="true" />
119
</java>
120
</sequential>
121
</macrodef>
122
123
</project>
124
125