source: trunk/openjdk/jdk/make/common/shared/Defs-os2.gmk

Last change on this file was 443, checked in by dmik, 9 years ago

Adjust the makefiles to RPM/YUM UNIXROOT toolchain.

It should still be possible to build OpenJDK w/o RPM/YUM or
UNIXROOT by having manual configuration variable assigments
and binary tools installation but this setup is no longer
supported by us (and therefore all binary tools are
removed from SVN). Note that the RPM environment usually
contains much more recent versions of all utilities needed
for the build.

  • Property svn:executable set to *
File size: 9.3 KB
Line 
1#
2# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2010 netlabs.org. OS/2 parts
6#
7# This code is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 2 only, as
9# published by the Free Software Foundation. Sun designates this
10# particular file as subject to the "Classpath" exception as provided
11# by Sun in the LICENSE file that accompanied this code.
12#
13# This code is distributed in the hope that it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16# version 2 for more details (a copy is included in the LICENSE file that
17# accompanied this code).
18#
19# You should have received a copy of the GNU General Public License version
20# 2 along with this work; if not, write to the Free Software Foundation,
21# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22#
23# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
24# CA 95054 USA or visit www.sun.com if you need additional information or
25# have any questions.
26#
27
28#
29# Definitions for OS/2.
30#
31
32# Default for COMPILER_WARNINGS_FATAL on OS/2 (C++ compiler warnings)
33# Level: Default is 3, 0 means none, 4 is the most but may be unreliable
34# Some makefiles may have set this to 0 to turn off warnings completely,
35# which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
36# Program.gmk may turn this down to 2 (building .exe's).
37ifndef COMPILER_WARNING_LEVEL
38 COMPILER_WARNING_LEVEL=3
39endif
40ifndef COMPILER_WARNINGS_FATAL
41 COMPILER_WARNINGS_FATAL=false
42endif
43
44# OS/2 should use parallel compilation for best build times
45ifndef COMPILE_APPROACH
46 COMPILE_APPROACH = normal
47endif
48
49# Indication that we are doing an incremental build.
50# This may trigger the creation of make depend files.
51ifndef INCREMENTAL_BUILD
52 INCREMENTAL_BUILD = false
53endif
54
55# FullPath just makes sure it never ends with a / and no duplicates
56define FullPath
57$(shell cd $1 2> $(DEV_NULL) && pwd)
58endef
59
60# OptFullPath: Absolute path name of a dir that might not initially exist.
61define OptFullPath
62$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
63endef
64
65# System drive
66ifdef SYSTEM_INI
67 _system_drive :=$(firstword $(subst :, ,$(SYSTEM_INI))):
68endif
69_system_drive:=$(call CheckValue,_system_drive,C:)
70
71# Location on system where jdk installs might be
72ifndef PROGRAMS
73 USRJDKINSTANCES_PATH :="$(subst \,/,$(PROGRAMS))"
74else
75 USRJDKINSTANCES_PATH :=$(_system_drive)/
76endif
77USRJDKINSTANCES_PATH := $(call FullPath,$(USRJDKINSTANCES_PATH))
78
79# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
80# NOTE: Must end with / so that it could be empty, allowing PATH usage.
81ifdef ALT_UNIXCOMMAND_PATH
82 xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
83 fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
84 UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
85else
86 ifdef UNIXROOT
87 # assume UNIXROOT is properly set (note: /bin is not used on OS/2)
88 UNIXCOMMAND_PATH := $(subst \,/,$(UNIXROOT)/usr/bin/)
89 else
90 # assume commands are in PATH
91 UNIXCOMMAND_PATH :=
92 endif
93endif
94UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
95
96# USRBIN_PATH: path to where the most common Unix commands are.
97# NOTE: Must end with / so that it could be empty, allowing PATH usage.
98ifdef ALT_USRBIN_PATH
99 xALT_USRBIN_PATH :="$(subst \,/,$(ALT_USRBIN_PATH))"
100 fxALT_USRBIN_PATH :=$(call FullPath,$(xALT_USRBIN_PATH))
101 USRBIN_PATH :=$(call PrefixPath,$(fxALT_USRBIN_PATH))
102else
103 ifdef UNIXROOT
104 # assume UNIXROOT is properly set
105 USRBIN_PATH := $(subst \,/,$(UNIXROOT)/usr/bin/)
106 else
107 # assume commands are in PATH
108 USRBIN_PATH :=
109 endif
110endif
111USRBIN_PATH:=$(call AltCheckSpaces,USRBIN_PATH)
112
113# SLASH_JAVA: location of all network accessable files
114ifdef ALT_SLASH_JAVA
115 xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
116 SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA))
117else
118 ifdef ALT_JDK_JAVA_DRIVE
119 SLASH_JAVA =$(JDK_JAVA_DRIVE)
120 else
121 SLASH_JAVA =J:
122 endif
123endif
124SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
125SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
126
127# JDK_DEVTOOLS_DIR: common path for all the java devtools
128ifdef ALT_JDK_DEVTOOLS_DIR
129 xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
130 JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
131else
132 JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
133endif
134JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
135JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
136
137# COMPILER_PATH: path to where the compiler and tools are installed.
138# NOTE: Must end with / so that it could be empty, allowing PATH usage.
139ifdef ALT_COMPILER_PATH
140 xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
141 fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
142 COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
143else
144 COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
145endif
146COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
147
148# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
149# NOTE: Must end with / so that it could be empty, allowing PATH usage.
150ifdef ALT_DEVTOOLS_PATH
151 xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
152 fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
153 DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
154else
155 DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
156endif
157DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
158
159# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
160# _BOOTDIR2: Second choice
161ifndef ALT_BOOTDIR
162 _BOOTDIR1 =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
163 _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
164endif
165
166# ODINSDK_HEADERS_PATH: Include directory of Odin32 SDK (OS/2)
167ifdef ALT_ODINSDK_HEADERS_PATH
168 xALT_ODINSDK_HEADERS_PATH :="$(subst \,/,$(ALT_ODINSDK_HEADERS_PATH))"
169 ODINSDK_HEADERS_PATH :=$(call FullPath,$(xALT_ODINSDK_HEADERS_PATH))
170endif
171ODINSDK_HEADERS_PATH :=$(call AltCheckSpaces,ODINSDK_HEADERS_PATH)
172ODINSDK_HEADERS_PATH :=$(call AltCheckValue,ODINSDK_HEADERS_PATH)
173
174# ODINSDK_LIB_PATH: Library directory of Odin32 SDK (OS/2)
175ifdef ALT_ODINSDK_LIB_PATH
176 xALT_ODINSDK_LIB_PATH :="$(subst \,/,$(ALT_ODINSDK_LIB_PATH))"
177 ODINSDK_LIB_PATH :=$(call FullPath,$(xALT_ODINSDK_LIB_PATH))
178endif
179ODINSDK_LIB_PATH :=$(call AltCheckSpaces,ODINSDK_LIB_PATH)
180ODINSDK_LIB_PATH :=$(call AltCheckValue,ODINSDK_LIB_PATH)
181
182# ODINSDK_DBGLIB_PATH: Debug Library directory of Odin32 SDK (OS/2)
183ifdef ALT_ODINSDK_DBGLIB_PATH
184 xALT_ODINSDK_DBGLIB_PATH :="$(subst \,/,$(ALT_ODINSDK_DBGLIB_PATH))"
185 ODINSDK_DBGLIB_PATH :=$(call FullPath,$(xALT_ODINSDK_DBGLIB_PATH))
186endif
187ODINSDK_DBGLIB_PATH :=$(call AltCheckSpaces,ODINSDK_DBGLIB_PATH)
188ODINSDK_DBGLIB_PATH :=$(call AltCheckValue,ODINSDK_DBGLIB_PATH)
189
190# Import JDK images allow for partial builds, components not built are
191# imported (or copied from) these import areas when needed.
192
193# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
194# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
195ifdef ALT_BUILD_JDK_IMPORT_PATH
196 BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
197else
198 BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
199endif
200BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
201BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
202
203# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
204ifdef ALT_JDK_IMPORT_PATH
205 JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
206else
207 JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
208endif
209JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
210JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
211
212# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
213ifdef ALT_HOTSPOT_IMPORT_PATH
214 HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
215else
216 HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
217endif
218HOTSPOT_IMPORT_PATH:=$(call AltCheckSpaces,HOTSPOT_IMPORT_PATH)
219HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
220
221# HOTSPOT_CLIENT_PATH: location of client jvm library file.
222ifeq ($(ARCH_DATA_MODEL), 32)
223 ifdef ALT_HOTSPOT_CLIENT_PATH
224 HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
225 else
226 HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
227 endif
228 HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
229 HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
230endif
231
232# HOTSPOT_SERVER_PATH: location of server jvm library file.
233ifdef ALT_HOTSPOT_SERVER_PATH
234 HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
235else
236 HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
237endif
238HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
239HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
240
241# HOTSPOT_LIB_PATH: location of jvm.lib file.
242ifdef ALT_HOTSPOT_LIB_PATH
243 xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
244 HOTSPOT_LIB_PATH :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
245else
246 HOTSPOT_LIB_PATH =$(HOTSPOT_IMPORT_PATH)/lib
247endif
248HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
249HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)
250
Note: See TracBrowser for help on using the repository browser.