diff --git a/.hgtags b/.hgtags index 60298ea543b0c84ce70ca04b3c03788a931cc234..f02d32f4820258cff6ea014893625adbd10c7114 100644 --- a/.hgtags +++ b/.hgtags @@ -217,3 +217,6 @@ cb51fb4789ac0b8be4056482077ddfb8f3bd3805 jdk8-b91 27c51c6e31c1ef36afa0e6efb031f9b13f26c12b jdk8-b93 50d2bde060f2a9bbbe4da0c8986e20aca61f2e2e jdk8-b94 785d07fe38901ecc1b7e0145e53e1c3da9361fee jdk8-b95 +c156084add486f941c12d886a0b1b2854795d557 jdk8-b96 +a1c1e8bf71f354f3aec0214cf13d6668811e021d jdk8-b97 +0d0c983a817bbe8518a5ff201306334a8de267f2 jdk8-b98 diff --git a/NewMakefile.gmk b/NewMakefile.gmk index 033183289ff72ebd1721aba4d465e5de3ba1fae4..101ebe062787fd34d567d01cbeaa93b5793e4d27 100644 --- a/NewMakefile.gmk +++ b/NewMakefile.gmk @@ -68,12 +68,15 @@ else # First, find out the valid targets # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find # available PHONY targets. Use this list as valid targets to pass on to the repeated calls. - all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \ - $(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \ + all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \ + $(MAKE) -p -q -f common/makefiles/Main.gmk SPEC=$(firstword $(SPEC)) | \ grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) -$(all_phony_targets): - @$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true + $(all_phony_targets): + $(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \ + $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true + + .PHONY: $(all_phony_targets) endif endif diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index 03b088e883fc1666358563b40f41d15f5e3dd0f8..126993b5cd755cba0ed50a596d38dd637b06a453 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -43,6 +43,16 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK], fi ]) +# Appends a string to a path variable, only adding the : when needed. +AC_DEFUN([BASIC_APPEND_TO_PATH], +[ + if test "x[$]$1" = x; then + $1="$2" + else + $1="[$]$1:$2" + fi +]) + # This will make sure the given variable points to a full and proper # path. This means: # 1) There will be no spaces in the path. On posix platforms, @@ -351,7 +361,9 @@ fi AC_SUBST(SYS_ROOT) AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir], - [search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir]) + [search this directory for compilers and tools (for cross-compiling)])], + [TOOLS_DIR=$with_tools_dir] +) AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], [use this directory as base for tools-dir and sys-root (for cross-compiling)])], @@ -359,17 +371,14 @@ AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], if test "x$with_sys_root" != x; then AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time]) fi - if test "x$with_tools_dir" != x; then - AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time]) - fi - TOOLS_DIR=$with_devkit/bin + BASIC_FIXUP_PATH([with_devkit]) + BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin) if test -d "$with_devkit/$host_alias/libc"; then SYS_ROOT=$with_devkit/$host_alias/libc elif test -d "$with_devkit/$host/sys-root"; then SYS_ROOT=$with_devkit/$host/sys-root fi ]) - ]) AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], @@ -612,6 +621,14 @@ AC_PATH_PROGS(READELF, [readelf greadelf]) AC_PATH_PROG(HG, hg) AC_PATH_PROG(STAT, stat) AC_PATH_PROG(TIME, time) +# Check if it's GNU time +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` +if test "x$IS_GNU_TIME" != x; then + IS_GNU_TIME=yes +else + IS_GNU_TIME=no +fi +AC_SUBST(IS_GNU_TIME) if test "x$OPENJDK_TARGET_OS" = "xwindows"; then BASIC_REQUIRE_PROG(COMM, comm) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index b5619bf0d5f99b23bd9d118a3ccd43093a4c6057..5126b6fef35d85df2b0dd878f4b85b9c09e4dcde 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -800,6 +800,7 @@ OS_VERSION_MAJOR PKG_CONFIG CODESIGN XATTR +IS_GNU_TIME TIME STAT HG @@ -3089,6 +3090,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Also set JVM_ARG_OK to true/false depending on outcome. +# Appends a string to a path variable, only adding the : when needed. + + # This will make sure the given variable points to a full and proper # path. This means: # 1) There will be no spaces in the path. On posix platforms, @@ -3790,7 +3794,7 @@ fi #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1372808067 +DATE_WHEN_GENERATED=1373572212 ############################################################################### # @@ -7465,6 +7469,7 @@ fi # Check whether --with-tools-dir was given. if test "${with_tools_dir+set}" = set; then : withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir + fi @@ -7475,10 +7480,135 @@ if test "${with_devkit+set}" = set; then : if test "x$with_sys_root" != x; then as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5 fi - if test "x$with_tools_dir" != x; then - as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5 + + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # Input might be given as Windows format, start by converting to + # unix format. + path="$with_devkit" + new_path=`$CYGPATH -u "$path"` + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file precense. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5 + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-stile (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi + + + if test "x$path" != "x$new_path"; then + with_devkit="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$with_devkit" + has_colon=`$ECHO $path | $GREP ^.:` + new_path="$path" + if test "x$has_colon" = x; then + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $path` + fi + + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + if test "x$path" != "x$new_path"; then + with_devkit="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;} + fi + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + + else + # We're on a posix platform. Hooray! :) + path="$with_devkit" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 + fi + + # Use eval to expand a potential ~ + eval path="$path" + if test ! -f "$path" && test ! -d "$path"; then + as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5 fi - TOOLS_DIR=$with_devkit/bin + + with_devkit="`cd "$path"; $THEPWDCMD -L`" + fi + + + if test "x$TOOLS_DIR" = x; then + TOOLS_DIR="$with_devkit/bin" + else + TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin" + fi + if test -d "$with_devkit/$host_alias/libc"; then SYS_ROOT=$with_devkit/$host_alias/libc elif test -d "$with_devkit/$host/sys-root"; then @@ -7489,7 +7619,6 @@ fi - # Setup default logging of stdout and stderr to build.log in the output root. BUILD_LOG='$(OUTPUT_ROOT)/build.log' BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' @@ -10271,6 +10400,14 @@ $as_echo "no" >&6; } fi +# Check if it's GNU time +IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` +if test "x$IS_GNU_TIME" != x; then + IS_GNU_TIME=yes +else + IS_GNU_TIME=no +fi + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then @@ -17231,6 +17368,8 @@ $as_echo "ok" >&6; } # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk. VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'` VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'` + # Remove any paths containing # (typically F#) as that messes up make + PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'` VS_PATH="$PATH" @@ -18982,15 +19121,6 @@ $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_serve fi -if test "x$SYS_ROOT" != "x/" ; then - CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" - CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" - OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" - OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" - CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" - LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" -fi - # Store the CFLAGS etal passed to the configure script. ORG_CFLAGS="$CFLAGS" ORG_CXXFLAGS="$CXXFLAGS" @@ -19941,7 +20071,7 @@ $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\ elif test "x$OPENJDK_TARGET_OS" = xwindows; then # First line typically looks something like: # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 - COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` + COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` COMPILER_VENDOR="Microsoft CL.EXE" COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` @@ -21514,7 +21644,7 @@ $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\ elif test "x$OPENJDK_TARGET_OS" = xwindows; then # First line typically looks something like: # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 - COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` + COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` COMPILER_VENDOR="Microsoft CL.EXE" COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` @@ -23774,19 +23904,20 @@ $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} RC_FLAGS="$RC_FLAGS -d NDEBUG" fi - JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION - if test "x$JDK_UPDATE_VERSION" = x; then : - - JDK_UPDATE_VERSION_NOTNULL=0 -fi - RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" + # The version variables used to create RC_FLAGS may be overridden + # in a custom configure script, or possibly the command line. + # Let those variables be expanded at make time in spec.gmk. + # The \$ are escaped to the shell, and the $(...) variables + # are evaluated by make. + RC_FLAGS="$RC_FLAGS \ + -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \ + -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \ + -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ + -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \ + -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ + -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \ + -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\"" # lib.exe is used to create static libraries. # Extract the first word of "lib", so it can be a program name with args. diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 6114233c6e889c43ae2adf21ba1320b7fa7e6154..4707fc59a053fbac1c1c00e3dd6ca69a472a14b0 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -516,6 +516,7 @@ TAR:=@TAR@ TAIL:=@TAIL@ TEE:=@TEE@ TIME:=@TIME@ +IS_GNU_TIME:=@IS_GNU_TIME@ TR:=@TR@ TOUCH:=@TOUCH@ UNIQ:=@UNIQ@ diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index 16c1740220f6e7abf737cfbe359ede71a41dc9e0..17d84e9a6fa4b28b1c5b3445d792562631d6c3bf 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -47,7 +47,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION], elif test "x$OPENJDK_TARGET_OS" = xwindows; then # First line typically looks something like: # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 - COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1` + COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"` COMPILER_VENDOR="Microsoft CL.EXE" COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` @@ -226,15 +226,6 @@ BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx, ], []) -if test "x$SYS_ROOT" != "x/" ; then - CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" - CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" - OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" - OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" - CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" - LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" -fi - # Store the CFLAGS etal passed to the configure script. ORG_CFLAGS="$CFLAGS" ORG_CXXFLAGS="$CXXFLAGS" @@ -378,17 +369,20 @@ AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [ AS_IF([test "x$VARIANT" = xOPT], [ RC_FLAGS="$RC_FLAGS -d NDEBUG" ]) - JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION - AS_IF([test "x$JDK_UPDATE_VERSION" = x], [ - JDK_UPDATE_VERSION_NOTNULL=0 - ]) - RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" - RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" + + # The version variables used to create RC_FLAGS may be overridden + # in a custom configure script, or possibly the command line. + # Let those variables be expanded at make time in spec.gmk. + # The \$ are escaped to the shell, and the $(...) variables + # are evaluated by make. + RC_FLAGS="$RC_FLAGS \ + -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \ + -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \ + -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ + -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \ + -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ + -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \ + -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\"" # lib.exe is used to create static libraries. AC_CHECK_PROG([WINAR], [lib],[lib],,,) diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4 index 966c01339953a939e1fc236bd2b7a8ba8317b034..e5d4fff38f9908c0c28854b7abf6c378c7b38358 100644 --- a/common/autoconf/toolchain_windows.m4 +++ b/common/autoconf/toolchain_windows.m4 @@ -208,6 +208,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk. VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'` VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'` + # Remove any paths containing # (typically F#) as that messes up make + PATH=`$ECHO "$PATH" | $SED 's/[[^:#]]*#[^:]*://g'` VS_PATH="$PATH" AC_SUBST(VS_INCLUDE) AC_SUBST(VS_LIB) diff --git a/common/makefiles/JavaCompilation.gmk b/common/makefiles/JavaCompilation.gmk index 4301cee1f0b31a3e5598febcb112263d016e1845..50b05865f00d08595d3db149899bdef805db8955 100644 --- a/common/makefiles/JavaCompilation.gmk +++ b/common/makefiles/JavaCompilation.gmk @@ -155,7 +155,7 @@ define SetupArchive # lines, but not here for use in make dependencies. $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES)))) ifeq (,$$($1_SKIP_METAINF)) - $1_DEPS+=$$(call CacheFind $$(wildcard $$(addsuffix /META-INF,$$($1_SRCS)))) + $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS)))) endif endif @@ -255,12 +255,21 @@ define SetupZipArchive $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk)) + # To avoid running find over too large sets of files, which causes make to crash + # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set + # of directories to run find in, if available. + ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),) + $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC),\ + $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES)))) + else + $1_FIND_LIST := $$($1_SRC) + endif + # Find all files in the source tree. $1_ALL_SRCS := $$(call not-containing,_the.,\ - $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind $$($1_SRC)))) + $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST)))) ifneq ($$($1_INCLUDES),) - $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES)))) ifneq ($$($1_SUFFIXES),) $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\ $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES)))) @@ -269,12 +278,8 @@ define SetupZipArchive endif endif ifneq ($$($1_INCLUDE_FILES),) - $1_SRC_INCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES))) $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES)) endif - ifneq ($$($1_SRC_INCLUDES),) - $1_ALL_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS)) - endif ifneq ($$($1_EXCLUDES),) $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES)))) $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES))) diff --git a/common/makefiles/MakeBase.gmk b/common/makefiles/MakeBase.gmk index 98a56f86cd141d47e326de5d3566d6bc0b309a59..d2bf4aaabee9d7bf54f194357a5608543ade332d 100644 --- a/common/makefiles/MakeBase.gmk +++ b/common/makefiles/MakeBase.gmk @@ -332,9 +332,11 @@ define SetupLogging # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make # For each target executed, will print # Building (from ) ( newer) - # but with a limit of 20 on , to avoid cluttering logs too much (and causing a crash on Cygwin). - OLD_SHELL:=$$(SHELL) - WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL) + # but with a limit of 20 on , to avoid cluttering logs too much + # (and causing a crash on Cygwin). + # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris. + # Only use time if it's GNU time which supports format and output file. + 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 SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL) endif # Never remove warning messages; this is just for completeness