source: trunk/openjdk/hotspot/make/windows/build.bat

Last change on this file was 309, checked in by dmik, 14 years ago

trunk: Merged in openjdk6 b24 from branches/vendor/oracle.

File size: 3.6 KB
Line 
1@echo off
2REM
3REM Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
4REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5REM
6REM This code is free software; you can redistribute it and/or modify it
7REM under the terms of the GNU General Public License version 2 only, as
8REM published by the Free Software Foundation.
9REM
10REM This code is distributed in the hope that it will be useful, but WITHOUT
11REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13REM version 2 for more details (a copy is included in the LICENSE file that
14REM accompanied this code).
15REM
16REM You should have received a copy of the GNU General Public License version
17REM 2 along with this work; if not, write to the Free Software Foundation,
18REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19REM
20REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21REM or visit www.oracle.com if you need additional information or have any
22REM questions.
23REM
24REM
25
26
27REM
28REM Since we don't have uname and we could be cross-compiling,
29REM Use the compiler to determine which ARCH we are building
30REM
31REM Note: Running this batch file from the Windows command shell requires
32REM that "grep" be accessible on the PATH. An MKS install does this.
33REM
34cl 2>&1 | grep "IA-64" >NUL
35if %errorlevel% == 0 goto isia64
36cl 2>&1 | grep "AMD64" >NUL
37if %errorlevel% == 0 goto amd64
38set ARCH=x86
39set BUILDARCH=i486
40set Platform_arch=x86
41set Platform_arch_model=x86_32
42goto end
43:amd64
44set LP64=1
45set ARCH=x86
46set BUILDARCH=amd64
47set Platform_arch=x86
48set Platform_arch_model=x86_64
49goto end
50:isia64
51set LP64=1
52set ARCH=ia64
53set Platform_arch=ia64
54set Platform_arch_model=ia64
55:end
56
57if "%4" == "" goto usage
58if not "%7" == "" goto usage
59
60if "%1" == "product" goto test1
61if "%1" == "debug" goto test1
62if "%1" == "fastdebug" goto test1
63if "%1" == "tree" goto test1
64goto usage
65
66:test1
67if "%2" == "core" goto test2
68if "%2" == "kernel" goto test2
69if "%2" == "compiler1" goto test2
70if "%2" == "compiler2" goto test2
71if "%2" == "tiered" goto test2
72if "%2" == "adlc" goto build_adlc
73
74goto usage
75
76:test2
77if "%1" == "tree" goto build_tree
78REM check_j2se_version
79REM jvmti.make requires J2SE 1.4.x or newer.
80REM If not found then fail fast.
81%4\bin\javap javax.xml.transform.TransformerFactory >NUL
82if %errorlevel% == 0 goto build
83echo.
84echo J2SE version found at %4\bin\java:
85%4\bin\java -version
86echo.
87echo An XSLT processor (J2SE 1.4.x or newer) is required to
88echo bootstrap this build
89echo.
90
91goto usage
92
93:build
94nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
95goto end
96
97:build_adlc
98nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1
99goto end
100
101:build_tree
102nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
103goto end
104
105:usage
106echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]
107echo.
108echo where:
109echo flavor is "product", "debug" or "fastdebug",
110echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",
111echo workspace is source directory without trailing slash,
112echo bootstrap_dir is a full path to a JDK in which bin/java
113echo and bin/javac are present and working, and build_id is an
114echo optional build identifier displayed by java -version
115exit /b 1
116
117:end
118exit /b %errorlevel%
Note: See TracBrowser for help on using the repository browser.