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