aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkatleman <none@none>2013-07-02 15:55:14 -0700
committerkatleman <none@none>2013-07-02 15:55:14 -0700
commitfdb9bd16e2790b7454320e3fc9a5a2869f064845 (patch)
tree275e449d323e1d6cf2208ee652658852e10167ef
parentb2c6c4031273490b7a1336b7008674e99495aea8 (diff)
parent14774cfe35642e6cd44300ff25eebd05e5ea099d (diff)
-rw-r--r--NewMakefile.gmk11
-rw-r--r--common/autoconf/basics.m429
-rw-r--r--common/autoconf/generated-configure.sh185
-rw-r--r--common/autoconf/spec.gmk.in1
-rw-r--r--common/autoconf/toolchain.m436
-rw-r--r--common/makefiles/JavaCompilation.gmk19
-rw-r--r--common/makefiles/MakeBase.gmk8
7 files changed, 220 insertions, 69 deletions
diff --git a/NewMakefile.gmk b/NewMakefile.gmk
index 0331832..101ebe0 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 03b088e..126993b 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 e41a488..b9c2b38 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -799,6 +799,7 @@ OS_VERSION_MAJOR
PKG_CONFIG
CODESIGN
XATTR
+IS_GNU_TIME
TIME
STAT
HG
@@ -3083,6 +3084,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,
@@ -3782,7 +3786,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1371547824
+DATE_WHEN_GENERATED=1372770384
###############################################################################
#
@@ -7457,6 +7461,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
@@ -7467,10 +7472,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
@@ -7481,7 +7611,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'
@@ -10222,6 +10351,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
@@ -18933,15 +19070,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"
@@ -19892,7 +20020,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"`
@@ -21465,7 +21593,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"`
@@ -23725,19 +23853,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 272a003..c30fd35 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -510,6 +510,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 10d7728..b2b367f 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/makefiles/JavaCompilation.gmk b/common/makefiles/JavaCompilation.gmk
index 4301cee..50b0586 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 98a56f8..d2bf4aa 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 <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
- # but with a limit of 20 on <ALL NEWER PREREQUISITES>, 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 <ALL NEWER PREREQUISITES>, 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