Mercurial > hg > graal-compiler
annotate make/windows/build.bat @ 1322:21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
Summary: Clean up get_msc_ver, build.bat and build.make in general and for Cygwin.
Reviewed-by: ohair
author | dcubed |
---|---|
date | Tue, 16 Mar 2010 17:47:03 -0600 |
parents | d1605aabd0a1 |
children | 39e409a664b3 |
rev | line source |
---|---|
0 | 1 @echo off |
2 REM | |
196 | 3 REM Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. |
0 | 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
21 REM CA 95054 USA or visit www.sun.com if you need additional information or | |
22 REM have any questions. | |
23 REM | |
24 REM | |
25 | |
26 | |
27 REM | |
28 REM Since we don't have uname and we could be cross-compiling, | |
29 REM Use the compiler to determine which ARCH we are building | |
30 REM | |
31 cl 2>&1 | grep "IA-64" >NUL | |
32 if %errorlevel% == 0 goto isia64 | |
33 cl 2>&1 | grep "AMD64" >NUL | |
34 if %errorlevel% == 0 goto amd64 | |
35 set ARCH=x86 | |
36 set BUILDARCH=i486 | |
37 set Platform_arch=x86 | |
38 set Platform_arch_model=x86_32 | |
39 goto end | |
40 :amd64 | |
41 set LP64=1 | |
42 set ARCH=x86 | |
43 set BUILDARCH=amd64 | |
44 set Platform_arch=x86 | |
45 set Platform_arch_model=x86_64 | |
46 goto end | |
47 :isia64 | |
48 set LP64=1 | |
49 set ARCH=ia64 | |
50 set Platform_arch=ia64 | |
51 set Platform_arch_model=ia64 | |
52 :end | |
53 | |
54 if "%4" == "" goto usage | |
55 if not "%7" == "" goto usage | |
56 | |
57 if "%1" == "product" goto test1 | |
58 if "%1" == "debug" goto test1 | |
59 if "%1" == "fastdebug" goto test1 | |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
60 if "%1" == "tree" goto test1 |
0 | 61 goto usage |
62 | |
63 :test1 | |
64 if "%2" == "core" goto test2 | |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
65 if "%2" == "kernel" goto test2 |
0 | 66 if "%2" == "compiler1" goto test2 |
67 if "%2" == "compiler2" goto test2 | |
68 if "%2" == "tiered" goto test2 | |
69 if "%2" == "adlc" goto build_adlc | |
70 | |
71 goto usage | |
72 | |
73 :test2 | |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
74 if "%1" == "tree" goto build_tree |
0 | 75 REM check_j2se_version |
76 REM jvmti.make requires J2SE 1.4.x or newer. | |
77 REM If not found then fail fast. | |
78 %4\bin\javap javax.xml.transform.TransformerFactory >NUL | |
79 if %errorlevel% == 0 goto build | |
80 echo. | |
81 echo J2SE version found at %4\bin\java: | |
82 %4\bin\java -version | |
83 echo. | |
84 echo An XSLT processor (J2SE 1.4.x or newer) is required to | |
85 echo bootstrap this build | |
86 echo. | |
87 | |
88 goto usage | |
89 | |
90 :build | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
91 nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1 |
0 | 92 goto end |
93 | |
94 :build_adlc | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
95 nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1 |
0 | 96 goto end |
97 | |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
98 :build_tree |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
99 nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1 |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
100 goto end |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
101 |
0 | 102 :usage |
103 echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home] | |
104 echo. | |
105 echo where: | |
106 echo flavor is "product", "debug" or "fastdebug", | |
107 echo version is "core", "kernel", "compiler1", "compiler2", or "tiered", | |
108 echo workspace is source directory without trailing slash, | |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
109 echo bootstrap_dir is a full path to a JDK in which bin/java |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
110 echo and bin/javac are present and working, and build_id is an |
0 | 111 echo optional build identifier displayed by java -version |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
112 exit 1 |
0 | 113 |
114 :end | |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
196
diff
changeset
|
115 exit %errorlevel% |