changeset 46:10646cc7348c

Summary: Path corrections (utils & misc others) Reviewed By: glewis, xiaobin - Sync Defs.gmk with jdk version by defining PACKAGE_PATH and moving the X11_PATH definition to before including platform definitions. - Set DEVTOOLS_PATH to $(PACKAGE_PATH)/bin/ which is the correct location for tools that don't come preinstalled with the platform. - Sync USRJDKINSTANCES_PATH to match the corresponding jdk value. - Set up full paths to utils defined in Defs-utils.gmk for bsd with exceptions for OS_VENDOR differences.
author kurt
date Wed, 14 Jan 2009 16:58:04 -0500
parents 75576a3af8a1
children b694b3fa68d1
files make/common/Defs.gmk make/common/shared/Defs-bsd.gmk make/common/shared/Defs-utils.gmk
diffstat 3 files changed, 48 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs.gmk	Fri Dec 26 08:48:04 2008 -0800
+++ b/make/common/Defs.gmk	Wed Jan 14 16:58:04 2009 -0500
@@ -53,6 +53,24 @@
 
 _OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
 
+ifneq ($(PLATFORM), windows)
+  ifdef ALT_X11_PATH
+    X11_PATH = $(ALT_X11_PATH)
+  else
+    X11_PATH = /usr/X11R6
+  endif 
+
+  ifdef ALT_PACKAGE_PATH
+    PACKAGE_PATH = $(ALT_PACKAGE_PATH)
+  else
+    ifeq ($(PLATFORM), linux)
+      PACKAGE_PATH = /usr
+    else
+      PACKAGE_PATH = /usr/local
+    endif
+  endif
+endif
+
 #
 # Get platform definitions
 #
@@ -104,14 +122,6 @@
 
 LDLIBS_COMMON += $(EXTRA_LIBS)
 
-ifneq ($(PLATFORM), windows)
-  ifdef ALT_X11_PATH
-    X11_PATH = $(ALT_X11_PATH)
-  else
-    X11_PATH = /usr/X11R6
-  endif 
-endif
-
 #
 # Default is to build, not import native binaries
 #
--- a/make/common/shared/Defs-bsd.gmk	Fri Dec 26 08:48:04 2008 -0800
+++ b/make/common/shared/Defs-bsd.gmk	Wed Jan 14 16:58:04 2009 -0500
@@ -54,7 +54,7 @@
 endef
 
 # Location on system where jdk installs might be
-USRJDKINSTANCES_PATH =/usr/lock
+USRJDKINSTANCES_PATH =$(PACKAGE_PATH)
 
 # UNIXCOMMAND_PATH: path to where the most common Unix commands are.
 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
@@ -107,7 +107,7 @@
 ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
   DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
 else
-  DEVTOOLS_PATH =/usr/bin/
+  DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
 endif
 
 # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
--- a/make/common/shared/Defs-utils.gmk	Fri Dec 26 08:48:04 2008 -0800
+++ b/make/common/shared/Defs-utils.gmk	Wed Jan 14 16:58:04 2009 -0500
@@ -57,7 +57,7 @@
   UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
   UTILS_USR_BIN_PATH=$(USRBIN_PATH)
   UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
-  UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
+  UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
 endif
 
 ifeq ($(PLATFORM),solaris)
@@ -78,11 +78,7 @@
 ADB            = $(UTILS_COMMAND_PATH)adb
 AR             = $(UTILS_CCS_BIN_PATH)ar
 AS             = $(UTILS_CCS_BIN_PATH)as
-ifeq ($(PLATFORM),bsd)
-BASENAME       = $(UTILS_USR_BIN_PATH)basename
-else
 BASENAME       = $(UTILS_COMMAND_PATH)basename
-endif
 CAT            = $(UTILS_COMMAND_PATH)cat
 CHMOD          = $(UTILS_COMMAND_PATH)chmod
 CMP            = $(UTILS_USR_BIN_PATH)cmp
@@ -97,11 +93,7 @@
 DIRNAME        = $(UTILS_USR_BIN_PATH)dirname
 ECHO           = $(UTILS_COMMAND_PATH)echo
 EGREP          = $(UTILS_COMMAND_PATH)egrep
-ifeq ($(PLATFORM),bsd)
-EXPR           = $(UTILS_COMMAND_PATH)expr
-else
 EXPR           = $(UTILS_USR_BIN_PATH)expr
-endif
 FILE           = $(UTILS_USR_BIN_PATH)file
 FIND           = $(UTILS_USR_BIN_PATH)find
 FMT            = $(UTILS_COMMAND_PATH)fmt
@@ -132,11 +124,7 @@
 RPM            = $(UTILS_COMMAND_PATH)rpm
 RPMBUILD       = $(UTILS_COMMAND_PATH)rpmbuild
 SCCS           = $(UTILS_CCS_BIN_PATH)sccs
-ifeq ($(PLATFORM),bsd)
-SED            = $(UTILS_USR_BIN_PATH)sed
-else
 SED            = $(UTILS_COMMAND_PATH)sed
-endif
 SH             = $(UTILS_COMMAND_PATH)sh
 SHOWREV        = $(UTILS_USR_BIN_PATH)showrev
 SORT           = $(UTILS_COMMAND_PATH)sort
@@ -144,11 +132,7 @@
 TAIL           = $(UTILS_USR_BIN_PATH)tail
 TAR            = $(UTILS_COMMAND_PATH)tar
 TEST           = $(UTILS_USR_BIN_PATH)test
-ifeq ($(PLATFORM),bsd)
-TOUCH          = $(UTILS_USR_BIN_PATH)touch
-else
 TOUCH          = $(UTILS_COMMAND_PATH)touch
-endif
 TR             = $(UTILS_USR_BIN_PATH)tr
 TRUE           = $(UTILS_COMMAND_PATH)true
 UNAME          = $(UTILS_COMMAND_PATH)uname
@@ -223,6 +207,31 @@
 endif
 
 # BSD specific
-ifeq ($(SYSTEM_UNAME),Darwin)
-  NAWK = $(USRBIN_PATH)awk
+ifeq ($(PLATFORM),bsd)
+  BASENAME     = $(UTILS_USR_BIN_PATH)basename
+  EGREP        = $(UTILS_USR_BIN_PATH)egrep
+  EXPR         = $(UTILS_COMMAND_PATH)expr
+  FMT          = $(UTILS_USR_BIN_PATH)fmt
+  GREP         = $(UTILS_USR_BIN_PATH)grep
+  GUNZIP       = $(UTILS_USR_BIN_PATH)gunzip
+  ID           = $(UTILS_USR_BIN_PATH)id
+  MSGFMT       = $(UTILS_DEVTOOL_PATH)msgfmt
+  SED          = $(UTILS_USR_BIN_PATH)sed
+  SORT         = $(UTILS_USR_BIN_PATH)sort
+  TEST         = $(UTILS_COMMAND_PATH)test
+  TOUCH        = $(UTILS_USR_BIN_PATH)touch
+  TRUE         = $(UTILS_USR_BIN_PATH)true
+  UNAME        = $(UTILS_USR_BIN_PATH)uname
+  # BSD OS_VENDOR specific
+  ifeq ($(OS_VENDOR), Apple)
+    NAWK       = $(UTILS_USR_BIN_PATH)awk
+    UNZIPSFX   = $(UTILS_USR_BIN_PATH)unzipsfx
+    ZIPEXE     = $(UTILS_USR_BIN_PATH)zip
+  else
+    UNZIP      = $(UTILS_DEVTOOL_PATH)unzip
+  endif
+  ifneq ($(OS_VENDOR), OpenBSD)
+    CPIO       = $(UTILS_USR_BIN_PATH)cpio
+    TAR        = $(UTILS_USR_BIN_PATH)tar
+  endif
 endif