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