duke@1: # ohair@158: # Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. duke@1: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: # duke@1: # This code is free software; you can redistribute it and/or modify it duke@1: # under the terms of the GNU General Public License version 2 only, as ohair@158: # published by the Free Software Foundation. Oracle designates this duke@1: # particular file as subject to the "Classpath" exception as provided ohair@158: # by Oracle in the LICENSE file that accompanied this code. duke@1: # duke@1: # This code is distributed in the hope that it will be useful, but WITHOUT duke@1: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: # version 2 for more details (a copy is included in the LICENSE file that duke@1: # accompanied this code). duke@1: # duke@1: # You should have received a copy of the GNU General Public License version duke@1: # 2 along with this work; if not, write to the Free Software Foundation, duke@1: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: # ohair@158: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@158: # or visit www.oracle.com if you need additional information or have any ohair@158: # questions. duke@1: # duke@1: duke@1: # duke@1: # Definitions for Linux. duke@1: # duke@1: duke@1: # Default for COMPILER_WARNINGS_FATAL on Linux (C & C++ compiler warnings) duke@1: ifndef COMPILER_WARNINGS_FATAL duke@1: COMPILER_WARNINGS_FATAL=false duke@1: endif duke@1: duke@1: # Linux should use parallel compilation for best build times duke@1: ifndef COMPILE_APPROACH duke@1: COMPILE_APPROACH = parallel duke@1: endif duke@1: duke@1: # Indication that we are doing an incremental build. duke@1: # This may trigger the creation of make depend files. duke@1: ifndef INCREMENTAL_BUILD duke@1: INCREMENTAL_BUILD = false duke@1: endif duke@1: duke@1: # FullPath just makes sure it never ends with a / and no duplicates duke@1: define FullPath duke@1: $(shell cd $1 2> $(DEV_NULL) && pwd) duke@1: endef duke@1: duke@1: # OptFullPath: Absolute path name of a dir that might not initially exist. duke@1: define OptFullPath duke@1: $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi) duke@1: endef duke@1: duke@1: # Location on system where jdk installs might be duke@1: USRJDKINSTANCES_PATH =/opt/java duke@1: duke@1: # UNIXCOMMAND_PATH: path to where the most common Unix commands are. duke@1: # NOTE: Must end with / so that it could be empty, allowing PATH usage. duke@1: ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined" duke@1: UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH)) duke@1: else duke@1: UNIXCOMMAND_PATH = /bin/ duke@1: endif duke@1: duke@1: # USRBIN_PATH: path to where the most common Unix commands are. duke@1: # NOTE: Must end with / so that it could be empty, allowing PATH usage. duke@1: ifneq "$(origin ALT_USRBIN_PATH)" "undefined" duke@1: USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH)) duke@1: else duke@1: USRBIN_PATH = /usr/bin/ duke@1: endif duke@1: duke@1: # UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found duke@1: # NOTE: Must end with / so that it could be empty, allowing PATH usage. duke@1: ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined" duke@1: UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH)) duke@1: else duke@1: UNIXCCS_PATH = /usr/ccs/bin/ duke@1: endif duke@1: duke@1: # SLASH_JAVA: location of all network accessable files duke@1: ifdef ALT_SLASH_JAVA duke@1: SLASH_JAVA :=$(ALT_SLASH_JAVA) duke@1: else duke@1: SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET) duke@1: endif duke@1: duke@1: # JDK_DEVTOOLS_DIR: common path for all the java devtools duke@1: ifdef ALT_JDK_DEVTOOLS_DIR duke@1: JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR) duke@1: else duke@1: JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools duke@1: endif duke@1: duke@1: # COMPILER_PATH: path to where the compiler and tools are installed. duke@1: # NOTE: Must end with / so that it could be empty, allowing PATH usage. duke@1: ifneq "$(origin ALT_COMPILER_PATH)" "undefined" duke@1: COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH)) duke@1: else duke@1: COMPILER_PATH =/usr/bin/ duke@1: endif duke@1: duke@1: # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.) duke@1: # NOTE: Must end with / so that it could be empty, allowing PATH usage. duke@1: ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined" duke@1: DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH)) duke@1: else duke@1: DEVTOOLS_PATH =/usr/bin/ duke@1: endif duke@1: duke@1: # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK. duke@1: # _BOOTDIR2: Second choice duke@1: ifndef ALT_BOOTDIR duke@1: _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH) duke@1: _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION) duke@1: endif duke@1: duke@1: # Import JDK images allow for partial builds, components not built are duke@1: # imported (or copied from) these import areas when needed. duke@1: duke@1: # BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for duke@1: # multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc. duke@1: ifdef ALT_BUILD_JDK_IMPORT_PATH duke@1: BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH)) duke@1: else duke@1: BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES) duke@1: endif duke@1: BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH) duke@1: duke@1: # JDK_IMPORT_PATH: location of JDK install tree (this version) to import duke@1: ifdef ALT_JDK_IMPORT_PATH duke@1: JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH)) duke@1: else duke@1: JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT) duke@1: endif duke@1: JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH) duke@1: