annotate make/windows/build.bat @ 9010:08a16c26907f

MX_TESTFILE environment variable can be used to specify (and preserve) the test list file used by 'mx unittest'. This is useful when wanting to run the command under gdb.
author Doug Simon <doug.simon@oracle.com>
date Thu, 11 Apr 2013 21:40:52 +0200
parents 8b46b0196eb0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 @echo off
a61af66fc99e Initial load
duke
parents:
diff changeset
2 REM
7951
8b46b0196eb0 8000692: Remove old KERNEL code
zgu
parents: 6842
diff changeset
3 REM Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
4 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
5 REM
a61af66fc99e Initial load
duke
parents:
diff changeset
6 REM This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
7 REM under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
8 REM published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
9 REM
a61af66fc99e Initial load
duke
parents:
diff changeset
10 REM This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
11 REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
12 REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
13 REM version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
14 REM accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
15 REM
a61af66fc99e Initial load
duke
parents:
diff changeset
16 REM You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
17 REM 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
18 REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
19 REM
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1328
diff changeset
20 REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1328
diff changeset
21 REM 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
22 REM questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
23 REM
a61af66fc99e Initial load
duke
parents:
diff changeset
24 REM
a61af66fc99e Initial load
duke
parents:
diff changeset
25
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 REM
a61af66fc99e Initial load
duke
parents:
diff changeset
28 REM Since we don't have uname and we could be cross-compiling,
a61af66fc99e Initial load
duke
parents:
diff changeset
29 REM Use the compiler to determine which ARCH we are building
a61af66fc99e Initial load
duke
parents:
diff changeset
30 REM
1328
39e409a664b3 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 1322
diff changeset
31 REM Note: Running this batch file from the Windows command shell requires
39e409a664b3 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 1322
diff changeset
32 REM that "grep" 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
33 REM
0
a61af66fc99e Initial load
duke
parents:
diff changeset
34 cl 2>&1 | grep "IA-64" >NUL
a61af66fc99e Initial load
duke
parents:
diff changeset
35 if %errorlevel% == 0 goto isia64
a61af66fc99e Initial load
duke
parents:
diff changeset
36 cl 2>&1 | grep "AMD64" >NUL
a61af66fc99e Initial load
duke
parents:
diff changeset
37 if %errorlevel% == 0 goto amd64
4800
94ec88ca68e2 7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents: 2042
diff changeset
38 cl 2>&1 | grep "x64" >NUL
94ec88ca68e2 7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents: 2042
diff changeset
39 if %errorlevel% == 0 goto amd64
0
a61af66fc99e Initial load
duke
parents:
diff changeset
40 set ARCH=x86
a61af66fc99e Initial load
duke
parents:
diff changeset
41 set BUILDARCH=i486
a61af66fc99e Initial load
duke
parents:
diff changeset
42 set Platform_arch=x86
a61af66fc99e Initial load
duke
parents:
diff changeset
43 set Platform_arch_model=x86_32
a61af66fc99e Initial load
duke
parents:
diff changeset
44 goto end
a61af66fc99e Initial load
duke
parents:
diff changeset
45 :amd64
a61af66fc99e Initial load
duke
parents:
diff changeset
46 set LP64=1
a61af66fc99e Initial load
duke
parents:
diff changeset
47 set ARCH=x86
a61af66fc99e Initial load
duke
parents:
diff changeset
48 set BUILDARCH=amd64
a61af66fc99e Initial load
duke
parents:
diff changeset
49 set Platform_arch=x86
a61af66fc99e Initial load
duke
parents:
diff changeset
50 set Platform_arch_model=x86_64
a61af66fc99e Initial load
duke
parents:
diff changeset
51 goto end
a61af66fc99e Initial load
duke
parents:
diff changeset
52 :isia64
a61af66fc99e Initial load
duke
parents:
diff changeset
53 set LP64=1
a61af66fc99e Initial load
duke
parents:
diff changeset
54 set ARCH=ia64
a61af66fc99e Initial load
duke
parents:
diff changeset
55 set Platform_arch=ia64
a61af66fc99e Initial load
duke
parents:
diff changeset
56 set Platform_arch_model=ia64
a61af66fc99e Initial load
duke
parents:
diff changeset
57 :end
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 if "%4" == "" goto usage
a61af66fc99e Initial load
duke
parents:
diff changeset
60 if not "%7" == "" goto usage
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 if "%1" == "product" goto test1
a61af66fc99e Initial load
duke
parents:
diff changeset
63 if "%1" == "debug" goto test1
a61af66fc99e Initial load
duke
parents:
diff changeset
64 if "%1" == "fastdebug" goto test1
1322
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
65 if "%1" == "tree" goto test1
0
a61af66fc99e Initial load
duke
parents:
diff changeset
66 goto usage
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 :test1
a61af66fc99e Initial load
duke
parents:
diff changeset
69 if "%2" == "core" goto test2
a61af66fc99e Initial load
duke
parents:
diff changeset
70 if "%2" == "compiler1" goto test2
a61af66fc99e Initial load
duke
parents:
diff changeset
71 if "%2" == "compiler2" goto test2
a61af66fc99e Initial load
duke
parents:
diff changeset
72 if "%2" == "tiered" goto test2
a61af66fc99e Initial load
duke
parents:
diff changeset
73 if "%2" == "adlc" goto build_adlc
a61af66fc99e Initial load
duke
parents:
diff changeset
74
a61af66fc99e Initial load
duke
parents:
diff changeset
75 goto usage
a61af66fc99e Initial load
duke
parents:
diff changeset
76
a61af66fc99e Initial load
duke
parents:
diff changeset
77 :test2
1322
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
78 if "%1" == "tree" goto build_tree
0
a61af66fc99e Initial load
duke
parents:
diff changeset
79 REM check_j2se_version
a61af66fc99e Initial load
duke
parents:
diff changeset
80 REM jvmti.make requires J2SE 1.4.x or newer.
a61af66fc99e Initial load
duke
parents:
diff changeset
81 REM If not found then fail fast.
a61af66fc99e Initial load
duke
parents:
diff changeset
82 %4\bin\javap javax.xml.transform.TransformerFactory >NUL
a61af66fc99e Initial load
duke
parents:
diff changeset
83 if %errorlevel% == 0 goto build
a61af66fc99e Initial load
duke
parents:
diff changeset
84 echo.
a61af66fc99e Initial load
duke
parents:
diff changeset
85 echo J2SE version found at %4\bin\java:
a61af66fc99e Initial load
duke
parents:
diff changeset
86 %4\bin\java -version
a61af66fc99e Initial load
duke
parents:
diff changeset
87 echo.
a61af66fc99e Initial load
duke
parents:
diff changeset
88 echo An XSLT processor (J2SE 1.4.x or newer) is required to
a61af66fc99e Initial load
duke
parents:
diff changeset
89 echo bootstrap this build
a61af66fc99e Initial load
duke
parents:
diff changeset
90 echo.
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 goto usage
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 :build
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
95 nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
0
a61af66fc99e Initial load
duke
parents:
diff changeset
96 goto end
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 :build_adlc
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
99 nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1
0
a61af66fc99e Initial load
duke
parents:
diff changeset
100 goto end
a61af66fc99e Initial load
duke
parents:
diff changeset
101
1322
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
102 :build_tree
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
103 nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
104 goto end
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
105
0
a61af66fc99e Initial load
duke
parents:
diff changeset
106 :usage
a61af66fc99e Initial load
duke
parents:
diff changeset
107 echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]
a61af66fc99e Initial load
duke
parents:
diff changeset
108 echo.
a61af66fc99e Initial load
duke
parents:
diff changeset
109 echo where:
a61af66fc99e Initial load
duke
parents:
diff changeset
110 echo flavor is "product", "debug" or "fastdebug",
7951
8b46b0196eb0 8000692: Remove old KERNEL code
zgu
parents: 6842
diff changeset
111 echo version is "core", "compiler1", "compiler2", or "tiered",
0
a61af66fc99e Initial load
duke
parents:
diff changeset
112 echo workspace is source directory without trailing slash,
1322
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
113 echo bootstrap_dir is a full path to a JDK in which bin/java
21141e23627a 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 196
diff changeset
114 echo and bin/javac are present and working, and build_id is an
0
a61af66fc99e Initial load
duke
parents:
diff changeset
115 echo optional build identifier displayed by java -version
1328
39e409a664b3 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 1322
diff changeset
116 exit /b 1
0
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 :end
1328
39e409a664b3 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 1322
diff changeset
119 exit /b %errorlevel%