author | lana |
Wed, 02 Dec 2015 10:19:14 -0800 | |
changeset 34319 | 9d6dd3c5ca23 |
parent 33957 | 39113ae98993 |
parent 34289 | 2d1821a50263 |
child 37115 | f9c20e87f9ec |
permissions | -rw-r--r-- |
1 | 1 |
# |
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
2 |
# Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
# |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
20 |
# or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
21 |
# questions. |
6453 | 22 |
# |
1 | 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 |
||
5093
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
30 |
# Note: Running nmake or build.bat from the Windows command shell requires |
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
31 |
# that "sh" be accessible on the PATH. An MKS install does this. |
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
32 |
|
1 | 33 |
# If we haven't set an ARCH yet use x86 |
34 |
# create.bat and build.bat will set it, if used. |
|
35 |
!ifndef ARCH |
|
36 |
ARCH=x86 |
|
37 |
!endif |
|
38 |
||
39 |
||
40 |
# Must be one of these values (if value comes in from env, can't trust it) |
|
41 |
!if "$(ARCH)" != "x86" |
|
42 |
!if "$(ARCH)" != "ia64" |
|
43 |
ARCH=x86 |
|
44 |
!endif |
|
45 |
!endif |
|
46 |
||
47 |
# At this point we should be certain that ARCH has a definition |
|
48 |
# now determine the BUILDARCH |
|
49 |
# |
|
50 |
||
51 |
# the default BUILDARCH |
|
52 |
BUILDARCH=i486 |
|
53 |
||
54 |
# Allow control workspace to force Itanium or AMD64 builds with LP64 |
|
55 |
ARCH_TEXT= |
|
56 |
!ifdef LP64 |
|
57 |
!if "$(LP64)" == "1" |
|
58 |
ARCH_TEXT=64-Bit |
|
59 |
!if "$(ARCH)" == "x86" |
|
60 |
BUILDARCH=amd64 |
|
61 |
!else |
|
62 |
BUILDARCH=ia64 |
|
63 |
!endif |
|
64 |
!endif |
|
65 |
!endif |
|
66 |
||
67 |
!if "$(BUILDARCH)" != "ia64" |
|
68 |
!ifndef CC_INTERP |
|
7119 | 69 |
!ifndef FORCE_TIERED |
1 | 70 |
FORCE_TIERED=1 |
71 |
!endif |
|
72 |
!endif |
|
7119 | 73 |
!endif |
1 | 74 |
|
75 |
!if "$(BUILDARCH)" == "amd64" |
|
76 |
Platform_arch=x86 |
|
77 |
Platform_arch_model=x86_64 |
|
78 |
!endif |
|
79 |
!if "$(BUILDARCH)" == "i486" |
|
80 |
Platform_arch=x86 |
|
81 |
Platform_arch_model=x86_32 |
|
82 |
!endif |
|
83 |
||
84 |
# Supply these from the command line or the environment |
|
85 |
# It doesn't make sense to default this one |
|
86 |
Variant= |
|
87 |
# It doesn't make sense to default this one |
|
88 |
WorkSpace= |
|
89 |
||
90 |
variantDir = windows_$(BUILDARCH)_$(Variant) |
|
91 |
||
92 |
realVariant=$(Variant) |
|
93 |
VARIANT_TEXT=Core |
|
94 |
!if "$(Variant)" == "compiler1" |
|
95 |
VARIANT_TEXT=Client |
|
96 |
!elseif "$(Variant)" == "compiler2" |
|
7119 | 97 |
!if "$(FORCE_TIERED)" == "1" |
1 | 98 |
VARIANT_TEXT=Server |
99 |
realVariant=tiered |
|
100 |
!else |
|
101 |
VARIANT_TEXT=Server |
|
102 |
!endif |
|
103 |
!elseif "$(Variant)" == "tiered" |
|
104 |
VARIANT_TEXT=Tiered |
|
105 |
!endif |
|
106 |
||
107 |
######################################################################### |
|
14815
41114a74463a
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
12503
diff
changeset
|
108 |
# Parameters for VERSIONINFO resource for jvm.dll. |
1 | 109 |
# These can be overridden via the nmake.exe command line. |
110 |
# They are overridden by RE during the control builds. |
|
111 |
# |
|
24238 | 112 |
!include "$(WorkSpace)/make/jdk_version" |
1 | 113 |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
114 |
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro |
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
115 |
# or make/hotspot_distro. |
1 | 116 |
!ifndef HOTSPOT_VM_DISTRO |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
117 |
!if exists($(WorkSpace)\src\closed) |
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
118 |
!include $(WorkSpace)\make\hotspot_distro |
1 | 119 |
!else |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
120 |
!include $(WorkSpace)\make\openjdk_distro |
1 | 121 |
!endif |
122 |
!endif |
|
123 |
||
124 |
HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM |
|
125 |
||
126 |
# JDK ProductVersion: |
|
127 |
# 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz |
|
128 |
# Thus, 1.5.0_10-b04 will be 5.0.100.4 |
|
129 |
# 1.6.0-b01 will be 6.0.0.1 |
|
130 |
# 1.6.0_01a-b02 will be 6.0.11.2 |
|
131 |
# |
|
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
132 |
# STANDALONE_JDK_* variables are defined in make/jdk_version or on command line |
6453 | 133 |
# |
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
134 |
!if "$(JDK_VER)" == "" |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
135 |
JDK_VER=$(STANDALONE_JDK_MAJOR_VER),$(STANDALONE_JDK_MINOR_VER),$(STANDALONE_JDK_SECURITY_VER),$(STANDALONE_JDK_PATCH_VER) |
1 | 136 |
!endif |
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
137 |
!if "$(JDK_DOTVER)" == "" |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
138 |
JDK_DOTVER=$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER).$(STANDALONE_JDK_PATCH_VER) |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
139 |
!endif |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
140 |
!if "$(VERSION_SHORT)" == "" |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
141 |
VERSION_SHORT=$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER) |
1 | 142 |
!endif |
143 |
||
24238 | 144 |
HS_VER=$(JDK_VER) |
145 |
HS_DOTVER=$(JDK_DOTVER) |
|
1 | 146 |
|
147 |
!if "$(HOTSPOT_RELEASE_VERSION)" == "" |
|
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
148 |
HOTSPOT_RELEASE_VERSION=$(VERSION_STRING) |
1 | 149 |
!endif |
150 |
||
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
151 |
!if "$(HOTSPOT_VERSION_STRING)" == "" |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
152 |
HOTSPOT_VERSION_STRING=$(HOTSPOT_RELEASE_VERSION) |
1 | 153 |
!endif |
154 |
||
155 |
# End VERSIONINFO parameters |
|
156 |
||
18025 | 157 |
# if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK |
158 |
!ifndef OPENJDK |
|
159 |
!if !exists($(WorkSpace)\src\closed) |
|
160 |
OPENJDK=true |
|
161 |
!endif |
|
162 |
!endif |
|
1 | 163 |
|
164 |
######################################################################### |
|
165 |
||
166 |
defaultTarget: product |
|
167 |
||
168 |
# The product or release build is an optimized build, and is the default |
|
169 |
||
170 |
# note that since all the build targets depend on local.make that BUILDARCH |
|
171 |
# and Platform_arch and Platform_arch_model will get set in local.make |
|
172 |
# and there is no need to pass them thru here on the command line |
|
173 |
# |
|
174 |
product release optimized: checks $(variantDir) $(variantDir)\local.make sanity |
|
175 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
176 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product ARCH=$(ARCH) |
1 | 177 |
|
17006 | 178 |
# The debug build is an optional build |
179 |
debug: checks $(variantDir) $(variantDir)\local.make sanity |
|
1 | 180 |
cd $(variantDir) |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
181 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=debug ARCH=$(ARCH) |
1 | 182 |
fastdebug: checks $(variantDir) $(variantDir)\local.make sanity |
183 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
184 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH) |
1 | 185 |
|
5087
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
186 |
# target to create just the directory structure |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
187 |
tree: checks $(variantDir) $(variantDir)\local.make sanity |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
188 |
mkdir $(variantDir)\product |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
189 |
mkdir $(variantDir)\debug |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
190 |
mkdir $(variantDir)\fastdebug |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
191 |
|
1 | 192 |
sanity: |
193 |
@ echo; |
|
194 |
@ cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
195 |
@ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\sanity.make |
1 | 196 |
@ cd .. |
197 |
@ echo; |
|
198 |
||
199 |
clean: checkVariant |
|
200 |
- rm -r -f $(variantDir) |
|
201 |
||
202 |
$(variantDir): |
|
203 |
mkdir $(variantDir) |
|
204 |
||
205 |
$(variantDir)\local.make: checks |
|
206 |
@ echo # Generated file > $@ |
|
207 |
@ echo Variant=$(realVariant) >> $@ |
|
208 |
@ echo WorkSpace=$(WorkSpace) >> $@ |
|
209 |
@ echo BootStrapDir=$(BootStrapDir) >> $@ |
|
9411 | 210 |
@ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@ |
1 | 211 |
@ echo HS_VER=$(HS_VER) >> $@ |
212 |
@ echo HS_DOTVER=$(HS_DOTVER) >> $@ |
|
213 |
@ echo HS_COMPANY=$(COMPANY_NAME) >> $@ |
|
214 |
@ echo HS_FILEDESC=$(HS_FILEDESC) >> $@ |
|
215 |
@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ |
|
18025 | 216 |
@ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK) >> $@ |
1 | 217 |
@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@ |
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
218 |
@ echo HS_NAME=$(PRODUCT_NAME) $(VERSION_SHORT) >> $@ |
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
219 |
@ echo HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) >> $@ |
1 | 220 |
@ echo JDK_VER=$(JDK_VER) >> $@ |
221 |
@ echo JDK_DOTVER=$(JDK_DOTVER) >> $@ |
|
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
25639
diff
changeset
|
222 |
@ echo VERSION_STRING=$(VERSION_STRING) >> $@ |
1 | 223 |
@ echo BUILDARCH=$(BUILDARCH) >> $@ |
224 |
@ echo Platform_arch=$(Platform_arch) >> $@ |
|
225 |
@ echo Platform_arch_model=$(Platform_arch_model) >> $@ |
|
11955
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
226 |
@ echo CXX=$(CXX) >> $@ |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
227 |
@ echo LD=$(LD) >> $@ |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
228 |
@ echo MT=$(MT) >> $@ |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
229 |
@ echo RC=$(RC) >> $@ |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
230 |
@ sh $(WorkSpace)/make/windows/get_msc_ver.sh >> $@ |
12501
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
231 |
@ if "$(ENABLE_FULL_DEBUG_SYMBOLS)" NEQ "" echo ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) >> $@ |
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
232 |
@ if "$(ZIP_DEBUGINFO_FILES)" NEQ "" echo ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) >> $@ |
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
233 |
@ if "$(RM)" NEQ "" echo RM=$(RM) >> $@ |
25639
61be16de0fd5
8046765: makefiles should use parameterized $(CP) and $(MV) rather than explicit commands
mduigou
parents:
24238
diff
changeset
|
234 |
@ if "$(CP)" NEQ "" echo CP=$(CP) >> $@ |
61be16de0fd5
8046765: makefiles should use parameterized $(CP) and $(MV) rather than explicit commands
mduigou
parents:
24238
diff
changeset
|
235 |
@ if "$(MV)" NEQ "" echo MV=$(MV) >> $@ |
12501
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
236 |
@ if "$(ZIPEXE)" NEQ "" echo ZIPEXE=$(ZIPEXE) >> $@ |
1 | 237 |
|
34289
2d1821a50263
8142336: Convert the SA agent build to modular build-infra makefiles
erikj
parents:
25639
diff
changeset
|
238 |
checks: checkVariant checkWorkSpace |
1 | 239 |
|
240 |
checkVariant: |
|
16447 | 241 |
@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false |
242 |
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "core" \ |
|
243 |
echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false |
|
1 | 244 |
|
245 |
checkWorkSpace: |
|
246 |
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false |
|
247 |
||
248 |
checkBuildID: |
|
249 |
@ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false |