1 @echo off
2 REM
3 REM Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
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
20 REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 REM or visit www.oracle.com if you need additional information or have any
22 REM questions.
23 REM
99 :test1
100 if exist %HotSpotBuildSpace% goto test2
101 if not "%HotSpotBuildSpace%" == "" mkdir %HotSpotBuildSpace%
102 if exist %HotSpotBuildSpace% goto test2
103 echo Error: directory pointed to by HotSpotBuildSpace
104 echo does not exist, or the variable is not set.
105 echo.
106 goto usage
107
108 :test2
109 if exist %HotSpotJDKDist% goto test3
110 echo Error: directory pointed to by %HotSpotJDKDist%
111 echo does not exist, or the variable is not set.
112 echo.
113 goto usage
114
115 :test3
116 if not "%HOTSPOTMKSHOME%" == "" goto makedir
117 if exist c:\cygwin\bin set HOTSPOTMKSHOME=c:\cygwin\bin
118 if not "%HOTSPOTMKSHOME%" == "" goto makedir
119 echo Warning: please set variable HOTSPOTMKSHOME to place where
120 echo your MKS/Cygwin installation is
121 echo.
122 goto usage
123
124 :makedir
125 echo NOTE: Using the following settings:
126 echo HotSpotWorkSpace=%HotSpotWorkSpace%
127 echo HotSpotBuildSpace=%HotSpotBuildSpace%
128 echo HotSpotJDKDist=%HotSpotJDKDist%
129
130
131 REM This is now safe to do.
132 :copyfiles
133 for /D %%i in (compiler1, compiler2, tiered ) do (
134 if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
135 copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
136 )
137
138 REM force regneration of ProjectFile
139 if exist %ProjectFile% del %ProjectFile%
140
141 for /D %%i in (compiler1, compiler2, tiered ) do (
142 echo -- %%i --
143 echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
144 echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
145 echo # %ProjectFile% to be regenerated with the new values. Changing the >> %HotSpotBuildSpace%\%%i\local.make
146 echo # version requires rerunning create.bat. >> %HotSpotBuildSpace%\%%i\local.make
147 echo. >> %HotSpotBuildSpace%\%%i\local.make
148 echo Variant=%%i >> %HotSpotBuildSpace%\%%i\local.make
149 echo WorkSpace=%HotSpotWorkSpace% >> %HotSpotBuildSpace%\%%i\local.make
150 echo HOTSPOTWORKSPACE=%HotSpotWorkSpace% >> %HotSpotBuildSpace%\%%i\local.make
151 echo HOTSPOTBUILDROOT=%HotSpotBuildRoot% >> %HotSpotBuildSpace%\%%i\local.make
152 echo HOTSPOTBUILDSPACE=%HotSpotBuildSpace% >> %HotSpotBuildSpace%\%%i\local.make
153 echo HOTSPOTJDKDIST=%HotSpotJDKDist% >> %HotSpotBuildSpace%\%%i\local.make
154 echo ARCH=%ARCH% >> %HotSpotBuildSpace%\%%i\local.make
155 echo BUILDARCH=%BUILDARCH% >> %HotSpotBuildSpace%\%%i\local.make
156 echo Platform_arch=%Platform_arch% >> %HotSpotBuildSpace%\%%i\local.make
157 echo Platform_arch_model=%Platform_arch_model% >> %HotSpotBuildSpace%\%%i\local.make
158 echo MSC_VER=%MSC_VER% >> %HotSpotBuildSpace%\%%i\local.make
159
160 for /D %%j in (debug, fastdebug, product) do (
161 if NOT EXIST %HotSpotBuildSpace%\%%i\%%j mkdir %HotSpotBuildSpace%\%%i\%%j
162 )
163
164 pushd %HotSpotBuildSpace%\%%i\generated
165 nmake /nologo
166 popd
167
168 )
169
170 pushd %HotSpotBuildRoot%
171
172 REM It doesn't matter which variant we use here, "compiler1" is as good as any of the others - we need the common variables
173 nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\compiler1\local.make %ProjectFile%
174
175 popd
176
177 goto end
178
179 :usage
180 echo Usage: create HotSpotJDKDist
181 echo.
182 echo This is the VS build setup script (as opposed to the batch
183 echo build execution script). It creates a build directory if necessary,
184 echo copies the appropriate files out of the workspace into it, and
185 echo builds and runs ProjectCreator in it. This has the side-effect of creating
186 echo the %ProjectFile% file in the build space, which is then used in Visual C++.
187 echo.
188 echo The HotSpotJDKDist defines the JDK that should be used when running the JVM.
189 echo Environment variable FORCE_MSC_VER allows to override MSVC version autodetection.
190 echo.
191 echo NOTE that it is now NOT safe to modify any of the files in the build
192 echo space, since they may be overwritten whenever this script is run or
193 echo nmake is run in that directory.
|
1 @echo off
2 REM
3 REM Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
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
20 REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 REM or visit www.oracle.com if you need additional information or have any
22 REM questions.
23 REM
99 :test1
100 if exist %HotSpotBuildSpace% goto test2
101 if not "%HotSpotBuildSpace%" == "" mkdir %HotSpotBuildSpace%
102 if exist %HotSpotBuildSpace% goto test2
103 echo Error: directory pointed to by HotSpotBuildSpace
104 echo does not exist, or the variable is not set.
105 echo.
106 goto usage
107
108 :test2
109 if exist %HotSpotJDKDist% goto test3
110 echo Error: directory pointed to by %HotSpotJDKDist%
111 echo does not exist, or the variable is not set.
112 echo.
113 goto usage
114
115 :test3
116 if not "%HOTSPOTMKSHOME%" == "" goto makedir
117 if exist c:\cygwin\bin set HOTSPOTMKSHOME=c:\cygwin\bin
118 if not "%HOTSPOTMKSHOME%" == "" goto makedir
119 if exist c:\cygwin64\bin set HOTSPOTMKSHOME=c:\cygwin64\bin
120 if not "%HOTSPOTMKSHOME%" == "" goto makedir
121 echo Warning: please set variable HOTSPOTMKSHOME to place where
122 echo your MKS/Cygwin installation is
123 echo.
124 goto usage
125
126 :generatefiles
127 if NOT EXIST %HotSpotBuildSpace%\%1\generated mkdir %HotSpotBuildSpace%\%1\generated
128 copy %HotSpotWorkSpace%\make\windows\projectfiles\%1\* %HotSpotBuildSpace%\%1\generated > NUL
129
130 REM force regneration of ProjectFile
131 if exist %ProjectFile% del %ProjectFile%
132
133 echo -- %1 --
134 echo # Generated file! > %HotSpotBuildSpace%\%1\local.make
135 echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%1\local.make
136 echo # %ProjectFile% to be regenerated with the new values. Changing the >> %HotSpotBuildSpace%\%1\local.make
137 echo # version requires rerunning create.bat. >> %HotSpotBuildSpace%\%1\local.make
138 echo. >> %HotSpotBuildSpace%\%1\local.make
139 echo Variant=%1 >> %HotSpotBuildSpace%\%1\local.make
140 echo WorkSpace=%HotSpotWorkSpace% >> %HotSpotBuildSpace%\%1\local.make
141 echo HOTSPOTWORKSPACE=%HotSpotWorkSpace% >> %HotSpotBuildSpace%\%1\local.make
142 echo HOTSPOTBUILDROOT=%HotSpotBuildRoot% >> %HotSpotBuildSpace%\%1\local.make
143 echo HOTSPOTBUILDSPACE=%HotSpotBuildSpace% >> %HotSpotBuildSpace%\%1\local.make
144 echo HOTSPOTJDKDIST=%HotSpotJDKDist% >> %HotSpotBuildSpace%\%1\local.make
145 echo ARCH=%ARCH% >> %HotSpotBuildSpace%\%1\local.make
146 echo BUILDARCH=%BUILDARCH% >> %HotSpotBuildSpace%\%1\local.make
147 echo Platform_arch=%Platform_arch% >> %HotSpotBuildSpace%\%1\local.make
148 echo Platform_arch_model=%Platform_arch_model% >> %HotSpotBuildSpace%\%1\local.make
149 echo MSC_VER=%MSC_VER% >> %HotSpotBuildSpace%\%1\local.make
150
151 for /D %%j in (debug, fastdebug, product) do (
152 if NOT EXIST %HotSpotBuildSpace%\%1\%%j mkdir %HotSpotBuildSpace%\%1\%%j
153 )
154
155 pushd %HotSpotBuildSpace%\%1\generated
156 nmake /nologo
157 popd
158
159 goto :eof
160
161
162 :makedir
163 echo NOTE: Using the following settings:
164 echo HotSpotWorkSpace=%HotSpotWorkSpace%
165 echo HotSpotBuildSpace=%HotSpotBuildSpace%
166 echo HotSpotJDKDist=%HotSpotJDKDist%
167
168 echo COPYFILES %BUILDARCH%
169 call :generatefiles compiler1
170 call :generatefiles tiered
171
172 pushd %HotSpotBuildRoot%
173 REM It doesn't matter which variant we use here, "tiered" is as good as any of the others - we need the common variables
174 nmake /nologo /F %HotSpotWorkSpace%/make/windows/projectfiles/common/Makefile LOCAL_MAKE=%HotSpotBuildSpace%\tiered\local.make %ProjectFile%
175
176 popd
177
178 goto end
179
180 :usage
181 echo Usage: create HotSpotJDKDist
182 echo.
183 echo This is the VS build setup script (as opposed to the batch
184 echo build execution script). It creates a build directory if necessary,
185 echo copies the appropriate files out of the workspace into it, and
186 echo builds and runs ProjectCreator in it. This has the side-effect of creating
187 echo the %ProjectFile% file in the build space, which is then used in Visual C++.
188 echo.
189 echo The HotSpotJDKDist defines the JDK that should be used when running the JVM.
190 echo Environment variable FORCE_MSC_VER allows to override MSVC version autodetection.
191 echo.
192 echo NOTE that it is now NOT safe to modify any of the files in the build
193 echo space, since they may be overwritten whenever this script is run or
194 echo nmake is run in that directory.
|