annotate make/windows/build.bat @ 1949:0a8e0d4345b3

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