Merge

Thu, 11 Jul 2013 12:50:20 -0700

author
kvn
date
Thu, 11 Jul 2013 12:50:20 -0700
changeset 966
81632308f60d
parent 965
3ef3f4174c2b
parent 760
59dc9da81379
child 967
7e63a77cd52b

Merge

common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/spec.gmk.in file | annotate | diff | comparison | revisions
common/autoconf/toolchain.m4 file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Tue Jul 02 17:38:10 2013 -0700
     1.2 +++ b/.hgtags	Thu Jul 11 12:50:20 2013 -0700
     1.3 @@ -217,3 +217,6 @@
     1.4  27c51c6e31c1ef36afa0e6efb031f9b13f26c12b jdk8-b93
     1.5  50d2bde060f2a9bbbe4da0c8986e20aca61f2e2e jdk8-b94
     1.6  785d07fe38901ecc1b7e0145e53e1c3da9361fee jdk8-b95
     1.7 +c156084add486f941c12d886a0b1b2854795d557 jdk8-b96
     1.8 +a1c1e8bf71f354f3aec0214cf13d6668811e021d jdk8-b97
     1.9 +0d0c983a817bbe8518a5ff201306334a8de267f2 jdk8-b98
     2.1 --- a/NewMakefile.gmk	Tue Jul 02 17:38:10 2013 -0700
     2.2 +++ b/NewMakefile.gmk	Thu Jul 11 12:50:20 2013 -0700
     2.3 @@ -68,12 +68,15 @@
     2.4          # First, find out the valid targets
     2.5          # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
     2.6          # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
     2.7 -        all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
     2.8 -            $(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \
     2.9 +        all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
    2.10 +            $(MAKE) -p -q -f common/makefiles/Main.gmk SPEC=$(firstword $(SPEC)) | \
    2.11              grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
    2.12  
    2.13 -$(all_phony_targets):
    2.14 -	@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
    2.15 +        $(all_phony_targets):
    2.16 +		$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
    2.17 +			$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
    2.18 +
    2.19 +        .PHONY: $(all_phony_targets)
    2.20  
    2.21      endif
    2.22  endif
     3.1 --- a/common/autoconf/basics.m4	Tue Jul 02 17:38:10 2013 -0700
     3.2 +++ b/common/autoconf/basics.m4	Thu Jul 11 12:50:20 2013 -0700
     3.3 @@ -43,6 +43,16 @@
     3.4      fi
     3.5  ])
     3.6  
     3.7 +# Appends a string to a path variable, only adding the : when needed.
     3.8 +AC_DEFUN([BASIC_APPEND_TO_PATH],
     3.9 +[
    3.10 +  if test "x[$]$1" = x; then
    3.11 +    $1="$2"
    3.12 +  else
    3.13 +    $1="[$]$1:$2"
    3.14 +  fi
    3.15 +])
    3.16 +
    3.17  # This will make sure the given variable points to a full and proper
    3.18  # path. This means:
    3.19  # 1) There will be no spaces in the path. On posix platforms,
    3.20 @@ -351,7 +361,9 @@
    3.21  AC_SUBST(SYS_ROOT)
    3.22  
    3.23  AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
    3.24 -  [search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
    3.25 +  [search this directory for compilers and tools (for cross-compiling)])], 
    3.26 +  [TOOLS_DIR=$with_tools_dir]
    3.27 +)
    3.28  
    3.29  AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
    3.30    [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
    3.31 @@ -359,17 +371,14 @@
    3.32      if test "x$with_sys_root" != x; then
    3.33        AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
    3.34      fi
    3.35 -    if test "x$with_tools_dir" != x; then
    3.36 -      AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
    3.37 -    fi
    3.38 -    TOOLS_DIR=$with_devkit/bin
    3.39 +    BASIC_FIXUP_PATH([with_devkit])
    3.40 +    BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
    3.41      if test -d "$with_devkit/$host_alias/libc"; then
    3.42        SYS_ROOT=$with_devkit/$host_alias/libc
    3.43      elif test -d "$with_devkit/$host/sys-root"; then
    3.44        SYS_ROOT=$with_devkit/$host/sys-root
    3.45      fi
    3.46    ])
    3.47 -
    3.48  ])
    3.49  
    3.50  AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
    3.51 @@ -612,6 +621,14 @@
    3.52  AC_PATH_PROG(HG, hg)
    3.53  AC_PATH_PROG(STAT, stat)
    3.54  AC_PATH_PROG(TIME, time)
    3.55 +# Check if it's GNU time
    3.56 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
    3.57 +if test "x$IS_GNU_TIME" != x; then
    3.58 +  IS_GNU_TIME=yes
    3.59 +else
    3.60 +  IS_GNU_TIME=no
    3.61 +fi
    3.62 +AC_SUBST(IS_GNU_TIME)
    3.63  
    3.64  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
    3.65    BASIC_REQUIRE_PROG(COMM, comm)
     4.1 --- a/common/autoconf/generated-configure.sh	Tue Jul 02 17:38:10 2013 -0700
     4.2 +++ b/common/autoconf/generated-configure.sh	Thu Jul 11 12:50:20 2013 -0700
     4.3 @@ -800,6 +800,7 @@
     4.4  PKG_CONFIG
     4.5  CODESIGN
     4.6  XATTR
     4.7 +IS_GNU_TIME
     4.8  TIME
     4.9  STAT
    4.10  HG
    4.11 @@ -3089,6 +3090,9 @@
    4.12  # Also set JVM_ARG_OK to true/false depending on outcome.
    4.13  
    4.14  
    4.15 +# Appends a string to a path variable, only adding the : when needed.
    4.16 +
    4.17 +
    4.18  # This will make sure the given variable points to a full and proper
    4.19  # path. This means:
    4.20  # 1) There will be no spaces in the path. On posix platforms,
    4.21 @@ -3790,7 +3794,7 @@
    4.22  #CUSTOM_AUTOCONF_INCLUDE
    4.23  
    4.24  # Do not change or remove the following line, it is needed for consistency checks:
    4.25 -DATE_WHEN_GENERATED=1372808067
    4.26 +DATE_WHEN_GENERATED=1373572212
    4.27  
    4.28  ###############################################################################
    4.29  #
    4.30 @@ -7465,6 +7469,7 @@
    4.31  # Check whether --with-tools-dir was given.
    4.32  if test "${with_tools_dir+set}" = set; then :
    4.33    withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
    4.34 +
    4.35  fi
    4.36  
    4.37  
    4.38 @@ -7475,10 +7480,135 @@
    4.39      if test "x$with_sys_root" != x; then
    4.40        as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
    4.41      fi
    4.42 -    if test "x$with_tools_dir" != x; then
    4.43 -      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
    4.44 -    fi
    4.45 -    TOOLS_DIR=$with_devkit/bin
    4.46 +
    4.47 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    4.48 +
    4.49 +  # Input might be given as Windows format, start by converting to
    4.50 +  # unix format.
    4.51 +  path="$with_devkit"
    4.52 +  new_path=`$CYGPATH -u "$path"`
    4.53 +
    4.54 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
    4.55 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
    4.56 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
    4.57 +  # "foo.exe" is OK but "foo" is an error.
    4.58 +  #
    4.59 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
    4.60 +  # It is also a way to make sure we got the proper file name for the real test later on.
    4.61 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
    4.62 +  if test "x$test_shortpath" = x; then
    4.63 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
    4.64 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
    4.65 +    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
    4.66 +  fi
    4.67 +
    4.68 +  # Call helper function which possibly converts this using DOS-style short mode.
    4.69 +  # If so, the updated path is stored in $new_path.
    4.70 +
    4.71 +  input_path="$new_path"
    4.72 +  # Check if we need to convert this using DOS-style short mode. If the path
    4.73 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
    4.74 +  # take no chances and rewrite it.
    4.75 +  # Note: m4 eats our [], so we need to use [ and ] instead.
    4.76 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
    4.77 +  if test "x$has_forbidden_chars" != x; then
    4.78 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    4.79 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    4.80 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    4.81 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
    4.82 +      # Going to short mode and back again did indeed matter. Since short mode is
    4.83 +      # case insensitive, let's make it lowercase to improve readability.
    4.84 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    4.85 +      # Now convert it back to Unix-stile (cygpath)
    4.86 +      input_path=`$CYGPATH -u "$shortmode_path"`
    4.87 +      new_path="$input_path"
    4.88 +    fi
    4.89 +  fi
    4.90 +
    4.91 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
    4.92 +  if test "x$test_cygdrive_prefix" = x; then
    4.93 +    # As a simple fix, exclude /usr/bin since it's not a real path.
    4.94 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
    4.95 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
    4.96 +      # a path prefixed by /cygdrive for fixpath to work.
    4.97 +      new_path="$CYGWIN_ROOT_PATH$input_path"
    4.98 +    fi
    4.99 +  fi
   4.100 +
   4.101 +
   4.102 +  if test "x$path" != "x$new_path"; then
   4.103 +    with_devkit="$new_path"
   4.104 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
   4.105 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
   4.106 +  fi
   4.107 +
   4.108 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   4.109 +
   4.110 +  path="$with_devkit"
   4.111 +  has_colon=`$ECHO $path | $GREP ^.:`
   4.112 +  new_path="$path"
   4.113 +  if test "x$has_colon" = x; then
   4.114 +    # Not in mixed or Windows style, start by that.
   4.115 +    new_path=`cmd //c echo $path`
   4.116 +  fi
   4.117 +
   4.118 +
   4.119 +  input_path="$new_path"
   4.120 +  # Check if we need to convert this using DOS-style short mode. If the path
   4.121 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
   4.122 +  # take no chances and rewrite it.
   4.123 +  # Note: m4 eats our [], so we need to use [ and ] instead.
   4.124 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
   4.125 +  if test "x$has_forbidden_chars" != x; then
   4.126 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
   4.127 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   4.128 +  fi
   4.129 +
   4.130 +
   4.131 +  windows_path="$new_path"
   4.132 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   4.133 +    unix_path=`$CYGPATH -u "$windows_path"`
   4.134 +    new_path="$unix_path"
   4.135 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   4.136 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
   4.137 +    new_path="$unix_path"
   4.138 +  fi
   4.139 +
   4.140 +  if test "x$path" != "x$new_path"; then
   4.141 +    with_devkit="$new_path"
   4.142 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
   4.143 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
   4.144 +  fi
   4.145 +
   4.146 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
   4.147 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
   4.148 +
   4.149 +  else
   4.150 +    # We're on a posix platform. Hooray! :)
   4.151 +    path="$with_devkit"
   4.152 +    has_space=`$ECHO "$path" | $GREP " "`
   4.153 +    if test "x$has_space" != x; then
   4.154 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
   4.155 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
   4.156 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
   4.157 +    fi
   4.158 +
   4.159 +    # Use eval to expand a potential ~
   4.160 +    eval path="$path"
   4.161 +    if test ! -f "$path" && test ! -d "$path"; then
   4.162 +      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
   4.163 +    fi
   4.164 +
   4.165 +    with_devkit="`cd "$path"; $THEPWDCMD -L`"
   4.166 +  fi
   4.167 +
   4.168 +
   4.169 +  if test "x$TOOLS_DIR" = x; then
   4.170 +    TOOLS_DIR="$with_devkit/bin"
   4.171 +  else
   4.172 +    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
   4.173 +  fi
   4.174 +
   4.175      if test -d "$with_devkit/$host_alias/libc"; then
   4.176        SYS_ROOT=$with_devkit/$host_alias/libc
   4.177      elif test -d "$with_devkit/$host/sys-root"; then
   4.178 @@ -7489,7 +7619,6 @@
   4.179  
   4.180  
   4.181  
   4.182 -
   4.183  # Setup default logging of stdout and stderr to build.log in the output root.
   4.184  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
   4.185  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
   4.186 @@ -10271,6 +10400,14 @@
   4.187  fi
   4.188  
   4.189  
   4.190 +# Check if it's GNU time
   4.191 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
   4.192 +if test "x$IS_GNU_TIME" != x; then
   4.193 +  IS_GNU_TIME=yes
   4.194 +else
   4.195 +  IS_GNU_TIME=no
   4.196 +fi
   4.197 +
   4.198  
   4.199  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   4.200  
   4.201 @@ -17231,6 +17368,8 @@
   4.202        # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
   4.203        VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
   4.204        VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
   4.205 +      # Remove any paths containing # (typically F#) as that messes up make
   4.206 +      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
   4.207        VS_PATH="$PATH"
   4.208  
   4.209  
   4.210 @@ -18982,15 +19121,6 @@
   4.211      fi
   4.212  
   4.213  
   4.214 -if test "x$SYS_ROOT" != "x/" ; then
   4.215 -    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
   4.216 -    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
   4.217 -    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
   4.218 -    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
   4.219 -    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
   4.220 -    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
   4.221 -fi
   4.222 -
   4.223  # Store the CFLAGS etal passed to the configure script.
   4.224  ORG_CFLAGS="$CFLAGS"
   4.225  ORG_CXXFLAGS="$CXXFLAGS"
   4.226 @@ -19941,7 +20071,7 @@
   4.227    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
   4.228      # First line typically looks something like:
   4.229      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
   4.230 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
   4.231 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
   4.232      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
   4.233      COMPILER_VENDOR="Microsoft CL.EXE"
   4.234      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
   4.235 @@ -21514,7 +21644,7 @@
   4.236    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
   4.237      # First line typically looks something like:
   4.238      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
   4.239 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
   4.240 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
   4.241      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
   4.242      COMPILER_VENDOR="Microsoft CL.EXE"
   4.243      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
   4.244 @@ -23774,19 +23904,20 @@
   4.245          RC_FLAGS="$RC_FLAGS -d NDEBUG"
   4.246  
   4.247  fi
   4.248 -    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
   4.249 -    if test "x$JDK_UPDATE_VERSION" = x; then :
   4.250 -
   4.251 -        JDK_UPDATE_VERSION_NOTNULL=0
   4.252 -
   4.253 -fi
   4.254 -    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
   4.255 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
   4.256 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
   4.257 -    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
   4.258 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
   4.259 -    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
   4.260 -    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
   4.261 +
   4.262 +    # The version variables used to create RC_FLAGS may be overridden
   4.263 +    # in a custom configure script, or possibly the command line.
   4.264 +    # Let those variables be expanded at make time in spec.gmk.
   4.265 +    # The \$ are escaped to the shell, and the $(...) variables
   4.266 +    # are evaluated by make.
   4.267 +    RC_FLAGS="$RC_FLAGS \
   4.268 +        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
   4.269 +        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
   4.270 +        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
   4.271 +        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
   4.272 +        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
   4.273 +        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
   4.274 +        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   4.275  
   4.276      # lib.exe is used to create static libraries.
   4.277      # Extract the first word of "lib", so it can be a program name with args.
     5.1 --- a/common/autoconf/spec.gmk.in	Tue Jul 02 17:38:10 2013 -0700
     5.2 +++ b/common/autoconf/spec.gmk.in	Thu Jul 11 12:50:20 2013 -0700
     5.3 @@ -516,6 +516,7 @@
     5.4  TAIL:=@TAIL@
     5.5  TEE:=@TEE@
     5.6  TIME:=@TIME@
     5.7 +IS_GNU_TIME:=@IS_GNU_TIME@
     5.8  TR:=@TR@
     5.9  TOUCH:=@TOUCH@
    5.10  UNIQ:=@UNIQ@
     6.1 --- a/common/autoconf/toolchain.m4	Tue Jul 02 17:38:10 2013 -0700
     6.2 +++ b/common/autoconf/toolchain.m4	Thu Jul 11 12:50:20 2013 -0700
     6.3 @@ -47,7 +47,7 @@
     6.4    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
     6.5      # First line typically looks something like:
     6.6      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
     6.7 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
     6.8 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
     6.9      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"`
    6.10      COMPILER_VENDOR="Microsoft CL.EXE"
    6.11      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
    6.12 @@ -226,15 +226,6 @@
    6.13                      ],
    6.14                      [])
    6.15  
    6.16 -if test "x$SYS_ROOT" != "x/" ; then
    6.17 -    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
    6.18 -    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
    6.19 -    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
    6.20 -    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
    6.21 -    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
    6.22 -    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
    6.23 -fi
    6.24 -
    6.25  # Store the CFLAGS etal passed to the configure script.
    6.26  ORG_CFLAGS="$CFLAGS"
    6.27  ORG_CXXFLAGS="$CXXFLAGS"
    6.28 @@ -378,17 +369,20 @@
    6.29      AS_IF([test "x$VARIANT" = xOPT], [
    6.30          RC_FLAGS="$RC_FLAGS -d NDEBUG"
    6.31      ])
    6.32 -    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
    6.33 -    AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
    6.34 -        JDK_UPDATE_VERSION_NOTNULL=0
    6.35 -    ])
    6.36 -    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
    6.37 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
    6.38 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
    6.39 -    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
    6.40 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
    6.41 -    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
    6.42 -    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
    6.43 +
    6.44 +    # The version variables used to create RC_FLAGS may be overridden
    6.45 +    # in a custom configure script, or possibly the command line.  
    6.46 +    # Let those variables be expanded at make time in spec.gmk.
    6.47 +    # The \$ are escaped to the shell, and the $(...) variables
    6.48 +    # are evaluated by make.
    6.49 +    RC_FLAGS="$RC_FLAGS \
    6.50 +        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
    6.51 +        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
    6.52 +        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
    6.53 +        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
    6.54 +        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
    6.55 +        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
    6.56 +        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
    6.57  
    6.58      # lib.exe is used to create static libraries.
    6.59      AC_CHECK_PROG([WINAR], [lib],[lib],,,)
     7.1 --- a/common/autoconf/toolchain_windows.m4	Tue Jul 02 17:38:10 2013 -0700
     7.2 +++ b/common/autoconf/toolchain_windows.m4	Thu Jul 11 12:50:20 2013 -0700
     7.3 @@ -208,6 +208,8 @@
     7.4        # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
     7.5        VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
     7.6        VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
     7.7 +      # Remove any paths containing # (typically F#) as that messes up make
     7.8 +      PATH=`$ECHO "$PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
     7.9        VS_PATH="$PATH"
    7.10        AC_SUBST(VS_INCLUDE)
    7.11        AC_SUBST(VS_LIB)
     8.1 --- a/common/makefiles/JavaCompilation.gmk	Tue Jul 02 17:38:10 2013 -0700
     8.2 +++ b/common/makefiles/JavaCompilation.gmk	Thu Jul 11 12:50:20 2013 -0700
     8.3 @@ -155,7 +155,7 @@
     8.4          # lines, but not here for use in make dependencies.
     8.5          $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
     8.6          ifeq (,$$($1_SKIP_METAINF))
     8.7 -            $1_DEPS+=$$(call CacheFind $$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
     8.8 +            $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
     8.9          endif
    8.10      endif
    8.11  
    8.12 @@ -255,12 +255,21 @@
    8.13      $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
    8.14      $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
    8.15  
    8.16 +    # To avoid running find over too large sets of files, which causes make to crash
    8.17 +    # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
    8.18 +    # of directories to run find in, if available.
    8.19 +    ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
    8.20 +	$1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC),\
    8.21 +		$$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
    8.22 +    else
    8.23 +        $1_FIND_LIST := $$($1_SRC)
    8.24 +    endif
    8.25 +
    8.26      # Find all files in the source tree.
    8.27      $1_ALL_SRCS := $$(call not-containing,_the.,\
    8.28 -            $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind $$($1_SRC))))
    8.29 +            $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
    8.30  
    8.31      ifneq ($$($1_INCLUDES),)
    8.32 -        $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
    8.33          ifneq ($$($1_SUFFIXES),)
    8.34              $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\
    8.35  		$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
    8.36 @@ -269,12 +278,8 @@
    8.37          endif
    8.38      endif
    8.39      ifneq ($$($1_INCLUDE_FILES),)
    8.40 -        $1_SRC_INCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
    8.41          $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
    8.42      endif
    8.43 -    ifneq ($$($1_SRC_INCLUDES),)
    8.44 -        $1_ALL_SRCS     := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
    8.45 -    endif
    8.46      ifneq ($$($1_EXCLUDES),)
    8.47          $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
    8.48          $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
     9.1 --- a/common/makefiles/MakeBase.gmk	Tue Jul 02 17:38:10 2013 -0700
     9.2 +++ b/common/makefiles/MakeBase.gmk	Thu Jul 11 12:50:20 2013 -0700
     9.3 @@ -332,9 +332,11 @@
     9.4          # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
     9.5          # For each target executed, will print
     9.6          # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
     9.7 -        # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin).
     9.8 -        OLD_SHELL:=$$(SHELL)
     9.9 -        WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL)
    9.10 +        # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much 
    9.11 +        # (and causing a crash on Cygwin).
    9.12 +        # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
    9.13 +        # Only use time if it's GNU time which supports format and output file.
    9.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
    9.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)
    9.16      endif
    9.17      # Never remove warning messages; this is just for completeness

mercurial