Merge
This commit is contained in:
commit
c0190983ad
@ -983,3 +983,26 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
IS_RECONFIGURE=no
|
||||
fi
|
||||
])
|
||||
|
||||
# Check for support for specific options in bash
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
|
||||
[
|
||||
# Test if bash supports pipefail.
|
||||
AC_MSG_CHECKING([if bash supports pipefail])
|
||||
if ${BASH} -c 'set -o pipefail'; then
|
||||
BASH_ARGS="$BASH_ARGS -o pipefail"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if bash supports errexit (-e)])
|
||||
if ${BASH} -e -c 'true'; then
|
||||
BASH_ARGS="$BASH_ARGS -e"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(BASH_ARGS)
|
||||
])
|
||||
|
@ -46,8 +46,12 @@ endif
|
||||
BOOT_JDK := $(JDK_IMAGE_DIR)
|
||||
|
||||
# The bootcycle build has a different output directory
|
||||
BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build
|
||||
SJAVAC_SERVER_DIR:=$(subst @BUILD_OUTPUT@,$(BUILD_OUTPUT),$(SJAVAC_SERVER_DIR))
|
||||
OLD_BUILD_OUTPUT:=@BUILD_OUTPUT@
|
||||
BUILD_OUTPUT:=$(OLD_BUILD_OUTPUT)/bootcycle-build
|
||||
# The HOTSPOT_DIST dir is not defined relative to BUILD_OUTPUT in spec.gmk. Must not
|
||||
# use space in this patsubst to avoid leading space in HOTSPOT_DIST.
|
||||
HOTSPOT_DIST:=$(patsubst $(OLD_BUILD_OUTPUT)%,$(BUILD_OUTPUT)%,$(HOTSPOT_DIST))
|
||||
SJAVAC_SERVER_DIR:=$(patsubst $(OLD_BUILD_OUTPUT)%, $(BUILD_OUTPUT)%, $(SJAVAC_SERVER_DIR))
|
||||
|
||||
JAVA_CMD:=$(BOOT_JDK)/bin/java
|
||||
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
|
||||
|
@ -113,6 +113,7 @@ HELP_SETUP_DEPENDENCY_HELP
|
||||
|
||||
# Setup tools that requires more complex handling, or that is not needed by the configure script.
|
||||
BASIC_SETUP_COMPLEX_TOOLS
|
||||
BASIC_CHECK_BASH_OPTIONS
|
||||
|
||||
# Check if pkg-config is available.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
@ -854,6 +854,7 @@ OS_VERSION_MICRO
|
||||
OS_VERSION_MINOR
|
||||
OS_VERSION_MAJOR
|
||||
PKG_CONFIG
|
||||
BASH_ARGS
|
||||
CODESIGN
|
||||
XATTR
|
||||
DSYMUTIL
|
||||
@ -3531,6 +3532,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
|
||||
|
||||
|
||||
# Check for support for specific options in bash
|
||||
|
||||
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@ -4387,7 +4391,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1421420310
|
||||
DATE_WHEN_GENERATED=1422461639
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -19471,6 +19475,32 @@ $as_echo "yes" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
# Test if bash supports pipefail.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
|
||||
$as_echo_n "checking if bash supports pipefail... " >&6; }
|
||||
if ${BASH} -c 'set -o pipefail'; then
|
||||
BASH_ARGS="$BASH_ARGS -o pipefail"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
|
||||
$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
|
||||
if ${BASH} -e -c 'true'; then
|
||||
BASH_ARGS="$BASH_ARGS -e"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Check if pkg-config is available.
|
||||
|
||||
|
||||
|
@ -78,6 +78,11 @@ endif
|
||||
OUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@
|
||||
OUTPUT_SYNC:=@OUTPUT_SYNC@
|
||||
|
||||
# Override the shell with bash
|
||||
BASH:=@BASH@
|
||||
BASH_ARGS:=@BASH_ARGS@
|
||||
SHELL:=$(BASH) $(BASH_ARGS)
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
CONF_NAME:=@CONF_NAME@
|
||||
|
||||
@ -495,7 +500,6 @@ endif
|
||||
# Tools adhering to a minimal and common standard of posix compliance.
|
||||
AWK:=@AWK@
|
||||
BASENAME:=@BASENAME@
|
||||
BASH:=@BASH@
|
||||
CAT:=@CAT@
|
||||
CCACHE:=@CCACHE@
|
||||
# CD is going away, but remains to cater for legacy makefiles.
|
||||
|
@ -448,7 +448,7 @@ exploded-image: $(ALL_MODULE_TARGETS)
|
||||
# alias for ease of use.
|
||||
jdk: exploded-image
|
||||
|
||||
images: test-image jimages demos samples zip-security
|
||||
images: test-image jimages demos samples zip-security verify-modules
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
images: mac-bundles
|
||||
|
@ -129,17 +129,20 @@ define SetupArchiveInner
|
||||
$1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
# On windows, a lot of includes/excludes risk making the command line too long, so
|
||||
# writing the grep patterns to files.
|
||||
# Grep returns 1 if nothing is matched. Do not fail the build for this.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_GREP_INCLUDE_PATTERNS:=$$(call EscapeDollar, \
|
||||
$$(foreach src,$$($1_SRCS), $$(addprefix $$(src)/,$$($1_INCLUDES))))
|
||||
# If there are a lot of include patterns, output to file to shorten command lines
|
||||
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
|
||||
$1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
|
||||
$1_GREP_INCLUDES:=| ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
|
||||
|| test "$$$$?" = "1" )
|
||||
else
|
||||
$1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
|
||||
$$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include)
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
$1_GREP_INCLUDES:=| ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
|
||||
|| test "$$$$?" = "1" )
|
||||
endif
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
|
||||
@ -148,12 +151,14 @@ define SetupArchiveInner
|
||||
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES))))
|
||||
# If there are a lot of include patterns, output to file to shorten command lines
|
||||
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
|
||||
$1_GREP_EXCLUDES:=| ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
|
||||
|| test "$$$$?" = "1" )
|
||||
else
|
||||
$1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
|
||||
$$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
$1_GREP_EXCLUDES:=| ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
|
||||
|| test "$$$$?" = "1" )
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -225,9 +230,11 @@ define SetupArchiveInner
|
||||
$$($1_CAPTURE_EXTRA_FILES)
|
||||
|
||||
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
|
||||
# Find returns non zero if the META-INF dir does not exist, ignore this.
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS), \
|
||||
( $(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/|-C $$(src) |g' >> \
|
||||
( ( $(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null || true ) \
|
||||
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \
|
||||
$$($1_BIN)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE) )
|
||||
endif
|
||||
# The capture deletes macro finds all deleted files and concatenates them. The resulting file
|
||||
@ -251,9 +258,11 @@ define SetupArchiveInner
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
|
||||
$$($1_CAPTURE_EXTRA_FILES)
|
||||
|
||||
# Find returns non zero if the META-INF dir does not exist, ignore this.
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
|
||||
( $(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/|-C $$(src) |g' >> \
|
||||
( ( $(FIND) $$(src)/META-INF -type f 2> /dev/null || true ) \
|
||||
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \
|
||||
$$($1_BIN)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
|
||||
endif
|
||||
$1_SUPDATE_CONTENTS=$(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)
|
||||
|
@ -349,7 +349,7 @@ define SetupLogging
|
||||
# (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:=$$(BASH) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(BASH)
|
||||
WRAPPER_SHELL:=$$(BASH) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(SHELL)
|
||||
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
|
||||
@ -445,7 +445,9 @@ not-containing = $(strip $(foreach v,$(strip $2),$(if $(findstring $(strip $1),$
|
||||
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
||||
|
||||
# String equals
|
||||
equals = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
|
||||
equals = \
|
||||
$(and $(findstring $(strip $1),$(strip $2)),\
|
||||
$(findstring $(strip $2),$(strip $1)))
|
||||
|
||||
ifneq ($(DISABLE_CACHE_FIND), true)
|
||||
################################################################################
|
||||
@ -626,8 +628,8 @@ DependOnVariableHelper = \
|
||||
$(call ReadFile, $(call DependOnVariableFileName, $1, $2)))),,\
|
||||
$(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
|
||||
$(if $(findstring $(LOG_LEVEL), trace), \
|
||||
$(info Variable $1: $(strip $($1))) \
|
||||
$(info File: $(call ReadFile, $(call DependOnVariableFileName, $1, $2)))) \
|
||||
$(info Variable $1: >$(strip $($1))<) \
|
||||
$(info File: >$(call ReadFile, $(call DependOnVariableFileName, $1, $2))<)) \
|
||||
$(call WriteFile, $($1), $(call DependOnVariableFileName, $1, $2))) \
|
||||
$(call DependOnVariableFileName, $1, $2))
|
||||
|
||||
|
@ -133,7 +133,8 @@ define add_native_source
|
||||
($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
|
||||
$(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
|
||||
| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$(notdir $2)$$$$" ; exit `cat $$($1_$2_DEP).exitvalue`
|
||||
-e "^$(notdir $2)$$$$" || test "$$$$?" = "1" ; \
|
||||
exit `cat $$($1_$2_DEP).exitvalue`
|
||||
$(RM) $$($1_$2_DEP).exitvalue
|
||||
($(ECHO) $$@: \\ \
|
||||
&& $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) > $$($1_$2_DEP)
|
||||
|
@ -62,6 +62,20 @@ $(ESCAPE_DOLLAR_DIR)/_escape_dollar: $(DEPS)
|
||||
|
||||
TEST_TARGETS += $(ESCAPE_DOLLAR_DIR)/_escape_dollar
|
||||
|
||||
################################################################################
|
||||
# Test Equals
|
||||
|
||||
EQUALS_VALUE1 := value1$(SPACE)
|
||||
EQUALS_VALUE2 := value2
|
||||
|
||||
ifneq ($(call equals, $(EQUALS_VALUE1), $(EQUALS_VALUE2)), )
|
||||
$(error The strings >$(EQUALS_VALUE1)< and >$(EQUALS_VALUE2)< are equal)
|
||||
endif
|
||||
|
||||
ifeq ($(call equals, $(EQUALS_VALUE1), $(EQUALS_VALUE1)), )
|
||||
$(error The strings >$(EQUALS_VALUE1)< and >$(EQUALS_VALUE1)< are not equal)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Test ShellQuote
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user