common/autoconf/generated-configure.sh

changeset 966
81632308f60d
parent 965
3ef3f4174c2b
parent 759
0d0c983a817b
child 969
f29be0099f41
     1.1 --- a/common/autoconf/generated-configure.sh	Tue Jul 02 17:38:10 2013 -0700
     1.2 +++ b/common/autoconf/generated-configure.sh	Thu Jul 11 12:50:20 2013 -0700
     1.3 @@ -800,6 +800,7 @@
     1.4  PKG_CONFIG
     1.5  CODESIGN
     1.6  XATTR
     1.7 +IS_GNU_TIME
     1.8  TIME
     1.9  STAT
    1.10  HG
    1.11 @@ -3089,6 +3090,9 @@
    1.12  # Also set JVM_ARG_OK to true/false depending on outcome.
    1.13  
    1.14  
    1.15 +# Appends a string to a path variable, only adding the : when needed.
    1.16 +
    1.17 +
    1.18  # This will make sure the given variable points to a full and proper
    1.19  # path. This means:
    1.20  # 1) There will be no spaces in the path. On posix platforms,
    1.21 @@ -3790,7 +3794,7 @@
    1.22  #CUSTOM_AUTOCONF_INCLUDE
    1.23  
    1.24  # Do not change or remove the following line, it is needed for consistency checks:
    1.25 -DATE_WHEN_GENERATED=1372808067
    1.26 +DATE_WHEN_GENERATED=1373572212
    1.27  
    1.28  ###############################################################################
    1.29  #
    1.30 @@ -7465,6 +7469,7 @@
    1.31  # Check whether --with-tools-dir was given.
    1.32  if test "${with_tools_dir+set}" = set; then :
    1.33    withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
    1.34 +
    1.35  fi
    1.36  
    1.37  
    1.38 @@ -7475,10 +7480,135 @@
    1.39      if test "x$with_sys_root" != x; then
    1.40        as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
    1.41      fi
    1.42 -    if test "x$with_tools_dir" != x; then
    1.43 -      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
    1.44 -    fi
    1.45 -    TOOLS_DIR=$with_devkit/bin
    1.46 +
    1.47 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    1.48 +
    1.49 +  # Input might be given as Windows format, start by converting to
    1.50 +  # unix format.
    1.51 +  path="$with_devkit"
    1.52 +  new_path=`$CYGPATH -u "$path"`
    1.53 +
    1.54 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
    1.55 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
    1.56 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
    1.57 +  # "foo.exe" is OK but "foo" is an error.
    1.58 +  #
    1.59 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
    1.60 +  # It is also a way to make sure we got the proper file name for the real test later on.
    1.61 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
    1.62 +  if test "x$test_shortpath" = x; then
    1.63 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
    1.64 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
    1.65 +    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
    1.66 +  fi
    1.67 +
    1.68 +  # Call helper function which possibly converts this using DOS-style short mode.
    1.69 +  # If so, the updated path is stored in $new_path.
    1.70 +
    1.71 +  input_path="$new_path"
    1.72 +  # Check if we need to convert this using DOS-style short mode. If the path
    1.73 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
    1.74 +  # take no chances and rewrite it.
    1.75 +  # Note: m4 eats our [], so we need to use [ and ] instead.
    1.76 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
    1.77 +  if test "x$has_forbidden_chars" != x; then
    1.78 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    1.79 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    1.80 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    1.81 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
    1.82 +      # Going to short mode and back again did indeed matter. Since short mode is
    1.83 +      # case insensitive, let's make it lowercase to improve readability.
    1.84 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    1.85 +      # Now convert it back to Unix-stile (cygpath)
    1.86 +      input_path=`$CYGPATH -u "$shortmode_path"`
    1.87 +      new_path="$input_path"
    1.88 +    fi
    1.89 +  fi
    1.90 +
    1.91 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
    1.92 +  if test "x$test_cygdrive_prefix" = x; then
    1.93 +    # As a simple fix, exclude /usr/bin since it's not a real path.
    1.94 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
    1.95 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
    1.96 +      # a path prefixed by /cygdrive for fixpath to work.
    1.97 +      new_path="$CYGWIN_ROOT_PATH$input_path"
    1.98 +    fi
    1.99 +  fi
   1.100 +
   1.101 +
   1.102 +  if test "x$path" != "x$new_path"; then
   1.103 +    with_devkit="$new_path"
   1.104 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
   1.105 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
   1.106 +  fi
   1.107 +
   1.108 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   1.109 +
   1.110 +  path="$with_devkit"
   1.111 +  has_colon=`$ECHO $path | $GREP ^.:`
   1.112 +  new_path="$path"
   1.113 +  if test "x$has_colon" = x; then
   1.114 +    # Not in mixed or Windows style, start by that.
   1.115 +    new_path=`cmd //c echo $path`
   1.116 +  fi
   1.117 +
   1.118 +
   1.119 +  input_path="$new_path"
   1.120 +  # Check if we need to convert this using DOS-style short mode. If the path
   1.121 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
   1.122 +  # take no chances and rewrite it.
   1.123 +  # Note: m4 eats our [], so we need to use [ and ] instead.
   1.124 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
   1.125 +  if test "x$has_forbidden_chars" != x; then
   1.126 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
   1.127 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.128 +  fi
   1.129 +
   1.130 +
   1.131 +  windows_path="$new_path"
   1.132 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   1.133 +    unix_path=`$CYGPATH -u "$windows_path"`
   1.134 +    new_path="$unix_path"
   1.135 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   1.136 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
   1.137 +    new_path="$unix_path"
   1.138 +  fi
   1.139 +
   1.140 +  if test "x$path" != "x$new_path"; then
   1.141 +    with_devkit="$new_path"
   1.142 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
   1.143 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
   1.144 +  fi
   1.145 +
   1.146 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
   1.147 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
   1.148 +
   1.149 +  else
   1.150 +    # We're on a posix platform. Hooray! :)
   1.151 +    path="$with_devkit"
   1.152 +    has_space=`$ECHO "$path" | $GREP " "`
   1.153 +    if test "x$has_space" != x; then
   1.154 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
   1.155 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
   1.156 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
   1.157 +    fi
   1.158 +
   1.159 +    # Use eval to expand a potential ~
   1.160 +    eval path="$path"
   1.161 +    if test ! -f "$path" && test ! -d "$path"; then
   1.162 +      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
   1.163 +    fi
   1.164 +
   1.165 +    with_devkit="`cd "$path"; $THEPWDCMD -L`"
   1.166 +  fi
   1.167 +
   1.168 +
   1.169 +  if test "x$TOOLS_DIR" = x; then
   1.170 +    TOOLS_DIR="$with_devkit/bin"
   1.171 +  else
   1.172 +    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
   1.173 +  fi
   1.174 +
   1.175      if test -d "$with_devkit/$host_alias/libc"; then
   1.176        SYS_ROOT=$with_devkit/$host_alias/libc
   1.177      elif test -d "$with_devkit/$host/sys-root"; then
   1.178 @@ -7489,7 +7619,6 @@
   1.179  
   1.180  
   1.181  
   1.182 -
   1.183  # Setup default logging of stdout and stderr to build.log in the output root.
   1.184  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
   1.185  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
   1.186 @@ -10271,6 +10400,14 @@
   1.187  fi
   1.188  
   1.189  
   1.190 +# Check if it's GNU time
   1.191 +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
   1.192 +if test "x$IS_GNU_TIME" != x; then
   1.193 +  IS_GNU_TIME=yes
   1.194 +else
   1.195 +  IS_GNU_TIME=no
   1.196 +fi
   1.197 +
   1.198  
   1.199  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.200  
   1.201 @@ -17231,6 +17368,8 @@
   1.202        # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
   1.203        VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
   1.204        VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
   1.205 +      # Remove any paths containing # (typically F#) as that messes up make
   1.206 +      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
   1.207        VS_PATH="$PATH"
   1.208  
   1.209  
   1.210 @@ -18982,15 +19121,6 @@
   1.211      fi
   1.212  
   1.213  
   1.214 -if test "x$SYS_ROOT" != "x/" ; then
   1.215 -    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
   1.216 -    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
   1.217 -    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
   1.218 -    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
   1.219 -    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
   1.220 -    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
   1.221 -fi
   1.222 -
   1.223  # Store the CFLAGS etal passed to the configure script.
   1.224  ORG_CFLAGS="$CFLAGS"
   1.225  ORG_CXXFLAGS="$CXXFLAGS"
   1.226 @@ -19941,7 +20071,7 @@
   1.227    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
   1.228      # First line typically looks something like:
   1.229      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
   1.230 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
   1.231 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
   1.232      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
   1.233      COMPILER_VENDOR="Microsoft CL.EXE"
   1.234      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
   1.235 @@ -21514,7 +21644,7 @@
   1.236    elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
   1.237      # First line typically looks something like:
   1.238      # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
   1.239 -    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
   1.240 +    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
   1.241      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
   1.242      COMPILER_VENDOR="Microsoft CL.EXE"
   1.243      COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
   1.244 @@ -23774,19 +23904,20 @@
   1.245          RC_FLAGS="$RC_FLAGS -d NDEBUG"
   1.246  
   1.247  fi
   1.248 -    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
   1.249 -    if test "x$JDK_UPDATE_VERSION" = x; then :
   1.250 -
   1.251 -        JDK_UPDATE_VERSION_NOTNULL=0
   1.252 -
   1.253 -fi
   1.254 -    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
   1.255 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
   1.256 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
   1.257 -    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
   1.258 -    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
   1.259 -    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
   1.260 -    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
   1.261 +
   1.262 +    # The version variables used to create RC_FLAGS may be overridden
   1.263 +    # in a custom configure script, or possibly the command line.
   1.264 +    # Let those variables be expanded at make time in spec.gmk.
   1.265 +    # The \$ are escaped to the shell, and the $(...) variables
   1.266 +    # are evaluated by make.
   1.267 +    RC_FLAGS="$RC_FLAGS \
   1.268 +        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
   1.269 +        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
   1.270 +        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
   1.271 +        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
   1.272 +        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
   1.273 +        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
   1.274 +        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   1.275  
   1.276      # lib.exe is used to create static libraries.
   1.277      # Extract the first word of "lib", so it can be a program name with args.

mercurial