@echo offREMREM Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.REMREM This code is free software; you can redistribute it and/or modify itREM under the terms of the GNU General Public License version 2 only, asREM published by the Free Software Foundation.REMREM This code is distributed in the hope that it will be useful, but WITHOUTREM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY orREM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public LicenseREM version 2 for more details (a copy is included in the LICENSE file thatREM accompanied this code).REMREM You should have received a copy of the GNU General Public License versionREM 2 along with this work; if not, write to the Free Software Foundation,REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.REMREM Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,REM CA 95054 USA or visit www.sun.com if you need additional information orREM have any questions.REM REMREMREM Since we don't have uname and we could be cross-compiling,REM Use the compiler to determine which ARCH we are buildingREM REM Note: Running this batch file from the Windows command shell requiresREM that "grep" be accessible on the PATH. An MKS install does this.REM cl 2>&1 | grep "IA-64" >NULif %errorlevel% == 0 goto isia64cl 2>&1 | grep "AMD64" >NULif %errorlevel% == 0 goto amd64set ARCH=x86set BUILDARCH=i486set Platform_arch=x86set Platform_arch_model=x86_32goto end:amd64set LP64=1set ARCH=x86set BUILDARCH=amd64set Platform_arch=x86set Platform_arch_model=x86_64goto end:isia64set LP64=1set ARCH=ia64set Platform_arch=ia64set Platform_arch_model=ia64:endif "%4" == "" goto usageif not "%7" == "" goto usageif "%1" == "product" goto test1if "%1" == "debug" goto test1if "%1" == "fastdebug" goto test1if "%1" == "tree" goto test1goto usage:test1if "%2" == "core" goto test2if "%2" == "kernel" goto test2if "%2" == "compiler1" goto test2if "%2" == "compiler2" goto test2if "%2" == "tiered" goto test2if "%2" == "adlc" goto build_adlcgoto usage:test2if "%1" == "tree" goto build_treeREM check_j2se_versionREM jvmti.make requires J2SE 1.4.x or newer.REM If not found then fail fast.%4\bin\javap javax.xml.transform.TransformerFactory >NULif %errorlevel% == 0 goto buildecho.echo J2SE version found at %4\bin\java:%4\bin\java -versionecho.echo An XSLT processor (J2SE 1.4.x or newer) is required toecho bootstrap this buildecho.goto usage:buildnmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1goto end:build_adlcnmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1goto end:build_treenmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1goto end:usageecho Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]echo.echo where:echo flavor is "product", "debug" or "fastdebug",echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",echo workspace is source directory without trailing slash, echo bootstrap_dir is a full path to a JDK in which bin/java echo and bin/javac are present and working, and build_id is an echo optional build identifier displayed by java -versionexit /b 1:endexit /b %errorlevel%