This commit is contained in:
J. Duke 2017-07-05 23:08:08 +02:00
commit e265be05e3
15 changed files with 346 additions and 41 deletions

View File

@ -405,3 +405,6 @@ a4087bc10a88a43ea3ad0919b5b4af1c86977221 jdk-9+158
fe8466adaef8178dba94be53c789a0aaa87d13bb jdk-9+159
4d29ee32d926ebc960072d51a3bc558f95c1cbad jdk-9+160
cda60babd152d889aba4d8f20a8f643ab151d3de jdk-9+161
21b063d75b3edbffb9bebc8872d990920c4ae1e5 jdk-9+162
c38c6b270ccc8e2b86d1631bcf42248241b54d2c jdk-9+163
7810f75d016a52e32295c4233009de5ca90e31af jdk-9+164

View File

@ -1098,6 +1098,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
BASIC_PATH_PROGS(HG, hg)
BASIC_PATH_PROGS(STAT, stat)
BASIC_PATH_PROGS(TIME, time)
BASIC_PATH_PROGS(FLOCK, flock)
# Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
# be in the user path.
BASIC_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)

View File

@ -355,7 +355,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
fi
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path[$]1'
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
@ -375,7 +375,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
# Linking is different on MacOSX
PICFLAG=''
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path[$]1'
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'

View File

@ -932,6 +932,7 @@ DSYMUTIL
IS_GNU_TIME
PATCH
DTRACE
FLOCK
TIME
STAT
HG
@ -994,6 +995,7 @@ OPENJDK_TARGET_CPU_ISADIR
OPENJDK_TARGET_CPU_LEGACY_LIB
OPENJDK_TARGET_CPU_LEGACY
REQUIRED_OS_VERSION
REQUIRED_OS_ARCH
REQUIRED_OS_NAME
COMPILE_TYPE
OPENJDK_TARGET_CPU_ENDIAN
@ -1292,6 +1294,7 @@ READELF
HG
STAT
TIME
FLOCK
DTRACE
PATCH
DSYMUTIL
@ -2256,6 +2259,7 @@ Some influential environment variables:
HG Override default value for HG
STAT Override default value for STAT
TIME Override default value for TIME
FLOCK Override default value for FLOCK
DTRACE Override default value for DTRACE
PATCH Override default value for PATCH
DSYMUTIL Override default value for DSYMUTIL
@ -5173,7 +5177,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=1489410066
DATE_WHEN_GENERATED=1490900744
###############################################################################
#
@ -16038,13 +16042,15 @@ $as_echo "$COMPILE_TYPE" >&6; }
fi
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
REQUIRED_OS_NAME=Darwin
REQUIRED_OS_NAME="Mac OS X"
REQUIRED_OS_VERSION=11.2
fi
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
REQUIRED_OS_NAME=AIX
REQUIRED_OS_VERSION=7.1
fi
REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
@ -23056,6 +23062,203 @@ $as_echo "$tool_specified" >&6; }
fi
# Publish this variable in the help.
if [ -z "${FLOCK+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in flock
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FLOCK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $FLOCK in
[\\/]* | ?:[\\/]*)
ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
FLOCK=$ac_cv_path_FLOCK
if test -n "$FLOCK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
$as_echo "$FLOCK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$FLOCK" && break
done
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !FLOCK! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "xFLOCK" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
for ac_prog in flock
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FLOCK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $FLOCK in
[\\/]* | ?:[\\/]*)
ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
FLOCK=$ac_cv_path_FLOCK
if test -n "$FLOCK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
$as_echo "$FLOCK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$FLOCK" && break
done
else
# If it succeeded, then it was overridden by the user. We will use it
# for the tool.
# First remove it from the list of overridden variables, so we can test
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
# Check if we try to supply an empty value
if test "x$FLOCK" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
$as_echo_n "checking for FLOCK... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
else
# Check if the provided tool contains a complete path.
tool_specified="$FLOCK"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
# Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FLOCK+:} false; then :
$as_echo_n "(cached) " >&6
else
case $FLOCK in
[\\/]* | ?:[\\/]*)
ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
FLOCK=$ac_cv_path_FLOCK
if test -n "$FLOCK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
$as_echo "$FLOCK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$FLOCK" = x; then
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
$as_echo_n "checking for FLOCK... " >&6; }
if test ! -x "$tool_specified"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
# Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
# be in the user path.
@ -49486,7 +49689,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
fi
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
@ -49506,7 +49709,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
# Linking is different on MacOSX
PICFLAG=''
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'

View File

@ -452,15 +452,17 @@ AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
fi
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
REQUIRED_OS_NAME=Darwin
REQUIRED_OS_NAME="Mac OS X"
REQUIRED_OS_VERSION=11.2
fi
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
REQUIRED_OS_NAME=AIX
REQUIRED_OS_VERSION=7.1
fi
REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
AC_SUBST(REQUIRED_OS_NAME)
AC_SUBST(REQUIRED_OS_ARCH)
AC_SUBST(REQUIRED_OS_VERSION)
])

View File

@ -48,7 +48,7 @@ MAKE := @MAKE@
# The default make arguments
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS)
OUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@
OUTPUT_SYNC:=@OUTPUT_SYNC@
@ -101,8 +101,9 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
# Legacy OS values for use in release file.
# OS values for use in release file.
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
REQUIRED_OS_ARCH:=@REQUIRED_OS_ARCH@
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
LIBM:=@LIBM@
@ -636,6 +637,7 @@ DIRNAME:=@DIRNAME@
DSYMUTIL:=@DSYMUTIL@
FIND:=@FIND@
FIND_DELETE:=@FIND_DELETE@
FLOCK:=@FLOCK@
ECHO:=@ECHO@
EGREP:=@EGREP@
FGREP:=@FGREP@

View File

@ -22,26 +22,48 @@
# questions.
#
# Usage: sh shell-tracer.sh <TIME_CMD> <OUTPUT_FILE> <OLD_SHELL> <shell command line>
# Usage: sh shell-tracer.sh <TIME_CMD_TYPE> <TIME_CMD> <OUTPUT_FILE> <shell command line>
#
# This shell script is supposed to be set as a replacement for SHELL in make,
# causing it to be called whenever make wants to execute shell commands.
# The <shell command line> is suitable for passing on to the old shell,
# typically beginning with -c.
#
# This script will make sure the shell command line is executed with
# OLD_SHELL -x, and it will also store a simple log of the the time it takes to
# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
# to by TIME_CMD. If TIME_CMD is "-", no timestamp will be stored.
# This script will run the shell command line and it will also store a simple
# log of the the time it takes to execute the command in the OUTPUT_FILE, using
# utility for time measure specified with TIME_CMD option.
#
# Type of time measure utility is specified with TIME_CMD_TYPE option.
# Recognized options values of TIME_CMD_TYPE option: "gnutime", "flock".
TIME_CMD="$1"
OUTPUT_FILE="$2"
OLD_SHELL="$3"
TIME_CMD_TYPE="$1"
TIME_CMD="$2"
OUTPUT_FILE="$3"
shift
shift
shift
if [ "$TIME_CMD" != "-" ]; then
"$TIME_CMD" -f "[TIME:%E] $*" -a -o "$OUTPUT_FILE" "$OLD_SHELL" -x "$@"
if [ "$TIME_CMD_TYPE" = "gnutime" ]; then
# Escape backslashes (\) and percent chars (%). See man for GNU 'time'.
msg=${@//\\/\\\\}
msg=${msg//%/%%}
"$TIME_CMD" -f "[TIME:%E] $msg" -a -o "$OUTPUT_FILE" "$@"
elif [ "$TIME_CMD_TYPE" = "flock" ]; then
# Emulated GNU 'time' with 'flock' and 'date'.
ts=`date +%s%3N`
"$@"
status=$?
ts2=`date +%s%3N`
millis=$((ts2 - ts))
ms=$(($millis % 1000))
seconds=$((millis / 1000))
ss=$(($seconds % 60))
minutes=$(($seconds / 60))
mm=$(($minutes % 60))
hh=$(($minutes / 60)):
[ $hh != "0:" ] || hh=
# Synchronize on this script.
flock -w 10 "$0" printf "[TIME:${hh}${mm}:${ss}.%.2s] %s\n" $ms "$*" >> "$OUTPUT_FILE" || true
exit $status
else
"$OLD_SHELL" -x "$@"
"$@"
fi

View File

@ -910,7 +910,7 @@ var getJibProfilesDependencies = function (input, common) {
freetype: {
organization: common.organization,
ext: "tar.gz",
revision: "2.3.4+1.0",
revision: "2.7.1-v120+1.0",
module: "freetype-" + input.target_platform
}
};

View File

@ -135,9 +135,8 @@ $(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
$(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@)
$(JMOD) create \
--module-version $(VERSION_SHORT) \
--os-name $(REQUIRED_OS_NAME) \
--os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
--os-version $(REQUIRED_OS_VERSION) \
--os-name '$(REQUIRED_OS_NAME)' \
--os-arch '$(REQUIRED_OS_ARCH)' \
--module-path $(JMODS_DIR) \
--exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \
$(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@)

View File

@ -119,6 +119,7 @@ JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
--module-path $(IMAGES_OUTPUTDIR)/jmods \
--endian $(OPENJDK_BUILD_CPU_ENDIAN) \
--release-info $(BASE_RELEASE_FILE) \
--release-info add:OS_VERSION=\"$(REQUIRED_OS_VERSION)\" \
--order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
--dedup-legal-notices=error-if-not-same-content \
$(JLINK_JLI_CLASSES) \

View File

@ -117,7 +117,7 @@ ifeq ($(HAS_SPEC),)
# Check that CONF_CHECK is valid.
$(eval $(call ParseConfCheckOption))
# Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE and MAKE_LOG_FLAGS.
# Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, MAKE_LOG_VARS and MAKE_LOG_FLAGS.
$(eval $(call ParseLogLevel))
# After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
@ -171,7 +171,7 @@ ifeq ($(HAS_SPEC),)
MAKE_INIT_WITH_SPEC_ARGUMENTS := ACTUAL_TOPDIR=$(topdir) \
USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
LOG_LEVEL=$(LOG_LEVEL) LOG_NOFILE=$(LOG_NOFILE) LOG_CMDLINES=$(LOG_CMDLINES) \
$(MAKE_LOG_VARS) \
INIT_TARGETS="$(INIT_TARGETS)" \
SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
PARALLEL_TARGETS="$(PARALLEL_TARGETS)"
@ -319,6 +319,7 @@ else # HAS_SPEC=true
exit 1 ; \
fi
$(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE)
$(call ReportProfileTimes)
endif
on-failure:
@ -327,6 +328,7 @@ else # HAS_SPEC=true
$(call ReportBuildTimes)
$(call PrintFailureReports)
$(call PrintBuildLogFailures)
$(call ReportProfileTimes)
$(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n"
ifneq ($(COMPARE_BUILD), )
$(call CleanupCompareBuild)

View File

@ -158,6 +158,18 @@ ifeq ($(HAS_SPEC),)
# If the "cmdline" argument is given, act on it and strip it away
$$(eval $$(call ParseLogOption, cmdlines, LOG_CMDLINES))
# If the "profile-to-log" argument is given, write shell times in build log
$$(eval $$(call ParseLogOption, profile-to-log, LOG_PROFILE_TIMES_LOG))
# If the "profile" argument is given, write shell times in separate log file
# IMPORTANT: $(ParseLogOption profile-to-log) should go first. Otherwise
# parsing of 'LOG=debug,profile-to-log,nofile' ends up in the following error:
# Error: LOG contains unknown option or log level: debug-to-log.
$$(eval $$(call ParseLogOption, profile, LOG_PROFILE_TIMES_FILE))
# Treat LOG=profile-to-log as if it were LOG=profile,profile-to-log
LOG_PROFILE_TIMES_FILE := $$(firstword $$(LOG_PROFILE_TIMES_FILE) $$(LOG_PROFILE_TIMES_LOG))
LOG_LEVEL := $$(LOG)
ifeq ($$(LOG_LEVEL),)
@ -175,7 +187,7 @@ ifeq ($(HAS_SPEC),)
MAKE_LOG_FLAGS :=
else
$$(info Error: LOG contains unknown option or log level: $$(LOG).)
$$(info LOG can be <level>[,<opt>[...]] where <opt> is nofile | cmdlines)
$$(info LOG can be <level>[,<opt>[...]] where <opt> is nofile | cmdlines | profile | profile-to-log)
$$(info and <level> is warn | info | debug | trace)
$$(error Cannot continue)
endif
@ -309,7 +321,7 @@ ifeq ($(HAS_SPEC),)
@( cd $$(topdir) && \
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(topdir)/make/Main.gmk \
-I $$(topdir)/make/common SPEC=$(strip $2) NO_RECIPES=true \
LOG_LEVEL=$$(LOG_LEVEL) \
$$(MAKE_LOG_VARS) \
create-main-targets-include )
# Now include main-targets.gmk. This will define ALL_MAIN_TARGETS.
@ -334,7 +346,7 @@ else # $(HAS_SPEC)=true
# Define basic logging setup
BUILD_LOG := $(OUTPUT_ROOT)/build.log
BUILD_TRACE_LOG := $(OUTPUT_ROOT)/build-trace-time.log
BUILD_PROFILE_LOG := $(OUTPUT_ROOT)/build-profile.log
BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
@ -494,9 +506,9 @@ else # $(HAS_SPEC)=true
define RotateLogFiles
$(RM) $(BUILD_LOG).old 2> /dev/null && \
$(MV) $(BUILD_LOG) $(BUILD_LOG).old 2> /dev/null || true
$(if $(findstring trace, $(LOG_LEVEL)), \
$(RM) $(BUILD_TRACE_LOG).old 2> /dev/null && \
$(MV) $(BUILD_TRACE_LOG) $(BUILD_TRACE_LOG).old 2> /dev/null || true \
$(if $(findstring true, $(LOG_PROFILE_TIMES_FILE)), \
$(RM) $(BUILD_PROFILE_LOG).old 2> /dev/null && \
$(MV) $(BUILD_PROFILE_LOG) $(BUILD_PROFILE_LOG).old 2> /dev/null || true \
)
endef
@ -558,6 +570,22 @@ else # $(HAS_SPEC)=true
$(BUILD_LOG_PIPE)
endef
define ReportProfileTimes
$(if $(findstring true, $(LOG_PROFILE_TIMES_LOG)), \
[ ! -f $(BUILD_PROFILE_LOG) ] || \
{ $(ECHO) Begin $(notdir $(BUILD_PROFILE_LOG)) && \
$(CAT) $(BUILD_PROFILE_LOG) && \
$(ECHO) End $(notdir $(BUILD_PROFILE_LOG)); \
} \
$(BUILD_LOG_PIPE)
)
endef
endif # HAS_SPEC
MAKE_LOG_VARS = $(foreach v, \
LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_PROFILE_TIMES_LOG LOG_PROFILE_TIMES_FILE, \
$v=$($v) \
)
endif # _INITSUPPORT_GMK

View File

@ -27,6 +27,7 @@ default: all
include $(SPEC)
include MakeBase.gmk
include $(JDK_TOPDIR)/make/Tools.gmk
include $(JDK_TOPDIR)/make/ModuleTools.gmk
################################################################################
@ -174,6 +175,7 @@ DEFAULT_JAVADOC_TAGS := \
-tag param \
-tag return \
-tag throws \
-taglet build.tools.taglet.ModuleGraph \
-tag since \
-tag version \
-tag serialData \
@ -188,6 +190,13 @@ DEFAULT_JAVADOC_TAGS := \
DEFAULT_JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
-serialwarn -encoding ISO-8859-1 -breakiterator --system none
#
# TODO: this should be set by the configure option.
#
ifndef ENABLE_MODULE_GRAPH
ENABLE_MODULE_GRAPH=false
endif
################################################################################
# Setup make rules for running javadoc.
#
@ -321,7 +330,8 @@ define SetupJavadocGenerationBody
$$(eval $$(call ListPathsSafely, $1_PACKAGES, $$($1_PACKAGES_FILE)))
endif
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1.javadoc, \
$$($1_JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) -d $$(@D) \
$$($1_JAVA) -Djava.awt.headless=true -DenableModuleGraph=$(ENABLE_MODULE_GRAPH) \
$(NEW_JAVADOC) -d $$(@D) \
$$(DEFAULT_JAVADOC_TAGS) $$(DEFAULT_JAVADOC_OPTIONS) \
--module-source-path $$(call PathList, $$(JAVADOC_SOURCE_DIRS)) \
$$($1_OPTIONS) $$($1_PACKAGES_ARG))
@ -734,6 +744,20 @@ $(JAVADOC_ARCHIVE): $(TARGETS) $(COPY_TARGETS)
ZIP_TARGETS += $(JAVADOC_ARCHIVE)
################################################################################
# generate .dot files for module graphs
JAVADOC_MODULE_GRAPHS_DIR := $(SUPPORT_OUTPUTDIR)/docs/module-graphs
JAVADOC_MODULE_GRAPHS := $(JAVADOC_MODULE_GRAPHS_DIR)/java.se.dot
JAVADOC_MODULE_GRAPHS_PROPS := $(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties
$(JAVADOC_MODULE_GRAPHS): $(BUILD_JIGSAW_TOOLS) $(JAVADOC_MODULE_GRAPHS_PROPS)
$(MKDIR) -p $(@D)
$(TOOL_GENGRAPHS) --spec --output $(JAVADOC_MODULE_GRAPHS_DIR) \
--dot-attributes $(JAVADOC_MODULE_GRAPHS_PROPS)
MODULE_GRAPH_TARGETS += $(JAVADOC_MODULE_GRAPHS)
################################################################################
# Hook to include the corresponding custom file, if present.
@ -741,12 +765,14 @@ $(eval $(call IncludeCustomExtension, , Javadoc.gmk))
################################################################################
docs-module-graphs: $(MODULE_GRAPH_TARGETS)
docs-javadoc: $(TARGETS)
docs-copy: $(COPY_TARGETS)
docs-zip: $(ZIP_TARGETS)
all: docs-javadoc docs-copy docs-zip
all: docs-module-graphs docs-javadoc docs-copy docs-zip
.PHONY: default all docs-javadoc docs-copy docs-zip
.PHONY: default all docs-module-graphs docs-javadoc docs-copy docs-zip

View File

@ -363,6 +363,9 @@ ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-im
################################################################################
# Docs targets
docs-module-graphs:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-module-graphs)
docs-javadoc:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-javadoc)
@ -375,7 +378,7 @@ docs-zip:
update-build-docs:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
ALL_TARGETS += docs-javadoc docs-copy docs-zip update-build-docs
ALL_TARGETS += docs-module-graphs docs-javadoc docs-copy docs-zip update-build-docs
################################################################################
# Cross compilation support
@ -772,6 +775,8 @@ else
bootcycle-images: jdk-image
docs-module-graphs: exploded-image buildtools-modules
docs-javadoc: $(GENSRC_TARGETS) rmic
# The gensrc step for jdk.jdi creates an html file that is used by docs-copy.
@ -929,7 +934,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif
# This target builds the documentation image
docs-image: docs-javadoc docs-copy
docs-image: docs-module-graphs docs-javadoc docs-copy
# This target builds the test image
test-image: prepare-test-image test-image-hotspot-jtreg-native \

View File

@ -355,17 +355,28 @@ FindAllReposRel = \
################################################################################
define SetupLogging
ifeq ($$(LOG_PROFILE_TIMES_FILE), true)
ifeq ($$(IS_GNU_TIME), yes)
SHELL := $$(BASH) $$(SRC_ROOT)/common/bin/shell-profiler.sh \
gnutime $$(TIME) \
$$(OUTPUT_ROOT)/build-profile.log $$(SHELL)
else ifneq ($$(FLOCK), )
SHELL := $$(BASH) $$(SRC_ROOT)/common/bin/shell-profiler.sh \
flock $$(FLOCK) \
$$(OUTPUT_ROOT)/build-profile.log $$(SHELL)
endif
endif
ifeq ($$(LOG_LEVEL), trace)
SHELL_NO_RECURSE := $$(SHELL)
# 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).
# 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 $$(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)
SHELL = $$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(SHELL_NO_RECURSE) -x
endif
# The warn level can never be turned off
LogWarn = $$(info $$(strip $$1))
LOG_WARN :=