1
|
1 |
@echo off
|
|
2 |
REM
|
|
3 |
REM Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
|
|
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
|
|
20 |
REM Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
21 |
REM CA 95054 USA or visit www.sun.com if you need additional information or
|
|
22 |
REM have any questions.
|
|
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
|
|
31 |
cl 2>&1 | grep "IA-64" >NUL
|
|
32 |
if %errorlevel% == 0 goto isia64
|
|
33 |
cl 2>&1 | grep "AMD64" >NUL
|
|
34 |
if %errorlevel% == 0 goto amd64
|
|
35 |
set ARCH=x86
|
|
36 |
set BUILDARCH=i486
|
|
37 |
set Platform_arch=x86
|
|
38 |
set Platform_arch_model=x86_32
|
|
39 |
goto end
|
|
40 |
:amd64
|
|
41 |
set LP64=1
|
|
42 |
set ARCH=x86
|
|
43 |
set BUILDARCH=amd64
|
|
44 |
set Platform_arch=x86
|
|
45 |
set Platform_arch_model=x86_64
|
|
46 |
goto end
|
|
47 |
:isia64
|
|
48 |
set LP64=1
|
|
49 |
set ARCH=ia64
|
|
50 |
set Platform_arch=ia64
|
|
51 |
set Platform_arch_model=ia64
|
|
52 |
:end
|
|
53 |
|
|
54 |
if "%4" == "" goto usage
|
|
55 |
if not "%7" == "" goto usage
|
|
56 |
|
|
57 |
if "%1" == "product" goto test1
|
|
58 |
if "%1" == "debug" goto test1
|
|
59 |
if "%1" == "fastdebug" goto test1
|
|
60 |
goto usage
|
|
61 |
|
|
62 |
:test1
|
|
63 |
if "%2" == "core" goto test2
|
|
64 |
if "%2" == "kernel" goto test2
|
|
65 |
if "%2" == "compiler1" goto test2
|
|
66 |
if "%2" == "compiler2" goto test2
|
|
67 |
if "%2" == "tiered" goto test2
|
|
68 |
if "%2" == "adlc" goto build_adlc
|
|
69 |
|
|
70 |
goto usage
|
|
71 |
|
|
72 |
:test2
|
|
73 |
REM check_j2se_version
|
|
74 |
REM jvmti.make requires J2SE 1.4.x or newer.
|
|
75 |
REM If not found then fail fast.
|
|
76 |
%4\bin\javap javax.xml.transform.TransformerFactory >NUL
|
|
77 |
if %errorlevel% == 0 goto build
|
|
78 |
echo.
|
|
79 |
echo J2SE version found at %4\bin\java:
|
|
80 |
%4\bin\java -version
|
|
81 |
echo.
|
|
82 |
echo An XSLT processor (J2SE 1.4.x or newer) is required to
|
|
83 |
echo bootstrap this build
|
|
84 |
echo.
|
|
85 |
|
|
86 |
goto usage
|
|
87 |
|
|
88 |
:build
|
|
89 |
nmake -f %3/build/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
|
|
90 |
goto end
|
|
91 |
|
|
92 |
:build_adlc
|
|
93 |
nmake -f %3/build/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1
|
|
94 |
goto end
|
|
95 |
|
|
96 |
:usage
|
|
97 |
echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]
|
|
98 |
echo.
|
|
99 |
echo where:
|
|
100 |
echo flavor is "product", "debug" or "fastdebug",
|
|
101 |
echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",
|
|
102 |
echo workspace is source directory without trailing slash,
|
|
103 |
echo bootstrap_dir is a full path to echo a JDK in which bin/java
|
|
104 |
echo and bin/javac are present and working, and echo build_id is an
|
|
105 |
echo optional build identifier displayed by java -version
|
|
106 |
|
|
107 |
:end
|