Mercurial > hg > truffle
annotate make/jprt.config @ 279:f3a650d8df24
6625846: Export system property java.version via jvmstat
Summary: java.version added to property_counters_ss array
Reviewed-by: swamyv
author | thurka |
---|---|
date | Thu, 14 Aug 2008 21:05:51 +0200 |
parents | d1605aabd0a1 |
children | 4852f4a82e58 |
rev | line source |
---|---|
0 | 1 #!echo "This is not a shell script" |
2 # | |
196 | 3 # Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. |
0 | 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 # | |
6 # This code is free software; you can redistribute it and/or modify it | |
7 # under the terms of the GNU General Public License version 2 only, as | |
8 # published by the Free Software Foundation. | |
9 # | |
10 # This code is distributed in the hope that it will be useful, but WITHOUT | |
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 # version 2 for more details (a copy is included in the LICENSE file that | |
14 # accompanied this code). | |
15 # | |
16 # You should have received a copy of the GNU General Public License version | |
17 # 2 along with this work; if not, write to the Free Software Foundation, | |
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
19 # | |
20 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
21 # CA 95054 USA or visit www.sun.com if you need additional information or | |
22 # have any questions. | |
23 # | |
24 # | |
25 | |
26 ############################################################################# | |
27 # Error | |
28 error() # message | |
29 { | |
30 echo "ERROR: $1" | |
31 exit 6 | |
32 } | |
33 # Directory must exist | |
34 dirMustExist() # dir name | |
35 { | |
36 if [ ! -d "$1" ] ; then | |
37 error "Directory for $2 does not exist: $1" | |
38 fi | |
39 } | |
40 # File must exist | |
41 fileMustExist() # dir name | |
42 { | |
43 if [ ! -f "$1" ] ; then | |
44 error "File for $2 does not exist: $1" | |
45 fi | |
46 } | |
47 ############################################################################# | |
48 | |
49 # Should be set by JPRT as the 3 basic inputs | |
50 bootdir="${ALT_BOOTDIR}" | |
51 slashjava="${ALT_SLASH_JAVA}" | |
52 jdk_import="${ALT_JDK_IMPORT_PATH}" | |
53 | |
54 # Check input | |
55 dirMustExist "${bootdir}" ALT_BOOTDIR | |
56 dirMustExist "${slashjava}" ALT_SLASH_JAVA | |
57 dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH | |
58 | |
59 # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise. | |
60 osname=`uname -s` | |
61 if [ "${osname}" = SunOS ] ; then | |
62 | |
63 # SOLARIS: Sparc or X86 | |
64 osarch=`uname -p` | |
65 if [ "${osarch}" = sparc ] ; then | |
66 solaris_arch=sparc | |
67 else | |
68 solaris_arch=i386 | |
69 fi | |
70 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
71 if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
72 compiler_name=${JPRT_SOLARIS_COMPILER_NAME} |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
73 else |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
74 if [ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6" -o \ |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
75 "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u10" -o \ |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
76 "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6perf" ] ; then |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
77 # All jdk6 builds use SS11 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
78 compiler_name=SS11 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
79 else |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
80 # FIXUP: Change to SS12 once it has been validated. |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
81 #compiler_name=SS12 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
82 compiler_name=SS11 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
83 fi |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
84 fi |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
85 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
86 # Get into path (make sure it matches ALT setting) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
0
diff
changeset
|
87 compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/${compiler_name}/bin |
0 | 88 dirMustExist "${compiler_path}" COMPILER_PATH |
89 path4sdk=${compiler_path} | |
90 | |
91 # Add basic solaris system paths | |
92 path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin | |
93 | |
94 # Get the previous JDK to be used to bootstrap the build | |
95 path4sdk=${bootdir}/bin:${path4sdk} | |
96 | |
97 # Find GNU make | |
98 make=/usr/sfw/bin/gmake | |
99 if [ ! -f ${make} ] ; then | |
100 make=/opt/sfw/bin/gmake | |
101 if [ ! -f ${make} ] ; then | |
102 make=${slashjava}/devtools/${solaris_arch}/bin/gnumake | |
103 fi | |
104 fi | |
105 fileMustExist "${make}" make | |
106 | |
107 # File creation mask | |
108 umask 002 | |
109 | |
110 elif [ "${osname}" = Linux ] ; then | |
111 | |
112 # LINUX: X86, AMD64 | |
113 osarch=`uname -m` | |
114 if [ "${osarch}" = i686 ] ; then | |
115 linux_arch=i586 | |
116 elif [ "${osarch}" = x86_64 ] ; then | |
117 linux_arch=amd64 | |
118 fi | |
119 | |
120 # Get the compilers into path (make sure it matches ALT setting) | |
121 compiler_path=/usr/bin | |
122 dirMustExist "${compiler_path}" COMPILER_PATH | |
123 path4sdk=${compiler_path} | |
124 | |
125 # Add basic paths | |
126 path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin | |
127 | |
128 # Get the previous JDK to be used to bootstrap the build | |
129 path4sdk=${bootdir}/bin:${path4sdk} | |
130 | |
131 # Find GNU make | |
132 make=/usr/bin/make | |
133 fileMustExist "${make}" make | |
134 | |
135 umask 002 | |
136 | |
137 else | |
138 | |
139 # Windows: Differs on CYGWIN vs. MKS, and the compiler available. | |
140 # Also, blanks in pathnames gives GNU make headaches, so anything placed | |
141 # in any ALT_* variable should be the short windows dosname. | |
142 | |
143 # WINDOWS: Install and use MKS or CYGWIN (should have already been done) | |
144 # Assumption here is that you are in a shell window via MKS or cygwin. | |
145 # MKS install should have defined the environment variable ROOTDIR. | |
146 # We also need to figure out which one we have: X86, AMD64 | |
147 if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then | |
148 windows_arch=amd64 | |
149 else | |
150 windows_arch=i586 | |
151 fi | |
152 | |
153 # We need to determine if we are running a CYGWIN shell or an MKS shell | |
154 # (if uname isn't available, then it will be unix_toolset=unknown) | |
155 unix_toolset=unknown | |
156 if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then | |
157 # We kind of assume ROOTDIR is where MKS is and it's ok | |
158 unix_toolset=MKS | |
159 mkshome=`dosname -s "${ROOTDIR}"` | |
160 # Utility to convert to short pathnames without spaces | |
161 dosname="${mkshome}/mksnt/dosname -s" | |
162 # Most unix utilities are in the mksnt directory of ROOTDIR | |
163 unixcommand_path="${mkshome}/mksnt" | |
164 path4sdk="${unixcommand_path}" | |
165 dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH | |
166 devtools_path="${slashjava}/devtools/win32/bin" | |
167 path4sdk="${devtools_path};${path4sdk}" | |
168 dirMustExist "${devtools_path}" DEVTOOLS_PATH | |
169 # Find GNU make | |
170 make="${devtools_path}/gnumake.exe" | |
171 fileMustExist "${make}" make | |
172 elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then | |
173 # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist | |
174 unix_toolset=CYGWIN | |
175 # Utility to convert to short pathnames without spaces | |
176 dosname="/usr/bin/cygpath -a -m -s" | |
177 # Most unix utilities are in the /usr/bin | |
178 unixcommand_path="/usr/bin" | |
179 path4sdk="${unixcommand_path}" | |
180 dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH | |
181 # Find GNU make | |
182 make="${unixcommand_path}/make.exe" | |
183 fileMustExist "${make}" make | |
184 else | |
185 echo "WARNING: Cannot figure out if this is MKS or CYGWIN" | |
186 fi | |
187 | |
188 # WINDOWS: Compiler setup (nasty part) | |
189 # NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE. | |
190 # NOTE: CYGWIN has a link.exe too, make sure the compilers are first | |
191 if [ "${windows_arch}" = i586 ] ; then | |
192 # 32bit Windows compiler settings | |
193 # VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined) | |
194 vs_root=`${dosname} "${VS71COMNTOOLS}/../.."` | |
195 # Fill in PATH, LIB, and INCLUDE (unset all others to make sure) | |
196 vc7_root="${vs_root}/Vc7" | |
197 compiler_path="${vc7_root}/bin" | |
198 platform_sdk="${vc7_root}/PlatformSDK" | |
199 # LIB and INCLUDE must use ; as a separator | |
200 include4sdk="${vc7_root}/atlmfc/include" | |
201 include4sdk="${include4sdk};${vc7_root}/include" | |
202 include4sdk="${include4sdk};${platform_sdk}/include/prerelease" | |
203 include4sdk="${include4sdk};${platform_sdk}/include" | |
204 include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include" | |
205 lib4sdk="${vc7_root}/atlmfc/lib" | |
206 lib4sdk="${lib4sdk};${vc7_root}/lib" | |
207 lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease" | |
208 lib4sdk="${lib4sdk};${platform_sdk}/lib" | |
209 lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib" | |
210 # Search path and DLL locating path | |
211 # WARNING: CYGWIN has a link.exe too, make sure compilers are first | |
212 path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}" | |
213 path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}" | |
214 path4sdk="${vs_root}/Common7/Tools;${path4sdk}" | |
215 path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}" | |
216 path4sdk="${vs_root}/Common7/IDE;${path4sdk}" | |
217 path4sdk="${compiler_path};${path4sdk}" | |
218 elif [ "${windows_arch}" = amd64 ] ; then | |
219 # AMD64 64bit Windows compiler settings | |
220 if [ "${MSSDK}" != "" ] ; then | |
221 platform_sdk="${MSSDK}" | |
222 else | |
223 platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"` | |
224 fi | |
225 compiler_path="${platform_sdk}/Bin/win64/x86/AMD64" | |
226 # LIB and INCLUDE must use ; as a separator | |
227 include4sdk="${platform_sdk}/Include" | |
228 include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys" | |
229 include4sdk="${include4sdk};${platform_sdk}/Include/mfc" | |
230 include4sdk="${include4sdk};${platform_sdk}/Include/atl" | |
231 include4sdk="${include4sdk};${platform_sdk}/Include/crt" | |
232 lib4sdk="${platform_sdk}/Lib/AMD64" | |
233 lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc" | |
234 # Search path and DLL locating path | |
235 # WARNING: CYGWIN has a link.exe too, make sure compilers are first | |
236 path4sdk="${platform_sdk}/bin;${path4sdk}" | |
237 path4sdk="${compiler_path};${path4sdk}" | |
238 fi | |
239 # Export LIB and INCLUDE | |
240 unset lib | |
241 unset Lib | |
242 LIB="${lib4sdk}" | |
243 export LIB | |
244 unset include | |
245 unset Include | |
246 INCLUDE="${include4sdk}" | |
247 export INCLUDE | |
248 # Set the ALT variable | |
249 dirMustExist "${compiler_path}" COMPILER_PATH | |
250 | |
251 # WINDOWS: Get the previous JDK to be used to bootstrap the build | |
252 path4sdk="${bootdir}/bin;${path4sdk}" | |
253 | |
254 # Turn all \\ into /, remove duplicates and trailing / | |
255 slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`" | |
256 | |
257 # For windows, it's hard to know where the system is, so we just add this | |
258 # to PATH. | |
259 path4sdk="${slash_path};${PATH}" | |
260 | |
261 # Convert path4sdk to cygwin style | |
262 if [ "${unix_toolset}" = CYGWIN ] ; then | |
263 path4sdk="`/usr/bin/cygpath -p ${path4sdk}`" | |
264 fi | |
265 | |
266 fi | |
267 | |
268 # Export PATH setting | |
269 PATH="${path4sdk}" | |
270 export PATH | |
271 | |
272 # Unset certain vars | |
273 unset LD_LIBRARY_PATH | |
274 unset LD_LIBRARY_PATH_32 | |
275 unset LD_LIBRARY_PATH_64 | |
276 |