Merge jdk8-b97

Tue, 02 Jul 2013 15:55:14 -0700

author
katleman
date
Tue, 02 Jul 2013 15:55:14 -0700
changeset 757
a1c1e8bf71f3
parent 749
4c363b94ea2a
parent 756
b2b87e9e8683
child 758
99ad803f8c4e

Merge

     1.1 --- a/NewMakefile.gmk	Thu Jun 27 13:40:12 2013 -0700
     1.2 +++ b/NewMakefile.gmk	Tue Jul 02 15:55:14 2013 -0700
     1.3 @@ -68,12 +68,15 @@
     1.4          # First, find out the valid targets
     1.5          # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
     1.6          # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
     1.7 -        all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
     1.8 -            $(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \
     1.9 +        all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
    1.10 +            $(MAKE) -p -q -f common/makefiles/Main.gmk SPEC=$(firstword $(SPEC)) | \
    1.11              grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
    1.12  
    1.13 -$(all_phony_targets):
    1.14 -	@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
    1.15 +        $(all_phony_targets):
    1.16 +		$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
    1.17 +			$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
    1.18 +
    1.19 +        .PHONY: $(all_phony_targets)
    1.20  
    1.21      endif
    1.22  endif
     2.1 --- a/common/autoconf/basics.m4	Thu Jun 27 13:40:12 2013 -0700
     2.2 +++ b/common/autoconf/basics.m4	Tue Jul 02 15:55:14 2013 -0700
     2.3 @@ -43,6 +43,16 @@
     2.4      fi
     2.5  ])
     2.6  
     2.7 +# Appends a string to a path variable, only adding the : when needed.
     2.8 +AC_DEFUN([BASIC_APPEND_TO_PATH],
     2.9 +[
    2.10 +  if test "x[$]$1" = x; then
    2.11 +    $1="$2"
    2.12 +  else
    2.13 +    $1="[$]$1:$2"
    2.14 +  fi
    2.15 +])
    2.16 +
    2.17  # This will make sure the given variable points to a full and proper
    2.18  # path. This means:
    2.19  # 1) There will be no spaces in the path. On posix platforms,
    2.20 @@ -351,7 +361,9 @@
    2.21  AC_SUBST(SYS_ROOT)
    2.22  
    2.23  AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
    2.24 -  [search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
    2.25 +  [search this directory for compilers and tools (for cross-compiling)])], 
    2.26 +  [TOOLS_DIR=$with_tools_dir]
    2.27 +)
    2.28  
    2.29  AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
    2.30    [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
    2.31 @@ -359,17 +371,14 @@
    2.32      if test "x$with_sys_root" != x; then
    2.33        AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
    2.34      fi
    2.35 -    if test "x$with_tools_dir" != x; then
    2.36 -      AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
    2.37 -    fi
    2.38 -    TOOLS_DIR=$with_devkit/bin
    2.39 +    BASIC_FIXUP_PATH([with_devkit])
    2.40 +    BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
    2.41      if test -d "$with_devkit/$host_alias/libc"; then
    2.42        SYS_ROOT=$with_devkit/$host_alias/libc
    2.43      elif test -d "$with_devkit/$host/sys-root"; then
    2.44        SYS_ROOT=$with_devkit/$host/sys-root
    2.45      fi
    2.46    ])
    2.47 -
    2.48  ])
    2.49  
    2.50  AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
    2.51 @@ -612,6 +621,14 @@
    2.52  AC_PATH_PROG(HG, hg)
    2.53  AC_PATH_PROG(STAT, stat)
    2.54  AC_PATH_PROG(TIME, time)
    2.55 +# Check if it's GNU time
    2.56 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
    2.57 +if test "x$IS_GNU_TIME" != x; then
    2.58 +  IS_GNU_TIME=yes
    2.59 +else
    2.60 +  IS_GNU_TIME=no
    2.61 +fi
    2.62 +AC_SUBST(IS_GNU_TIME)
    2.63  
    2.64  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
    2.65    BASIC_REQUIRE_PROG(COMM, comm)
     3.1 --- a/common/autoconf/generated-configure.sh	Thu Jun 27 13:40:12 2013 -0700
     3.2 +++ b/common/autoconf/generated-configure.sh	Tue Jul 02 15:55:14 2013 -0700
     3.3 @@ -799,6 +799,7 @@
     3.4  PKG_CONFIG
     3.5  CODESIGN
     3.6  XATTR
     3.7 +IS_GNU_TIME
     3.8  TIME
     3.9  STAT
    3.10  HG
    3.11 @@ -3083,6 +3084,9 @@
    3.12  # Also set JVM_ARG_OK to true/false depending on outcome.
    3.13  
    3.14  
    3.15 +# Appends a string to a path variable, only adding the : when needed.
    3.16 +
    3.17 +
    3.18  # This will make sure the given variable points to a full and proper
    3.19  # path. This means:
    3.20  # 1) There will be no spaces in the path. On posix platforms,
    3.21 @@ -3782,7 +3786,7 @@
    3.22  #CUSTOM_AUTOCONF_INCLUDE
    3.23  
    3.24  # Do not change or remove the following line, it is needed for consistency checks:
    3.25 -DATE_WHEN_GENERATED=1371547824
    3.26 +DATE_WHEN_GENERATED=1372770384
    3.27  
    3.28  ###############################################################################
    3.29  #
    3.30 @@ -7457,6 +7461,7 @@
    3.31  # Check whether --with-tools-dir was given.
    3.32  if test "${with_tools_dir+set}" = set; then :
    3.33    withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
    3.34 +
    3.35  fi
    3.36  
    3.37  
    3.38 @@ -7467,10 +7472,135 @@
    3.39      if test "x$with_sys_root" != x; then
    3.40        as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
    3.41      fi
    3.42 -    if test "x$with_tools_dir" != x; then
    3.43 -      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
    3.44 -    fi
    3.45 -    TOOLS_DIR=$with_devkit/bin
    3.46 +
    3.47 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    3.48 +
    3.49 +  # Input might be given as Windows format, start by converting to
    3.50 +  # unix format.
    3.51 +  path="$with_devkit"
    3.52 +  new_path=`$CYGPATH -u "$path"`
    3.53 +
    3.54 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
    3.55 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
    3.56 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
    3.57 +  # "foo.exe" is OK but "foo" is an error.
    3.58 +  #
    3.59 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
    3.60 +  # It is also a way to make sure we got the proper file name for the real test later on.
    3.61 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
    3.62 +  if test "x$test_shortpath" = x; then
    3.63 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
    3.64 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
    3.65 +    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
    3.66 +  fi
    3.67 +
    3.68 +  # Call helper function which possibly converts this using DOS-style short mode.
    3.69 +  # If so, the updated path is stored in $new_path.
    3.70 +
    3.71 +  input_path="$new_path"
    3.72 +  # Check if we need to convert this using DOS-style short mode. If the path
    3.73 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
    3.74 +  # take no chances and rewrite it.
    3.75 +  # Note: m4 eats our [], so we need to use [ and ] instead.
    3.76 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
    3.77 +  if test "x$has_forbidden_chars" != x; then
    3.78 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    3.79 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    3.80 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    3.81 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
    3.82 +      # Going to short mode and back again did indeed matter. Since short mode is
    3.83 +      # case insensitive, let's make it lowercase to improve readability.
    3.84 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    3.85 +      # Now convert it back to Unix-stile (cygpath)
    3.86 +      input_path=`$CYGPATH -u "$shortmode_path"`
    3.87 +      new_path="$input_path"
    3.88 +    fi
    3.89 +  fi
    3.90 +
    3.91 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
    3.92 +  if test "x$test_cygdrive_prefix" = x; then
    3.93 +    # As a simple fix, exclude /usr/bin since it's not a real path.
    3.94 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
    3.95 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
    3.96 +      # a path prefixed by /cygdrive for fixpath to work.
    3.97 +      new_path="$CYGWIN_ROOT_PATH$input_path"
    3.98 +    fi
    3.99 +  fi
   3.100 +
   3.101 +
   3.102 +  if test "x$path" != "x$new_path"; then
   3.103 +    with_devkit="$new_path"
   3.104 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
   3.105 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
   3.106 +  fi
   3.107 +
   3.108 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   3.109 +
   3.110 +  path="$with_devkit"
   3.111 +  has_colon=`$ECHO $path | $GREP ^.:`
   3.112 +  new_path="$path"
   3.113 +  if test "x$has_colon" = x; then
   3.114 +    # Not in mixed or Windows style, start by that.
   3.115 +    new_path=`cmd //c echo $path`
   3.116 +  fi
   3.117 +
   3.118 +
   3.119 +  input_path="$new_path"
   3.120 +  # Check if we need to convert this using DOS-style short mode. If the path
   3.121 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
   3.122 +  # take no chances and rewrite it.
   3.123 +  # Note: m4 eats our [], so we need to use [ and ] instead.
   3.124 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
   3.125 +  if test "x$has_forbidden_chars" != x; then
   3.126 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
   3.127 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   3.128 +  fi
   3.129 +
   3.130 +
   3.131 +  windows_path="$new_path"
   3.132 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   3.133 +    unix_path=`$CYGPATH -u "$windows_path"`
   3.134 +    new_path="$unix_path"
   3.135 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   3.136 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
   3.137 +    new_path="$unix_path"
   3.138 +  fi
   3.139 +
   3.140 +  if test "x$path" != "x$new_path"; then
   3.141 +    with_devkit="$new_path"
   3.142 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
   3.143 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
   3.144 +  fi
   3.145 +
   3.146 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
   3.147 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
   3.148 +
   3.149 +  else
   3.150 +    # We're on a posix platform. Hooray! :)
   3.151 +    path="$with_devkit"
   3.152 +    has_space=`$ECHO "$path" | $GREP " "`
   3.153 +    if test "x$has_space" != x; then
   3.154 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
   3.155 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
   3.156 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
   3.157 +    fi
   3.158 +
   3.159 +    # Use eval to expand a potential ~
   3.160 +    eval path="$path"
   3.161 +    if test ! -f "$path" && test ! -d "$path"; then
   3.162 +      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
   3.163 +    fi
   3.164 +
   3.165 +    with_devkit="`cd "$path"; $THEPWDCMD -L`"
   3.166 +  fi
   3.167 +
   3.168 +
   3.169 +  if test "x$TOOLS_DIR" = x; then
   3.170 +    TOOLS_DIR="$with_devkit/bin"
   3.171 +  else
   3.172 +    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
   3.173 +  fi
   3.174 +
   3.175      if test -d "$with_devkit/$host_alias/libc"; then
   3.176        SYS_ROOT=$with_devkit/$host_alias/libc
   3.177      elif test -d "$with_devkit/$host/sys-root"; then
   3.178 @@ -7481,7 +7611,6 @@
   3.179  
   3.180  
   3.181  
   3.182 -
   3.183  # Setup default logging of stdout and stderr to build.log in the output root.
   3.184  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
   3.185  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
   3.186 @@ -10222,6 +10351,14 @@
   3.187  fi
   3.188  
   3.189  
   3.190 +# Check if it's GNU time
   3.191 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
   3.192 +if test "x$IS_GNU_TIME" != x; then
   3.193 +  IS_GNU_TIME=yes
   3.194 +else
   3.195 +  IS_GNU_TIME=no
   3.196 +fi
   3.197 +
   3.198  
   3.199  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   3.200  
   3.201 @@ -18933,15 +19070,6 @@
   3.202      fi
   3.203  
   3.204  
   3.205 -if test "x$SYS_ROOT" != "x/" ; then
   3.206 -    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
   3.207 -    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
   3.208 -    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
   3.209 -    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
   3.210 -    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
   3.211 -    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
   3.212 -fi
   3.213 -
   3.214  # Store the CFLAGS etal passed to the configure script.
   3.215  ORG_CFLAGS="$CFLAGS"
   3.216  ORG_CXXFLAGS="$CXXFLAGS"
   3.217 @@ -19892,7 +20020,7 @@
   3.218    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
   3.219      # First line typically looks something like:
   3.220      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
   3.221 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
   3.222 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
   3.223      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
   3.224      COMPILER_VENDOR="Microsoft CL.EXE"
   3.225      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
   3.226 @@ -21465,7 +21593,7 @@
   3.227    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
   3.228      # First line typically looks something like:
   3.229      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
   3.230 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
   3.231 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
   3.232      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
   3.233      COMPILER_VENDOR="Microsoft CL.EXE"
   3.234      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
   3.235 @@ -23725,19 +23853,20 @@
   3.236          RC_FLAGS="$RC_FLAGS -d NDEBUG"
   3.237  
   3.238  fi
   3.239 -    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
   3.240 -    if test "x$JDK_UPDATE_VERSION" = x; then :
   3.241 -
   3.242 -        JDK_UPDATE_VERSION_NOTNULL=0
   3.243 -
   3.244 -fi
   3.245 -    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
   3.246 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
   3.247 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
   3.248 -    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
   3.249 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
   3.250 -    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
   3.251 -    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
   3.252 +
   3.253 +    # The version variables used to create RC_FLAGS may be overridden
   3.254 +    # in a custom configure script, or possibly the command line.
   3.255 +    # Let those variables be expanded at make time in spec.gmk.
   3.256 +    # The \$ are escaped to the shell, and the $(...) variables
   3.257 +    # are evaluated by make.
   3.258 +    RC_FLAGS="$RC_FLAGS \
   3.259 +        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
   3.260 +        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
   3.261 +        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
   3.262 +        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
   3.263 +        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
   3.264 +        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
   3.265 +        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   3.266  
   3.267      # lib.exe is used to create static libraries.
   3.268      # Extract the first word of "lib", so it can be a program name with args.
     4.1 --- a/common/autoconf/spec.gmk.in	Thu Jun 27 13:40:12 2013 -0700
     4.2 +++ b/common/autoconf/spec.gmk.in	Tue Jul 02 15:55:14 2013 -0700
     4.3 @@ -510,6 +510,7 @@
     4.4  TAIL:=@TAIL@
     4.5  TEE:=@TEE@
     4.6  TIME:=@TIME@
     4.7 +IS_GNU_TIME:=@IS_GNU_TIME@
     4.8  TR:=@TR@
     4.9  TOUCH:=@TOUCH@
    4.10  UNIQ:=@UNIQ@
     5.1 --- a/common/autoconf/toolchain.m4	Thu Jun 27 13:40:12 2013 -0700
     5.2 +++ b/common/autoconf/toolchain.m4	Tue Jul 02 15:55:14 2013 -0700
     5.3 @@ -47,7 +47,7 @@
     5.4    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
     5.5      # First line typically looks something like:
     5.6      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
     5.7 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
     5.8 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
     5.9      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"`
    5.10      COMPILER_VENDOR="Microsoft CL.EXE"
    5.11      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
    5.12 @@ -226,15 +226,6 @@
    5.13                      ],
    5.14                      [])
    5.15  
    5.16 -if test "x$SYS_ROOT" != "x/" ; then
    5.17 -    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
    5.18 -    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
    5.19 -    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
    5.20 -    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
    5.21 -    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
    5.22 -    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
    5.23 -fi
    5.24 -
    5.25  # Store the CFLAGS etal passed to the configure script.
    5.26  ORG_CFLAGS="$CFLAGS"
    5.27  ORG_CXXFLAGS="$CXXFLAGS"
    5.28 @@ -378,17 +369,20 @@
    5.29      AS_IF([test "x$VARIANT" = xOPT], [
    5.30          RC_FLAGS="$RC_FLAGS -d NDEBUG"
    5.31      ])
    5.32 -    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
    5.33 -    AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
    5.34 -        JDK_UPDATE_VERSION_NOTNULL=0
    5.35 -    ])
    5.36 -    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
    5.37 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
    5.38 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
    5.39 -    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
    5.40 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
    5.41 -    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
    5.42 -    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
    5.43 +
    5.44 +    # The version variables used to create RC_FLAGS may be overridden
    5.45 +    # in a custom configure script, or possibly the command line.  
    5.46 +    # Let those variables be expanded at make time in spec.gmk.
    5.47 +    # The \$ are escaped to the shell, and the $(...) variables
    5.48 +    # are evaluated by make.
    5.49 +    RC_FLAGS="$RC_FLAGS \
    5.50 +        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
    5.51 +        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
    5.52 +        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
    5.53 +        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
    5.54 +        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
    5.55 +        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
    5.56 +        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
    5.57  
    5.58      # lib.exe is used to create static libraries.
    5.59      AC_CHECK_PROG([WINAR], [lib],[lib],,,)
     6.1 --- a/common/makefiles/JavaCompilation.gmk	Thu Jun 27 13:40:12 2013 -0700
     6.2 +++ b/common/makefiles/JavaCompilation.gmk	Tue Jul 02 15:55:14 2013 -0700
     6.3 @@ -155,7 +155,7 @@
     6.4          # lines, but not here for use in make dependencies.
     6.5          $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
     6.6          ifeq (,$$($1_SKIP_METAINF))
     6.7 -            $1_DEPS+=$$(call CacheFind $$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
     6.8 +            $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
     6.9          endif
    6.10      endif
    6.11  
    6.12 @@ -255,12 +255,21 @@
    6.13      $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
    6.14      $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
    6.15  
    6.16 +    # To avoid running find over too large sets of files, which causes make to crash
    6.17 +    # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
    6.18 +    # of directories to run find in, if available.
    6.19 +    ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
    6.20 +	$1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC),\
    6.21 +		$$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
    6.22 +    else
    6.23 +        $1_FIND_LIST := $$($1_SRC)
    6.24 +    endif
    6.25 +
    6.26      # Find all files in the source tree.
    6.27      $1_ALL_SRCS := $$(call not-containing,_the.,\
    6.28 -            $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind $$($1_SRC))))
    6.29 +            $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
    6.30  
    6.31      ifneq ($$($1_INCLUDES),)
    6.32 -        $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
    6.33          ifneq ($$($1_SUFFIXES),)
    6.34              $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\
    6.35  		$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
    6.36 @@ -269,12 +278,8 @@
    6.37          endif
    6.38      endif
    6.39      ifneq ($$($1_INCLUDE_FILES),)
    6.40 -        $1_SRC_INCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
    6.41          $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
    6.42      endif
    6.43 -    ifneq ($$($1_SRC_INCLUDES),)
    6.44 -        $1_ALL_SRCS     := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
    6.45 -    endif
    6.46      ifneq ($$($1_EXCLUDES),)
    6.47          $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
    6.48          $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
     7.1 --- a/common/makefiles/MakeBase.gmk	Thu Jun 27 13:40:12 2013 -0700
     7.2 +++ b/common/makefiles/MakeBase.gmk	Tue Jul 02 15:55:14 2013 -0700
     7.3 @@ -332,9 +332,11 @@
     7.4          # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
     7.5          # For each target executed, will print
     7.6          # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
     7.7 -        # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin).
     7.8 -        OLD_SHELL:=$$(SHELL)
     7.9 -        WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL)
    7.10 +        # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much 
    7.11 +        # (and causing a crash on Cygwin).
    7.12 +        # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
    7.13 +        # Only use time if it's GNU time which supports format and output file.
    7.14 +        WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
    7.15          SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
    7.16      endif
    7.17      # Never remove warning messages; this is just for completeness

mercurial