changeset 48:dd6765f87558

Merge
author tbell
date Mon, 17 Mar 2008 22:56:59 -0700
parents 547c14448b74 8ef9fd5c28fd
children 9ae056d2cffd
files
diffstat 12 files changed, 88 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-linux.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/Defs-linux.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -50,13 +50,13 @@
 CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
 
 ifndef PLATFORM_SRC
-  PLATFORM_SRC = $(JDK_TOPDIR)/src/solaris
+  PLATFORM_SRC = $(BUILDDIR)/../src/solaris
 endif # PLATFORM_SRC
 
 # Platform specific closed sources
 ifndef OPENJDK
   ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC = $(JDK_TOPDIR)/src/closed/solaris
+    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
   endif
 endif
 
--- a/make/common/Defs-solaris.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/Defs-solaris.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -45,13 +45,13 @@
 include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
 
 ifndef PLATFORM_SRC
-PLATFORM_SRC = $(JDK_TOPDIR)/src/solaris
+PLATFORM_SRC = $(BUILDDIR)/../src/solaris
 endif # PLATFORM_SRC
 
 # Platform specific closed sources
 ifndef OPENJDK
   ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC = $(JDK_TOPDIR)/src/closed/solaris
+    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
   endif
 endif
 
--- a/make/common/Defs-windows.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/Defs-windows.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -51,13 +51,13 @@
 endif # LIB_LOCATION
 
 ifndef PLATFORM_SRC
-  PLATFORM_SRC  = $(JDK_TOPDIR)/src/windows
+  PLATFORM_SRC  = $(BUILDDIR)/../src/windows
 endif # PLATFORM_SRC
 
 # Platform specific closed sources
 ifndef OPENJDK
   ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC  = $(JDK_TOPDIR)/src/closed/windows
+    CLOSED_PLATFORM_SRC  = $(BUILDDIR)/../src/closed/windows
   endif
 endif
 
@@ -367,7 +367,7 @@
 endif
 
 # Settings for the VERSIONINFO tap on windows. 
-VERSIONINFO_RESOURCE = $(JDK_TOPDIR)/src/windows/resource/version.rc
+VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
 
 ifneq ($(JDK_BUILD_NUMBER),)
  COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
--- a/make/common/Defs.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/Defs.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -41,7 +41,15 @@
 SUN_MAKE_TEST:sh = echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
 
 ifndef JDK_TOPDIR
-  JDK_TOPDIR=$(BUILDDIR)/..
+  ifdef BUILDDIR
+    JDK_TOPDIR=$(BUILDDIR)/..
+  else
+    JDK_TOPDIR:=$(error "ERROR: Cannot define top of jdk repository")
+  endif
+endif
+ifndef BUILDDIR
+  # Hack, due to deploy repository using this file.
+  BUILDDIR=$(JDK_TOPDIR)/make
 endif
 ifndef JDK_MAKE_SHARED_DIR
   JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
@@ -59,13 +67,13 @@
 # there yet.
 #
 ifndef SHARE_SRC
-  SHARE_SRC    = $(JDK_TOPDIR)/src/share
+  SHARE_SRC    = $(BUILDDIR)/../src/share
 endif
 
 # Files that cannot be included in the OpenJDK distribution are
 # collected under a parent directory which contains just those files.
 ifndef CLOSED_SRC
-  CLOSED_SRC  = $(JDK_TOPDIR)/src/closed
+  CLOSED_SRC  = $(BUILDDIR)/../src/closed
 endif
 
 # If we have no closed directory, force it to an openjdk build
@@ -170,14 +178,6 @@
   endif
 endif # OPENJDK
 
-# Default output directory
-ifdef OPENJDK
-_OUTPUTDIR=$(JDK_TOPDIR)/build/$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
-else
-_OUTPUTDIR=$(JDK_TOPDIR)/build/$(PLATFORM)-$(ARCH)
-endif
-
-
 #
 # Get platform definitions
 #
--- a/make/common/shared/Defs-control.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/shared/Defs-control.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -36,7 +36,7 @@
 endif
 
 ifndef CONTROL_TOPDIR
-  CONTROL_TOPDIR=$(TOPDIR)/control
+  CONTROL_TOPDIR=$(TOPDIR)
 endif
 ifndef HOTSPOT_TOPDIR
   HOTSPOT_TOPDIR=$(TOPDIR)/hotspot
@@ -70,7 +70,8 @@
 include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
 
 # Default output directory
-_OUTPUTDIR=$(CONTROL_TOPDIR)/build/$(PLATFORM)-$(ARCH)
+BUILD_PARENT_DIRECTORY=$(TOPDIR)
+_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
 
 # Get platform specific settings
 include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
--- a/make/common/shared/Defs.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/shared/Defs.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -55,7 +55,10 @@
 
 # Simple pwd path
 define PwdPath
-$(shell cd $1 2> $(DEV_NULL) && pwd)
+$(shell $(CD) $1 2> $(DEV_NULL) && $(PWD))
+endef
+define AbsPwdPathCheck
+$(shell $(CD) .. 2> $(DEV_NULL) && $(CD) $1 2> $(DEV_NULL) && $(PWD))
 endef
 
 # Checks an ALT value for spaces (should be one word), 
@@ -422,23 +425,54 @@
 CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE)
 
 # OUTPUTDIR: Location of all output for the build
-_BACKUP_OUTPUTDIR = $(TEMP_DISK)/$(USER)/jdk-outputdir
 ifdef ALT_OUTPUTDIR
-  _POSSIBLE_OUTPUTDIR =$(subst \,/,$(ALT_OUTPUTDIR))
+  OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR))
+  # Assumes this is absolute (checks later)
+  ABS_OUTPUTDIR:=$(OUTPUTDIR)
 else
   ifndef _OUTPUTDIR
-    _OUTPUTDIR = $(_BACKUP_OUTPUTDIR)
+    # Default:  Get "build" parent directory, which should always exist
+    ifndef BUILD_PARENT_DIRECTORY
+      BUILD_PARENT_DIRECTORY=$(BUILDDIR)/..
+    endif
+    ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY))
+    ifdef OPENJDK
+      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
+    else
+      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)
+    endif
+    _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
+    ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
   endif
-  _POSSIBLE_OUTPUTDIR =$(_OUTPUTDIR)
+  OUTPUTDIR:=$(_OUTPUTDIR)
 endif
-_create_outputdir1:=$(shell mkdir -p $(_POSSIBLE_OUTPUTDIR) > $(DEV_NULL) 2>&1)
-OUTPUTDIR:=$(call WriteDirExists,$(_POSSIBLE_OUTPUTDIR),$(_BACKUP_OUTPUTDIR))
-_create_outputdir2:=$(shell mkdir -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1)
-ifeq "$(OUTPUTDIR)" "$(_BACKUP_OUTPUTDIR)"
-  _outputdir_warning:=$(warning "WARNING: OUTPUTDIR '$(_POSSIBLE_OUTPUTDIR)' not writable, will use '$(_BACKUP_OUTPUTDIR)'")
-endif
+# Check for spaces and null value
 OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
 OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
+# Create the output directory and make sure it exists and is writable
+_create_outputdir:=$(shell $(MKDIR) -p "$(OUTPUTDIR)" > $(DEV_NULL) 2>&1)
+ifeq ($(call WriteDirExists,$(OUTPUTDIR),/dev/null),/dev/null)
+  _outputdir_error:=$(error "ERROR: OUTPUTDIR '$(OUTPUTDIR)' not created or not writable")
+endif
+# Define absolute path if needed and check for spaces and null value
+ifndef ABS_OUTPUTDIR
+  ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
+endif
+ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR)
+ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR)
+# Make doubly sure this is a full path
+ifeq ($(call AbsPwdPathCheck,$(ABS_OUTPUTDIR)), )
+  ifdef ALT_OUTPUTDIR
+    _outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)', was ALT_OUTPUTDIR '$(ALT_OUTPUTDIR)' an absolute path?")
+  else
+    _outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)'")
+  endif
+endif
+_dir1:=$(call FullPath,$(ABS_OUTPUTDIR))
+_dir2:=$(call FullPath,$(OUTPUTDIR))
+ifneq ($(_dir1),$(_dir2))
+  _outputdir_error:=$(error "ERROR: ABS_OUTPUTDIR '$(ABS_OUTPUTDIR)' is not the same directory as OUTPUTDIR '$(OUTPUTDIR)', '$(_dir1)'!='$(_dir2)'")
+endif
 
 # Bin directory
 #   NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64
@@ -475,9 +509,6 @@
   COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
 endif
 
-# Absolute path to output directory
-ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
-
 # Get shared compiler settings
 include $(JDK_MAKE_SHARED_DIR)/Compiler.gmk
 
--- a/make/common/shared/Platform.gmk	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/common/shared/Platform.gmk	Mon Mar 17 22:56:59 2008 -0700
@@ -93,20 +93,18 @@
 # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
 REQUIRED_BOOT_VER = 1.5
 
-#This is specific to OpenJDK build
-ifdef OPENJDK
-  REQUIRED_FREETYPE_VERSION=2.3.0
-endif
+# If we are using freetype, this is the required version
+REQUIRED_FREETYPE_VERSION=2.3.0
 
 #
 # Prune out all known SCM (Source Code Management) directories
 # so they will not be included when copying directory trees
 # or packaging up .jar files, etc.  This applies to all workspaces.
 #
-SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files
+SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags
 # When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
-SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files"
-SCM_DIRS_prune = \( -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS -o -name Codemgr_wsdata -o -name deleted_files \) -prune
+SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files|.hgignore|.hgtags"
+SCM_DIRS_prune = \( -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS -o -name Codemgr_wsdata -o -name deleted_files -o -name .hgignore -o -name .hgtags \) -prune
 
 # Don't define this unless it's not defined
 ifndef VARIANT
--- a/make/java/nio/Makefile	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/java/nio/Makefile	Mon Mar 17 22:56:59 2008 -0700
@@ -191,7 +191,7 @@
 
 GEN_BUFFER_SH = genBuffer.sh
 
-GEN_BUFFER_CMD = SPP="$(SPP_CMD)" NAWK=$(NAWK) SED=$(SED) \
+GEN_BUFFER_CMD = SPP="$(SPP_CMD)" NAWK=$(NAWK) SED=$(SED) SH=$(SH) \
                  $(SH) $(GEN_BUFFER_SH)
 
 # Public abstract buffer classes
@@ -582,7 +582,7 @@
 
 GEN_CODER_SH = genCoder.sh
 
-GEN_CODER_CMD = SPP="$(SPP_CMD)" SED=$(SED) NAWK=$(NAWK) $(SH) $(GEN_CODER_SH)
+GEN_CODER_CMD = SPP="$(SPP_CMD)" SED=$(SED) NAWK=$(NAWK) SH=$(SH) $(SH) $(GEN_CODER_SH)
 
 $(CS_GEN)/CharsetDecoder.java: $(CS_SRC)/Charset-X-Coder.java $(GEN_CODER_SH)
 	$(prep-target)
@@ -602,7 +602,7 @@
 
 GEN_EX_SH = genExceptions.sh
  
-GEN_EX_CMD = NAWK=$(NAWK) $(SHELL) $(GEN_EX_SH)
+GEN_EX_CMD = NAWK=$(NAWK) SH=$(SH) $(SH) $(GEN_EX_SH)
 
 $(CH_GEN)/%Exception.java: genExceptions.sh $(CH_SRC)/exceptions
 	$(prep-target)
@@ -635,8 +635,8 @@
     $(HASHER_JARFILE) $(SCS_SRC)/standard-charsets
 	$(prep-target)
 	@$(RM) $@.temp
-	NAWK=$(NAWK) TEMPDIR=$(TEMPDIR) \
+	NAWK=$(NAWK) TEMPDIR=$(TEMPDIR) SH=$(SH) \
 	  HASHER="$(BOOT_JAVA_CMD) -jar $(HASHER_JARFILE)" \
-	  $(SHELL) -e genCharsetProvider.sh $(SCS_SRC)/standard-charsets $(SCS_GEN)
+	  $(SH) -e genCharsetProvider.sh $(SCS_SRC)/standard-charsets $(SCS_GEN)
 
 .PHONY: sources 
--- a/make/java/nio/genCharsetProvider.sh	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/java/nio/genCharsetProvider.sh	Mon Mar 17 22:56:59 2008 -0700
@@ -48,7 +48,7 @@
 # Header
 #
 
-$SHELL addNotices.sh "$COPYRIGHT_YEARS" > $OUT
+$SH ./addNotices.sh "$COPYRIGHT_YEARS" > $OUT
 
 cat <<__END__ >>$OUT
 
--- a/make/java/nio/genExceptions.sh	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/java/nio/genExceptions.sh	Mon Mar 17 22:56:59 2008 -0700
@@ -41,7 +41,7 @@
   echo '-->' $DST/$ID.java
   out=$DST/${ID}.java
 
-  $SHELL addNotices.sh "$COPYRIGHT_YEARS" > $out
+  $SH ./addNotices.sh "$COPYRIGHT_YEARS" > $out
 
 cat >>$out <<__END__
 
--- a/make/tools/freetypecheck/Makefile	Fri Mar 14 14:21:03 2008 -0700
+++ b/make/tools/freetypecheck/Makefile	Mon Mar 17 22:56:59 2008 -0700
@@ -38,7 +38,14 @@
 
 all: $(FT_TEST_PATH)
 
-FT_OPTIONS  = -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
+# Start with CFLAGS (which gets us the required -xarch setting on solaris)
+ifeq ($(PLATFORM), windows)
+  FT_OPTIONS  =
+else
+  FT_OPTIONS  = $(CFLAGS)
+endif
+
+FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
 FT_OPTIONS += $(XARCH)
 
 #add runtime library search path
--- a/src/solaris/hpi/native_threads/src/sys_api_td.c	Fri Mar 14 14:21:03 2008 -0700
+++ b/src/solaris/hpi/native_threads/src/sys_api_td.c	Mon Mar 17 22:56:59 2008 -0700
@@ -63,15 +63,8 @@
 #define CLOSEIO
 #endif /* NO_INTERRUPTIBLE_IO */
 
-/*
- * Linux <sys/resource.h> does not define rlim_t (solaris
- * does). THIS IS PROBABLY NOT THE RIGHT THING TO DO, so
- * somebody please fix this.
- */
-#ifdef __linux__
-typedef int rlim_t ;
-#endif
-
+/* Get typedef for rlim_t */
+#include <sys/resource.h>
 
 #ifdef CLOSEIO