hotspot/make/windows/build.bat
author xdono
Wed, 02 Jul 2008 12:55:16 -0700
changeset 670 ddf3e9583f2f
parent 338 5cf9f61d76f4
child 5087 72635506e447
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
@echo off
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
REM
670
ddf3e9583f2f 6719955: Update copyright year
xdono
parents: 338
diff changeset
     3
REM Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
REM This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
REM under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
REM published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
REM This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
REM FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
REM version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
REM accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
REM You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
REM 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
REM Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
REM CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
REM have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
REM  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
REM Since we don't have uname and we could be cross-compiling,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
REM Use the compiler to determine which ARCH we are building
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
REM 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
cl 2>&1 | grep "IA-64" >NUL
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
if %errorlevel% == 0 goto isia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
cl 2>&1 | grep "AMD64" >NUL
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
if %errorlevel% == 0 goto amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
set ARCH=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
set BUILDARCH=i486
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
set Platform_arch=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
set Platform_arch_model=x86_32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
:amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
set LP64=1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
set ARCH=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
set BUILDARCH=amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
set Platform_arch=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
set Platform_arch_model=x86_64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
:isia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
set LP64=1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
set ARCH=ia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
set Platform_arch=ia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
set Platform_arch_model=ia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
:end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
if "%4" == ""          goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
if not "%7" == ""      goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
if "%1" == "product"   goto test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
if "%1" == "debug"     goto test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
if "%1" == "fastdebug" goto test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
:test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
if "%2" == "core"      goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
if "%2" == "kernel"   goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
if "%2" == "compiler1" goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
if "%2" == "compiler2" goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
if "%2" == "tiered"    goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
if "%2" == "adlc"      goto build_adlc
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
:test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
REM check_j2se_version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
REM jvmti.make requires J2SE 1.4.x or newer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
REM If not found then fail fast.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
%4\bin\javap javax.xml.transform.TransformerFactory >NUL
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
if %errorlevel% == 0 goto build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
echo J2SE version found at %4\bin\java:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
%4\bin\java -version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
echo An XSLT processor (J2SE 1.4.x or newer) is required to
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
echo bootstrap this build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
:build
338
5cf9f61d76f4 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 1
diff changeset
    89
nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
:build_adlc
338
5cf9f61d76f4 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 1
diff changeset
    93
nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
:usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
echo where:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
echo flavor is "product", "debug" or "fastdebug",
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
echo workspace is source directory without trailing slash, 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
echo bootstrap_dir is a full path to echo a JDK in which bin/java 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
echo   and bin/javac are present and working, and echo build_id is an 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
echo   optional build identifier displayed by java -version
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
:end