2007-12-01 00:00:00 +00:00
|
|
|
@echo off
|
|
|
|
REM
|
2015-12-17 08:41:30 -08:00
|
|
|
REM Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
REM
|
|
|
|
REM This code is free software; you can redistribute it and/or modify it
|
|
|
|
REM under the terms of the GNU General Public License version 2 only, as
|
|
|
|
REM published by the Free Software Foundation.
|
|
|
|
REM
|
|
|
|
REM This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
REM version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
REM accompanied this code).
|
|
|
|
REM
|
|
|
|
REM You should have received a copy of the GNU General Public License version
|
|
|
|
REM 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.
|
|
|
|
REM
|
2010-05-27 19:08:38 -07:00
|
|
|
REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
REM or visit www.oracle.com if you need additional information or have any
|
|
|
|
REM questions.
|
2007-12-01 00:00:00 +00:00
|
|
|
REM
|
|
|
|
REM
|
|
|
|
|
2015-12-17 08:41:30 -08:00
|
|
|
REM Set HotSpotWorkSpace to the directory two steps above this script
|
|
|
|
for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi)
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
REM
|
|
|
|
REM Since we don't have uname and we could be cross-compiling,
|
|
|
|
REM Use the compiler to determine which ARCH we are building
|
|
|
|
REM
|
2015-12-17 08:41:30 -08:00
|
|
|
cl 2>&1 1>&3 | findstr x64>NUL
|
2012-01-11 17:34:02 -05:00
|
|
|
if %errorlevel% == 0 goto amd64
|
2015-12-17 08:41:30 -08:00
|
|
|
set VCPROJ=%HotSpotWorkSpace%\build\vs-i486\jvm.vcxproj
|
|
|
|
set PLATFORM=x86
|
|
|
|
goto testmkshome
|
2007-12-01 00:00:00 +00:00
|
|
|
:amd64
|
2015-12-17 08:41:30 -08:00
|
|
|
set VCPROJ=%HotSpotWorkSpace%\build\vs-amd64\jvm.vcxproj
|
|
|
|
set PLATFORM=x64
|
|
|
|
goto testmkshome
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2015-12-17 08:41:30 -08:00
|
|
|
:testmkshome
|
|
|
|
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome
|
|
|
|
if exist c:\cygwin\bin set HOTSPOTMKSHOME=c:\cygwin\bin
|
|
|
|
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome
|
|
|
|
if exist c:\cygwin64\bin set HOTSPOTMKSHOME=c:\cygwin64\bin
|
|
|
|
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome
|
|
|
|
echo Error: please set variable HOTSPOTMKSHOME to place where
|
|
|
|
echo your MKS/Cygwin installation is
|
|
|
|
echo.
|
|
|
|
goto end
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2015-12-17 08:41:30 -08:00
|
|
|
:testjavahome
|
|
|
|
if not "%JAVA_HOME%" == "" goto testbuildversion
|
|
|
|
echo Error: please set variable JAVA_HOME to a bootstrap JDK
|
|
|
|
echo.
|
|
|
|
goto end
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2015-12-17 08:41:30 -08:00
|
|
|
:testbuildversion
|
|
|
|
if "%1" == "compiler1" goto testdebuglevel
|
|
|
|
if "%1" == "tiered" goto testdebuglevel
|
2007-12-01 00:00:00 +00:00
|
|
|
goto usage
|
|
|
|
|
2015-12-17 08:41:30 -08:00
|
|
|
:testdebuglevel
|
|
|
|
if "%2" == "product" goto build
|
|
|
|
if "%2" == "debug" goto build
|
|
|
|
if "%2" == "fastdebug" goto build
|
2007-12-01 00:00:00 +00:00
|
|
|
goto usage
|
|
|
|
|
|
|
|
:build
|
2015-12-17 08:41:30 -08:00
|
|
|
if NOT EXIST %VCPROJ% call %~dp0\create.bat %JAVA_HOME%
|
|
|
|
msbuild /Property:Platform=%PLATFORM% /Property:Configuration=%1_%2 /v:m %VCPROJ%
|
2010-03-16 17:47:03 -06:00
|
|
|
goto end
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
:usage
|
2015-12-17 08:41:30 -08:00
|
|
|
echo Usage: build version debuglevel
|
2007-12-01 00:00:00 +00:00
|
|
|
echo.
|
|
|
|
echo where:
|
2015-12-17 08:41:30 -08:00
|
|
|
echo version is "compiler1" or "tiered",
|
|
|
|
echo debuglevel is "product", "debug" or "fastdebug"
|
2010-03-25 16:27:12 -07:00
|
|
|
exit /b 1
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
:end
|
2010-03-25 16:27:12 -07:00
|
|
|
exit /b %errorlevel%
|