duke@435: @echo off duke@435: REM xdono@631: REM Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. duke@435: REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: REM duke@435: REM This code is free software; you can redistribute it and/or modify it duke@435: REM under the terms of the GNU General Public License version 2 only, as duke@435: REM published by the Free Software Foundation. duke@435: REM duke@435: REM This code is distributed in the hope that it will be useful, but WITHOUT duke@435: REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: REM version 2 for more details (a copy is included in the LICENSE file that duke@435: REM accompanied this code). duke@435: REM duke@435: REM You should have received a copy of the GNU General Public License version duke@435: REM 2 along with this work; if not, write to the Free Software Foundation, duke@435: REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: REM duke@435: REM Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@435: REM CA 95054 USA or visit www.sun.com if you need additional information or duke@435: REM have any questions. duke@435: REM duke@435: REM duke@435: duke@435: duke@435: REM duke@435: REM Since we don't have uname and we could be cross-compiling, duke@435: REM Use the compiler to determine which ARCH we are building duke@435: REM duke@435: cl 2>&1 | grep "IA-64" >NUL duke@435: if %errorlevel% == 0 goto isia64 duke@435: cl 2>&1 | grep "AMD64" >NUL duke@435: if %errorlevel% == 0 goto amd64 duke@435: set ARCH=x86 duke@435: set BUILDARCH=i486 duke@435: set Platform_arch=x86 duke@435: set Platform_arch_model=x86_32 duke@435: goto end duke@435: :amd64 duke@435: set LP64=1 duke@435: set ARCH=x86 duke@435: set BUILDARCH=amd64 duke@435: set Platform_arch=x86 duke@435: set Platform_arch_model=x86_64 duke@435: goto end duke@435: :isia64 duke@435: set LP64=1 duke@435: set ARCH=ia64 duke@435: set Platform_arch=ia64 duke@435: set Platform_arch_model=ia64 duke@435: :end duke@435: duke@435: if "%4" == "" goto usage duke@435: if not "%7" == "" goto usage duke@435: duke@435: if "%1" == "product" goto test1 duke@435: if "%1" == "debug" goto test1 duke@435: if "%1" == "fastdebug" goto test1 duke@435: goto usage duke@435: duke@435: :test1 duke@435: if "%2" == "core" goto test2 duke@435: if "%2" == "kernel" goto test2 duke@435: if "%2" == "compiler1" goto test2 duke@435: if "%2" == "compiler2" goto test2 duke@435: if "%2" == "tiered" goto test2 duke@435: if "%2" == "adlc" goto build_adlc duke@435: duke@435: goto usage duke@435: duke@435: :test2 duke@435: REM check_j2se_version duke@435: REM jvmti.make requires J2SE 1.4.x or newer. duke@435: REM If not found then fail fast. duke@435: %4\bin\javap javax.xml.transform.TransformerFactory >NUL duke@435: if %errorlevel% == 0 goto build duke@435: echo. duke@435: echo J2SE version found at %4\bin\java: duke@435: %4\bin\java -version duke@435: echo. duke@435: echo An XSLT processor (J2SE 1.4.x or newer) is required to duke@435: echo bootstrap this build duke@435: echo. duke@435: duke@435: goto usage duke@435: duke@435: :build kamg@526: nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1 duke@435: goto end duke@435: duke@435: :build_adlc kamg@526: nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1 duke@435: goto end duke@435: duke@435: :usage duke@435: echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home] duke@435: echo. duke@435: echo where: duke@435: echo flavor is "product", "debug" or "fastdebug", duke@435: echo version is "core", "kernel", "compiler1", "compiler2", or "tiered", duke@435: echo workspace is source directory without trailing slash, duke@435: echo bootstrap_dir is a full path to echo a JDK in which bin/java duke@435: echo and bin/javac are present and working, and echo build_id is an duke@435: echo optional build identifier displayed by java -version duke@435: duke@435: :end