author | lana |
Thu, 11 Feb 2016 14:39:51 -0800 | |
changeset 35741 | 5e023f75be9f |
parent 35182 | 3e3e2c3cfe6e |
permissions | -rw-r--r-- |
1 | 1 |
@echo off |
2 |
REM |
|
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
3 |
REM Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
1 | 4 |
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
REM |
|
6 |
REM This code is free software; you can redistribute it and/or modify it |
|
7 |
REM under the terms of the GNU General Public License version 2 only, as |
|
8 |
REM published by the Free Software Foundation. |
|
9 |
REM |
|
10 |
REM This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
REM version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
REM accompanied this code). |
|
15 |
REM |
|
16 |
REM You should have received a copy of the GNU General Public License version |
|
17 |
REM 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
REM |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
20 |
REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
21 |
REM or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
22 |
REM questions. |
1 | 23 |
REM |
24 |
REM |
|
25 |
||
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
26 |
REM Set HotSpotWorkSpace to the directory two steps above this script |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
27 |
for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi) |
1 | 28 |
|
29 |
REM |
|
30 |
REM Since we don't have uname and we could be cross-compiling, |
|
31 |
REM Use the compiler to determine which ARCH we are building |
|
32 |
REM |
|
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
33 |
cl 2>&1 1>&3 | findstr x64>NUL |
1 | 34 |
if %errorlevel% == 0 goto amd64 |
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
35 |
set VCPROJ=%HotSpotWorkSpace%\build\vs-i486\jvm.vcxproj |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
36 |
set PLATFORM=x86 |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
37 |
goto testmkshome |
1 | 38 |
:amd64 |
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
39 |
set VCPROJ=%HotSpotWorkSpace%\build\vs-amd64\jvm.vcxproj |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
40 |
set PLATFORM=x64 |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
41 |
goto testmkshome |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
42 |
|
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
43 |
:testmkshome |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
44 |
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
45 |
if exist c:\cygwin\bin set HOTSPOTMKSHOME=c:\cygwin\bin |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
46 |
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
47 |
if exist c:\cygwin64\bin set HOTSPOTMKSHOME=c:\cygwin64\bin |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
48 |
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
49 |
echo Error: please set variable HOTSPOTMKSHOME to place where |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
50 |
echo your MKS/Cygwin installation is |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
51 |
echo. |
1 | 52 |
goto end |
53 |
||
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
54 |
:testjavahome |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
55 |
if not "%JAVA_HOME%" == "" goto testbuildversion |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
56 |
echo Error: please set variable JAVA_HOME to a bootstrap JDK |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
57 |
echo. |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
58 |
goto end |
1 | 59 |
|
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
60 |
:testbuildversion |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
61 |
if "%1" == "compiler1" goto testdebuglevel |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
62 |
if "%1" == "tiered" goto testdebuglevel |
1 | 63 |
goto usage |
64 |
||
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
65 |
:testdebuglevel |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
66 |
if "%2" == "product" goto build |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
67 |
if "%2" == "debug" goto build |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
68 |
if "%2" == "fastdebug" goto build |
1 | 69 |
goto usage |
70 |
||
71 |
:build |
|
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
72 |
if NOT EXIST %VCPROJ% call %~dp0\create.bat %JAVA_HOME% |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
73 |
msbuild /Property:Platform=%PLATFORM% /Property:Configuration=%1_%2 /v:m %VCPROJ% |
5087
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
670
diff
changeset
|
74 |
goto end |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
670
diff
changeset
|
75 |
|
1 | 76 |
:usage |
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
77 |
echo Usage: build version debuglevel |
1 | 78 |
echo. |
79 |
echo where: |
|
35182
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
80 |
echo version is "compiler1" or "tiered", |
3e3e2c3cfe6e
8145603: Enable build.bat to use vcproj to build
ctornqvi
parents:
15432
diff
changeset
|
81 |
echo debuglevel is "product", "debug" or "fastdebug" |
5093
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
82 |
exit /b 1 |
1 | 83 |
|
84 |
:end |
|
5093
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
85 |
exit /b %errorlevel% |