Mercurial > hg > truffle
annotate make/windows/build.make @ 1913:3b2dea75431e
6984311: JSR 292 needs optional bootstrap method parameters
Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands.
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 30 Oct 2010 13:08:23 -0700 |
parents | d5d065957597 |
children | 34bd82eba3bb |
rev | line source |
---|---|
0 | 1 # |
1783 | 2 # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | |
5 # This code is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License version 2 only, as | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1328
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1328
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1328
diff
changeset
|
21 # questions. |
1783 | 22 # |
0 | 23 # |
24 | |
25 # Note: this makefile is invoked both from build.bat and from the J2SE | |
26 # control workspace in exactly the same manner; the required | |
27 # environment variables (Variant, WorkSpace, BootStrapDir, BuildUser, HOTSPOT_BUILD_VERSION) | |
28 # are passed in as command line arguments. | |
29 | |
1328
39e409a664b3
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
1322
diff
changeset
|
30 # Note: Running nmake or build.bat from the Windows command shell requires |
39e409a664b3
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
1322
diff
changeset
|
31 # that "sh" be accessible on the PATH. An MKS install does this. |
39e409a664b3
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
1322
diff
changeset
|
32 |
0 | 33 # SA components are built if BUILD_WIN_SA=1 is specified. |
34 # See notes in README. This produces files: | |
35 # 1. sa-jdi.jar - This is built before building jvm.dll | |
36 # 2. sawindbg[_g].dll - Native library for SA - This is built after jvm.dll | |
37 # - Also, .lib, .map, .pdb. | |
38 # | |
39 # Please refer to ./makefiles/sa.make | |
40 | |
41 # If we haven't set an ARCH yet use x86 | |
42 # create.bat and build.bat will set it, if used. | |
43 !ifndef ARCH | |
44 ARCH=x86 | |
45 !endif | |
46 | |
47 | |
48 # Must be one of these values (if value comes in from env, can't trust it) | |
49 !if "$(ARCH)" != "x86" | |
50 !if "$(ARCH)" != "ia64" | |
51 ARCH=x86 | |
52 !endif | |
53 !endif | |
54 | |
55 # At this point we should be certain that ARCH has a definition | |
56 # now determine the BUILDARCH | |
57 # | |
58 | |
59 # the default BUILDARCH | |
60 BUILDARCH=i486 | |
61 | |
62 # Allow control workspace to force Itanium or AMD64 builds with LP64 | |
63 ARCH_TEXT= | |
64 !ifdef LP64 | |
65 !if "$(LP64)" == "1" | |
66 ARCH_TEXT=64-Bit | |
67 !if "$(ARCH)" == "x86" | |
68 BUILDARCH=amd64 | |
69 !else | |
70 BUILDARCH=ia64 | |
71 !endif | |
72 !endif | |
73 !endif | |
74 | |
75 !if "$(BUILDARCH)" != "ia64" | |
76 !ifndef CC_INTERP | |
77 FORCE_TIERED=1 | |
78 !endif | |
79 !endif | |
80 | |
81 !if "$(BUILDARCH)" == "amd64" | |
82 Platform_arch=x86 | |
83 Platform_arch_model=x86_64 | |
84 !endif | |
85 !if "$(BUILDARCH)" == "i486" | |
86 Platform_arch=x86 | |
87 Platform_arch_model=x86_32 | |
88 !endif | |
89 | |
90 # Supply these from the command line or the environment | |
91 # It doesn't make sense to default this one | |
92 Variant= | |
93 # It doesn't make sense to default this one | |
94 WorkSpace= | |
95 | |
96 variantDir = windows_$(BUILDARCH)_$(Variant) | |
97 | |
98 realVariant=$(Variant) | |
99 VARIANT_TEXT=Core | |
100 !if "$(Variant)" == "compiler1" | |
101 VARIANT_TEXT=Client | |
102 !elseif "$(Variant)" == "compiler2" | |
103 !ifdef FORCE_TIERED | |
104 VARIANT_TEXT=Server | |
105 realVariant=tiered | |
106 !else | |
107 VARIANT_TEXT=Server | |
108 !endif | |
109 !elseif "$(Variant)" == "tiered" | |
110 VARIANT_TEXT=Tiered | |
111 !elseif "$(Variant)" == "kernel" | |
112 VARIANT_TEXT=Kernel | |
113 !endif | |
114 | |
115 ######################################################################### | |
116 # Parameters for VERSIONINFO resource for jvm[_g].dll. | |
117 # These can be overridden via the nmake.exe command line. | |
118 # They are overridden by RE during the control builds. | |
119 # | |
120 !include "$(WorkSpace)/make/hotspot_version" | |
121 | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
122 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro |
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
123 # or make/hotspot_distro. |
0 | 124 !ifndef HOTSPOT_VM_DISTRO |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
125 !if exists($(WorkSpace)\src\closed) |
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
126 !include $(WorkSpace)\make\hotspot_distro |
0 | 127 !else |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
128 !include $(WorkSpace)\make\openjdk_distro |
0 | 129 !endif |
130 !endif | |
131 | |
132 # Following the Web Start / Plugin model here.... | |
133 # We can have update versions like "01a", but Windows requires | |
134 # we use only integers in the file version field. So: | |
135 # JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION | |
1783 | 136 # |
0 | 137 JDK_UPDATE_VER=0 |
138 JDK_BUILD_NUMBER=0 | |
139 | |
140 HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM | |
141 | |
142 # JDK ProductVersion: | |
143 # 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz | |
144 # Thus, 1.5.0_10-b04 will be 5.0.100.4 | |
145 # 1.6.0-b01 will be 6.0.0.1 | |
146 # 1.6.0_01a-b02 will be 6.0.11.2 | |
147 # | |
148 # JDK_* variables are defined in make/hotspot_version or on command line | |
1783 | 149 # |
0 | 150 JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER) |
151 JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER) | |
152 !if "$(JRE_RELEASE_VERSION)" == "" | |
153 JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER) | |
154 !else | |
155 JRE_RELEASE_VER=$(JRE_RELEASE_VERSION) | |
156 !endif | |
157 !if "$(JDK_MKTG_VERSION)" == "" | |
158 JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER) | |
159 !endif | |
160 | |
161 # Hotspot Express VM FileVersion: | |
162 # 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers). | |
1783 | 163 # |
0 | 164 # HS_* variables are defined in make/hotspot_version |
165 # | |
166 HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER) | |
167 HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER) | |
168 | |
169 !if "$(HOTSPOT_RELEASE_VERSION)" == "" | |
170 HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER) | |
171 !endif | |
172 | |
173 !if "$(HOTSPOT_BUILD_VERSION)" == "" | |
174 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) | |
175 !else | |
176 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION) | |
177 !endif | |
178 | |
179 # End VERSIONINFO parameters | |
180 | |
181 | |
182 # We don't support SA on ia64, and we can't | |
1783 | 183 # build it if we are using a version of Vis Studio |
0 | 184 # older than .Net 2003. |
185 # SA_INCLUDE and SA_LIB are hold-overs from a previous | |
186 # implementation in which we could build SA using | |
187 # Debugging Tools For Windows, in which the .h/.lib files | |
188 # and the .dlls are in different places than | |
189 # they are for Vis Studio .Net 2003. | |
190 # If that code ever needs to be resurrected, these vars | |
191 # can be set here. They are used in makefiles/sa.make. | |
192 | |
193 checkSA:: | |
194 | |
195 !if "$(BUILD_WIN_SA)" != "1" | |
196 checkSA:: | |
197 @echo Not building SA: BUILD_WIN_SA != 1 | |
198 | |
199 !elseif "$(ARCH)" == "ia64" | |
200 BUILD_WIN_SA = 0 | |
201 checkSA:: | |
202 @echo Not building SA: ARCH = ia64 | |
203 | |
204 !endif # ! "$(BUILD_WIN_SA)" != "1" | |
205 | |
206 ######################################################################### | |
207 | |
208 # With the jvm_g.dll now being named jvm.dll, we can't build both and place | |
209 # the dll's in the same directory, so we only build one at a time, | |
210 # re-directing the output to different output directories (done by user | |
211 # of this makefile). | |
212 # | |
213 defaultTarget: product | |
214 | |
215 # The product or release build is an optimized build, and is the default | |
216 | |
217 # note that since all the build targets depend on local.make that BUILDARCH | |
218 # and Platform_arch and Platform_arch_model will get set in local.make | |
219 # and there is no need to pass them thru here on the command line | |
220 # | |
221 product release optimized: checks $(variantDir) $(variantDir)\local.make sanity | |
222 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
223 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product ARCH=$(ARCH) |
0 | 224 |
225 # The debug or jvmg (all the same thing) is an optional build | |
226 debug jvmg: checks $(variantDir) $(variantDir)\local.make sanity | |
227 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
228 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=debug ARCH=$(ARCH) |
0 | 229 fastdebug: checks $(variantDir) $(variantDir)\local.make sanity |
230 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
231 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH) |
0 | 232 |
233 develop: checks $(variantDir) $(variantDir)\local.make sanity | |
234 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
235 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH) |
0 | 236 |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
237 # target to create just the directory structure |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
238 tree: checks $(variantDir) $(variantDir)\local.make sanity |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
239 mkdir $(variantDir)\product |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
240 mkdir $(variantDir)\debug |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
241 mkdir $(variantDir)\fastdebug |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
242 |
0 | 243 sanity: |
244 @ echo; | |
245 @ cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
246 @ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\sanity.make |
0 | 247 @ cd .. |
248 @ echo; | |
249 | |
250 clean: checkVariant | |
251 - rm -r -f $(variantDir) | |
252 | |
253 $(variantDir): | |
254 mkdir $(variantDir) | |
255 | |
256 $(variantDir)\local.make: checks | |
257 @ echo # Generated file > $@ | |
258 @ echo Variant=$(realVariant) >> $@ | |
259 @ echo WorkSpace=$(WorkSpace) >> $@ | |
260 @ echo BootStrapDir=$(BootStrapDir) >> $@ | |
261 @ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@ | |
262 @ echo HS_VER=$(HS_VER) >> $@ | |
263 @ echo HS_DOTVER=$(HS_DOTVER) >> $@ | |
264 @ echo HS_COMPANY=$(COMPANY_NAME) >> $@ | |
265 @ echo HS_FILEDESC=$(HS_FILEDESC) >> $@ | |
266 @ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ | |
267 @ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@ | |
268 @ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@ | |
269 @ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@ | |
270 @ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@ | |
271 @ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@ | |
272 @ echo SA_INCLUDE=$(SA_INCLUDE) >> $@ | |
273 @ echo SA_LIB=$(SA_LIB) >> $@ | |
274 @ echo JDK_VER=$(JDK_VER) >> $@ | |
275 @ echo JDK_DOTVER=$(JDK_DOTVER) >> $@ | |
276 @ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@ | |
277 @ echo BUILDARCH=$(BUILDARCH) >> $@ | |
278 @ echo Platform_arch=$(Platform_arch) >> $@ | |
279 @ echo Platform_arch_model=$(Platform_arch_model) >> $@ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
280 @ sh $(WorkSpace)/make/windows/get_msc_ver.sh >> $@ |
0 | 281 |
282 checks: checkVariant checkWorkSpace checkSA | |
283 | |
284 checkVariant: | |
285 @ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false | |
286 @ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \ | |
287 echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false | |
288 | |
289 checkWorkSpace: | |
290 @ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false | |
291 | |
292 checkBuildID: | |
293 @ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false |