comparison make/windows/create.bat @ 2233:15d6977f04b0

7017824: Add support for creating 64-bit Visual Studio projects Summary: Updated create.bat and ProjectCreator Reviewed-by: brutisso, stefank, ohair
author sla
date Thu, 10 Feb 2011 13:03:22 +0100
parents aa6e219afbf1
children 2ab52cda08e5 74e790c48cd4
comparison
equal deleted inserted replaced
2205:b83527d0482d 2233:15d6977f04b0
1 @echo off 1 @echo off
2 REM 2 REM
3 REM Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 3 REM Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
4 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 REM 5 REM
6 REM This code is free software; you can redistribute it and/or modify it 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 7 REM under the terms of the GNU General Public License version 2 only, as
8 REM published by the Free Software Foundation. 8 REM published by the Free Software Foundation.
48 echo Make sure grep.exe is in your PATH before running this script. Either cygwin or MKS should work. 48 echo Make sure grep.exe is in your PATH before running this script. Either cygwin or MKS should work.
49 goto end 49 goto end
50 50
51 51
52 :testit 52 :testit
53 cl 2>&1 | grep "IA-64" >NUL 53 cl 2>&1 | grep "x64" >NUL
54 if %errorlevel% == 0 goto isia64
55 cl 2>&1 | grep "AMD64" >NUL
56 if %errorlevel% == 0 goto amd64 54 if %errorlevel% == 0 goto amd64
57 set ARCH=x86 55 set ARCH=x86
58 set BUILDARCH=i486 56 set BUILDARCH=i486
59 set Platform_arch=x86 57 set Platform_arch=x86
60 set Platform_arch_model=x86_32 58 set Platform_arch_model=x86_32
62 :amd64 60 :amd64
63 set ARCH=x86 61 set ARCH=x86
64 set BUILDARCH=amd64 62 set BUILDARCH=amd64
65 set Platform_arch=x86 63 set Platform_arch=x86
66 set Platform_arch_model=x86_64 64 set Platform_arch_model=x86_64
67 goto done
68 :isia64
69 set ARCH=ia64
70 set BUILDARCH=ia64
71 set Platform_arch=ia64
72 set Platform_arch_model=ia64
73 :done 65 :done
74 66
75 setlocal 67 setlocal
76 68
77 if "%1" == "" goto usage 69 if "%1" == "" goto usage
79 if not "%2" == "" goto usage 71 if not "%2" == "" goto usage
80 72
81 REM Set HotSpotWorkSpace to the directy two steps above this script 73 REM Set HotSpotWorkSpace to the directy two steps above this script
82 for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi) 74 for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi)
83 set HotSpotBuildRoot=%HotSpotWorkSpace%build 75 set HotSpotBuildRoot=%HotSpotWorkSpace%build
84 set HotSpotBuildSpace=%HotSpotBuildRoot%\vs 76 set HotSpotBuildSpace=%HotSpotBuildRoot%\vs-%BUILDARCH%
85 set HotSpotJDKDist=%1 77 set HotSpotJDKDist=%1
86 78
87 79
88 REM figure out MSC version 80 REM figure out MSC version
89 for /F %%i in ('sh %HotSpotWorkSpace%/make/windows/get_msc_ver.sh') do set %%i 81 for /F %%i in ('sh %HotSpotWorkSpace%/make/windows/get_msc_ver.sh') do set %%i
90 82
91 echo ************************************************************** 83 echo **************************************************************
92 set ProjectFile=jvm.vcproj 84 set ProjectFile=%HotSpotBuildSpace%\jvm.vcproj
93 if "%MSC_VER%" == "1200" ( 85 if "%MSC_VER%" == "1200" (
94 set ProjectFile=jvm.dsp 86 set ProjectFile=%HotSpotBuildSpace%\jvm.dsp
95 echo Will generate VC6 project {unsupported} 87 echo Will generate VC6 project {unsupported}
96 ) else ( 88 ) else (
97 if "%MSC_VER%" == "1400" ( 89 if "%MSC_VER%" == "1400" (
98 echo Will generate VC8 {Visual Studio 2005} 90 echo Will generate VC8 {Visual Studio 2005}
99 ) else ( 91 ) else (
161 if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated 153 if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
162 copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL 154 copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
163 ) 155 )
164 156
165 REM force regneration of ProjectFile 157 REM force regneration of ProjectFile
166 if exist %HotSpotBuildSpace%\%ProjectFile% del %HotSpotBuildSpace%\%ProjectFile% 158 if exist %ProjectFile% del %ProjectFile%
167 159
168 for /D %%i in (compiler1, compiler2, tiered, core, kernel) do ( 160 for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
169 echo -- %%i -- 161 echo -- %%i --
170 echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make 162 echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
171 echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make 163 echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
180 echo HOTSPOTJDKDIST=%HotSpotJDKDist% >> %HotSpotBuildSpace%\%%i\local.make 172 echo HOTSPOTJDKDIST=%HotSpotJDKDist% >> %HotSpotBuildSpace%\%%i\local.make
181 echo ARCH=%ARCH% >> %HotSpotBuildSpace%\%%i\local.make 173 echo ARCH=%ARCH% >> %HotSpotBuildSpace%\%%i\local.make
182 echo BUILDARCH=%BUILDARCH% >> %HotSpotBuildSpace%\%%i\local.make 174 echo BUILDARCH=%BUILDARCH% >> %HotSpotBuildSpace%\%%i\local.make
183 echo Platform_arch=%Platform_arch% >> %HotSpotBuildSpace%\%%i\local.make 175 echo Platform_arch=%Platform_arch% >> %HotSpotBuildSpace%\%%i\local.make
184 echo Platform_arch_model=%Platform_arch_model% >> %HotSpotBuildSpace%\%%i\local.make 176 echo Platform_arch_model=%Platform_arch_model% >> %HotSpotBuildSpace%\%%i\local.make
177 echo MSC_VER=%MSC_VER% >> %HotSpotBuildSpace%\%%i\local.make
185 178
186 for /D %%j in (debug, fastdebug, product) do ( 179 for /D %%j in (debug, fastdebug, product) do (
187 if NOT EXIST %HotSpotBuildSpace%\%%i\%%j mkdir %HotSpotBuildSpace%\%%i\%%j 180 if NOT EXIST %HotSpotBuildSpace%\%%i\%%j mkdir %HotSpotBuildSpace%\%%i\%%j
188 ) 181 )
189 182
194 ) 187 )
195 188
196 pushd %HotSpotBuildRoot% 189 pushd %HotSpotBuildRoot%
197 190
198 REM It doesn't matter which variant we use here, "compiler1" is as good as any of the others - we need the common variables 191 REM It doesn't matter which variant we use here, "compiler1" is as good as any of the others - we need the common variables
199 nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\compiler1\local.make %HotSpotBuildRoot%/%ProjectFile% 192 nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\compiler1\local.make %ProjectFile%
200 193
201 popd 194 popd
202 195
203 goto end 196 goto end
204 197