8001931: The new build system whitespace cleanup

Reviewed-by: tbell, simonis, erikj
This commit is contained in:
Magnus Ihse Bursie 2013-10-10 14:58:19 +02:00
parent 3cb6eedf9f
commit 952d9ce87c
40 changed files with 10108 additions and 10122 deletions

View File

@ -37,16 +37,16 @@ TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a require
# Assume we have GNU make, but check version. # Assume we have GNU make, but check version.
ifeq (,$(findstring 3.81,$(MAKE_VERSION))) ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
ifeq (,$(findstring 3.82,$(MAKE_VERSION))) ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
endif endif
endif endif
# Locate this Makefile # Locate this Makefile
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
else else
makefile_path:=$(lastword $(MAKEFILE_LIST)) makefile_path:=$(lastword $(MAKEFILE_LIST))
endif endif
root_dir:=$(dir $(makefile_path)) root_dir:=$(dir $(makefile_path))
@ -58,27 +58,27 @@ $(eval $(call ParseConfAndSpec))
# Now determine if we have zero, one or several configurations to build. # Now determine if we have zero, one or several configurations to build.
ifeq ($(SPEC),) ifeq ($(SPEC),)
# Since we got past ParseConfAndSpec, we must be building a global target. Do nothing. # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
else else
ifeq ($(words $(SPEC)),1) ifeq ($(words $(SPEC)),1)
# We are building a single configuration. This is the normal case. Execute the Main.gmk file. # We are building a single configuration. This is the normal case. Execute the Main.gmk file.
include $(root_dir)/common/makefiles/Main.gmk include $(root_dir)/common/makefiles/Main.gmk
else else
# We are building multiple configurations. # We are building multiple configurations.
# First, find out the valid targets # First, find out the valid targets
# Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find # Run the makefile with an arbitrary 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. # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \ all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
$(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \ $(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
$(all_phony_targets): $(all_phony_targets):
@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \ @$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
.PHONY: $(all_phony_targets) .PHONY: $(all_phony_targets)
endif endif
endif endif
# Include this after a potential spec file has been included so that the bundles target # Include this after a potential spec file has been included so that the bundles target

View File

@ -62,7 +62,7 @@ if test -e $custom_hook; then
# We have custom sources available; also generate configure script # We have custom sources available; also generate configure script
# with custom hooks compiled in. # with custom hooks compiled in.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
rm -rf autom4te.cache rm -rf autom4te.cache
else else
echo No custom hook found: $custom_hook echo No custom hook found: $custom_hook

View File

@ -24,23 +24,23 @@
# #
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2\ # If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome. # Also set JVM_ARG_OK to true/false depending on outcome.
AC_DEFUN([ADD_JVM_ARG_IF_OK], AC_DEFUN([ADD_JVM_ARG_IF_OK],
[ [
$ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
$ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
OUTPUT=`$3 $1 -version 2>&1` OUTPUT=`$3 $1 -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
$2="[$]$2 $1" $2="[$]$2 $1"
JVM_ARG_OK=true JVM_ARG_OK=true
else else
$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD $ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD $ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
JVM_ARG_OK=false JVM_ARG_OK=false
fi fi
]) ])
# Appends a string to a path variable, only adding the : when needed. # Appends a string to a path variable, only adding the : when needed.
@ -82,7 +82,7 @@ AC_DEFUN([BASIC_FIXUP_PATH],
AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.]) AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
fi fi
$1="`cd "$path"; $THEPWDCMD -L`" $1="`cd "$path"; $THEPWDCMD -L`"
fi fi
]) ])
@ -129,78 +129,78 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.]) AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
new_path="$path" new_path="$path"
fi fi
if test "x$new_path" = x; then if test "x$new_path" = x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.]) AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "` has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then if test "x$has_space" != x; then
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.]) AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi fi
# Now join together the path and the arguments once again # Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}" new_complete="$new_path ${arguments% *}"
else else
new_complete="$new_path" new_complete="$new_path"
fi fi
if test "x$complete" != "x$new_complete"; then if test "x$complete" != "x$new_complete"; then
$1="$new_complete" $1="$new_complete"
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"]) AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
fi fi
]) ])
AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS], AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
[ [
if test "x$OPENJDK_BUILD_OS" != xwindows; then if test "x$OPENJDK_BUILD_OS" != xwindows; then
# Follow a chain of symbolic links. Use readlink # Follow a chain of symbolic links. Use readlink
# where it exists, else fall back to horribly # where it exists, else fall back to horribly
# complicated shell code. # complicated shell code.
if test "x$READLINK_TESTED" != yes; then if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different # On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink. # purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --version 2>&1 | $GREP GNU` ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then if test "x$ISGNU" = x; then
# A readlink that we do not know how to use. # A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there? # Are there other non-GNU readlinks out there?
READLINK_TESTED=yes READLINK_TESTED=yes
READLINK= READLINK=
fi fi
fi
if test "x$READLINK" != x; then
$1=`$READLINK -f [$]$1`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME [$]$1`
sym_link_file=`$BASENAME [$]$1`
cd $sym_link_dir
# Use -P flag to resolve symlinks in directories.
cd `$THEPWDCMD -P`
sym_link_dir=`$THEPWDCMD -P`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD -P`
sym_link_file=`$BASENAME $ISLINK`
let COUNTER=COUNTER+1
done
cd $STARTDIR
$1=$sym_link_dir/$sym_link_file
fi
fi fi
if test "x$READLINK" != x; then
$1=`$READLINK -f [$]$1`
else
# Save the current directory for restoring afterwards
STARTDIR=$PWD
COUNTER=0
sym_link_dir=`$DIRNAME [$]$1`
sym_link_file=`$BASENAME [$]$1`
cd $sym_link_dir
# Use -P flag to resolve symlinks in directories.
cd `$THEPWDCMD -P`
sym_link_dir=`$THEPWDCMD -P`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD -P`
sym_link_file=`$BASENAME $ISLINK`
let COUNTER=COUNTER+1
done
cd $STARTDIR
$1=$sym_link_dir/$sym_link_file
fi
fi
]) ])
# Register a --with argument but mark it as deprecated # Register a --with argument but mark it as deprecated
@ -214,12 +214,12 @@ AC_DEFUN([BASIC_DEPRECATED_ARG_WITH],
AC_DEFUN_ONCE([BASIC_INIT], AC_DEFUN_ONCE([BASIC_INIT],
[ [
# Save the original command line. This is passed to us by the wrapper configure script. # Save the original command line. This is passed to us by the wrapper configure script.
AC_SUBST(CONFIGURE_COMMAND_LINE) AC_SUBST(CONFIGURE_COMMAND_LINE)
DATE_WHEN_CONFIGURED=`LANG=C date` DATE_WHEN_CONFIGURED=`LANG=C date`
AC_SUBST(DATE_WHEN_CONFIGURED) AC_SUBST(DATE_WHEN_CONFIGURED)
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.]) AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.]) AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
]) ])
# Test that variable $1 denoting a program is not empty. If empty, exit with an error. # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
@ -227,15 +227,15 @@ AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
# $2: executable name to print in warning (optional) # $2: executable name to print in warning (optional)
AC_DEFUN([BASIC_CHECK_NONEMPTY], AC_DEFUN([BASIC_CHECK_NONEMPTY],
[ [
if test "x[$]$1" = x; then if test "x[$]$1" = x; then
if test "x$2" = x; then if test "x$2" = x; then
PROG_NAME=translit($1,A-Z,a-z) PROG_NAME=translit($1,A-Z,a-z)
else else
PROG_NAME=$2 PROG_NAME=$2
fi
AC_MSG_NOTICE([Could not find $PROG_NAME!])
AC_MSG_ERROR([Cannot continue])
fi fi
AC_MSG_NOTICE([Could not find $PROG_NAME!])
AC_MSG_ERROR([Cannot continue])
fi
]) ])
# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY. # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
@ -244,8 +244,8 @@ AC_DEFUN([BASIC_CHECK_NONEMPTY],
# $2: executable name to look for # $2: executable name to look for
AC_DEFUN([BASIC_REQUIRE_PROG], AC_DEFUN([BASIC_REQUIRE_PROG],
[ [
AC_PATH_PROGS($1, $2) AC_PATH_PROGS($1, $2)
BASIC_CHECK_NONEMPTY($1, $2) BASIC_CHECK_NONEMPTY($1, $2)
]) ])
# Setup the most fundamental tools that relies on not much else to set up, # Setup the most fundamental tools that relies on not much else to set up,
@ -253,171 +253,171 @@ AC_DEFUN([BASIC_REQUIRE_PROG],
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
[ [
# Start with tools that do not need have cross compilation support # Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are # and can be expected to be found in the default PATH. These tools are
# used by configure. Nor are these tools expected to be found in the # used by configure. Nor are these tools expected to be found in the
# devkit from the builddeps server either, since they are # devkit from the builddeps server either, since they are
# needed to download the devkit. # needed to download the devkit.
# First are all the simple required tools. # First are all the simple required tools.
BASIC_REQUIRE_PROG(BASENAME, basename) BASIC_REQUIRE_PROG(BASENAME, basename)
BASIC_REQUIRE_PROG(BASH, bash) BASIC_REQUIRE_PROG(BASH, bash)
BASIC_REQUIRE_PROG(CAT, cat) BASIC_REQUIRE_PROG(CAT, cat)
BASIC_REQUIRE_PROG(CHMOD, chmod) BASIC_REQUIRE_PROG(CHMOD, chmod)
BASIC_REQUIRE_PROG(CMP, cmp) BASIC_REQUIRE_PROG(CMP, cmp)
BASIC_REQUIRE_PROG(COMM, comm) BASIC_REQUIRE_PROG(COMM, comm)
BASIC_REQUIRE_PROG(CP, cp) BASIC_REQUIRE_PROG(CP, cp)
BASIC_REQUIRE_PROG(CPIO, cpio) BASIC_REQUIRE_PROG(CPIO, cpio)
BASIC_REQUIRE_PROG(CUT, cut) BASIC_REQUIRE_PROG(CUT, cut)
BASIC_REQUIRE_PROG(DATE, date) BASIC_REQUIRE_PROG(DATE, date)
BASIC_REQUIRE_PROG(DIFF, [gdiff diff]) BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
BASIC_REQUIRE_PROG(DIRNAME, dirname) BASIC_REQUIRE_PROG(DIRNAME, dirname)
BASIC_REQUIRE_PROG(ECHO, echo) BASIC_REQUIRE_PROG(ECHO, echo)
BASIC_REQUIRE_PROG(EXPR, expr) BASIC_REQUIRE_PROG(EXPR, expr)
BASIC_REQUIRE_PROG(FILE, file) BASIC_REQUIRE_PROG(FILE, file)
BASIC_REQUIRE_PROG(FIND, find) BASIC_REQUIRE_PROG(FIND, find)
BASIC_REQUIRE_PROG(HEAD, head) BASIC_REQUIRE_PROG(HEAD, head)
BASIC_REQUIRE_PROG(LN, ln) BASIC_REQUIRE_PROG(LN, ln)
BASIC_REQUIRE_PROG(LS, ls) BASIC_REQUIRE_PROG(LS, ls)
BASIC_REQUIRE_PROG(MKDIR, mkdir) BASIC_REQUIRE_PROG(MKDIR, mkdir)
BASIC_REQUIRE_PROG(MKTEMP, mktemp) BASIC_REQUIRE_PROG(MKTEMP, mktemp)
BASIC_REQUIRE_PROG(MV, mv) BASIC_REQUIRE_PROG(MV, mv)
BASIC_REQUIRE_PROG(PRINTF, printf) BASIC_REQUIRE_PROG(PRINTF, printf)
BASIC_REQUIRE_PROG(RM, rm) BASIC_REQUIRE_PROG(RM, rm)
BASIC_REQUIRE_PROG(SH, sh) BASIC_REQUIRE_PROG(SH, sh)
BASIC_REQUIRE_PROG(SORT, sort) BASIC_REQUIRE_PROG(SORT, sort)
BASIC_REQUIRE_PROG(TAIL, tail) BASIC_REQUIRE_PROG(TAIL, tail)
BASIC_REQUIRE_PROG(TAR, tar) BASIC_REQUIRE_PROG(TAR, tar)
BASIC_REQUIRE_PROG(TEE, tee) BASIC_REQUIRE_PROG(TEE, tee)
BASIC_REQUIRE_PROG(TOUCH, touch) BASIC_REQUIRE_PROG(TOUCH, touch)
BASIC_REQUIRE_PROG(TR, tr) BASIC_REQUIRE_PROG(TR, tr)
BASIC_REQUIRE_PROG(UNAME, uname) BASIC_REQUIRE_PROG(UNAME, uname)
BASIC_REQUIRE_PROG(UNIQ, uniq) BASIC_REQUIRE_PROG(UNIQ, uniq)
BASIC_REQUIRE_PROG(WC, wc) BASIC_REQUIRE_PROG(WC, wc)
BASIC_REQUIRE_PROG(WHICH, which) BASIC_REQUIRE_PROG(WHICH, which)
BASIC_REQUIRE_PROG(XARGS, xargs) BASIC_REQUIRE_PROG(XARGS, xargs)
# Then required tools that require some special treatment. # Then required tools that require some special treatment.
AC_PROG_AWK AC_PROG_AWK
BASIC_CHECK_NONEMPTY(AWK) BASIC_CHECK_NONEMPTY(AWK)
AC_PROG_GREP AC_PROG_GREP
BASIC_CHECK_NONEMPTY(GREP) BASIC_CHECK_NONEMPTY(GREP)
AC_PROG_EGREP AC_PROG_EGREP
BASIC_CHECK_NONEMPTY(EGREP) BASIC_CHECK_NONEMPTY(EGREP)
AC_PROG_FGREP AC_PROG_FGREP
BASIC_CHECK_NONEMPTY(FGREP) BASIC_CHECK_NONEMPTY(FGREP)
AC_PROG_SED AC_PROG_SED
BASIC_CHECK_NONEMPTY(SED) BASIC_CHECK_NONEMPTY(SED)
AC_PATH_PROGS(NAWK, [nawk gawk awk]) AC_PATH_PROGS(NAWK, [nawk gawk awk])
BASIC_CHECK_NONEMPTY(NAWK) BASIC_CHECK_NONEMPTY(NAWK)
# Always force rm. # Always force rm.
RM="$RM -f" RM="$RM -f"
# pwd behaves differently on various platforms and some don't support the -L flag. # pwd behaves differently on various platforms and some don't support the -L flag.
# Always use the bash builtin pwd to get uniform behavior. # Always use the bash builtin pwd to get uniform behavior.
THEPWDCMD=pwd THEPWDCMD=pwd
# These are not required on all platforms # These are not required on all platforms
AC_PATH_PROG(CYGPATH, cygpath) AC_PATH_PROG(CYGPATH, cygpath)
AC_PATH_PROG(READLINK, readlink) AC_PATH_PROG(READLINK, readlink)
AC_PATH_PROG(DF, df) AC_PATH_PROG(DF, df)
AC_PATH_PROG(SETFILE, SetFile) AC_PATH_PROG(SETFILE, SetFile)
]) ])
# Setup basic configuration paths, and platform-specific stuff related to PATHs. # Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN_ONCE([BASIC_SETUP_PATHS], AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
[ [
# Locate the directory of this script. # Locate the directory of this script.
SCRIPT="[$]0" SCRIPT="[$]0"
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L` AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
# Where is the source? It is located two levels above the configure script. # Where is the source? It is located two levels above the configure script.
CURDIR="$PWD" CURDIR="$PWD"
cd "$AUTOCONF_DIR/../.." cd "$AUTOCONF_DIR/../.."
SRC_ROOT="`$THEPWDCMD -L`" SRC_ROOT="`$THEPWDCMD -L`"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
PATH_SEP=";" PATH_SEP=";"
BASIC_CHECK_PATHS_WINDOWS BASIC_CHECK_PATHS_WINDOWS
else else
PATH_SEP=":" PATH_SEP=":"
fi fi
AC_SUBST(SRC_ROOT) AC_SUBST(SRC_ROOT)
AC_SUBST(PATH_SEP) AC_SUBST(PATH_SEP)
cd "$CURDIR" cd "$CURDIR"
BASIC_FIXUP_PATH(SRC_ROOT) BASIC_FIXUP_PATH(SRC_ROOT)
BASIC_FIXUP_PATH(CURDIR) BASIC_FIXUP_PATH(CURDIR)
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
# Add extra search paths on solaris for utilities like ar and as etc... # Add extra search paths on solaris for utilities like ar and as etc...
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
fi fi
# You can force the sys-root if the sys-root encoded into the cross compiler tools # You can force the sys-root if the sys-root encoded into the cross compiler tools
# is not correct. # is not correct.
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root], AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
[pass this sys-root to the compilers and tools (for cross-compiling)])]) [pass this sys-root to the compilers and tools (for cross-compiling)])])
if test "x$with_sys_root" != x; then if test "x$with_sys_root" != x; then
SYS_ROOT=$with_sys_root SYS_ROOT=$with_sys_root
else else
SYS_ROOT=/ SYS_ROOT=/
fi fi
AC_SUBST(SYS_ROOT) AC_SUBST(SYS_ROOT)
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir], AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
[search this directory for compilers and tools (for cross-compiling)])], [search this directory for compilers and tools (for cross-compiling)])],
[TOOLS_DIR=$with_tools_dir] [TOOLS_DIR=$with_tools_dir]
) )
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
[use this directory as base for tools-dir and sys-root (for cross-compiling)])], [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
[ [
if test "x$with_sys_root" != x; then if test "x$with_sys_root" != x; then
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time]) AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
fi fi
BASIC_FIXUP_PATH([with_devkit]) BASIC_FIXUP_PATH([with_devkit])
BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin) BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
if test -d "$with_devkit/$host_alias/libc"; then if test -d "$with_devkit/$host_alias/libc"; then
SYS_ROOT=$with_devkit/$host_alias/libc SYS_ROOT=$with_devkit/$host_alias/libc
elif test -d "$with_devkit/$host/sys-root"; then elif test -d "$with_devkit/$host/sys-root"; then
SYS_ROOT=$with_devkit/$host/sys-root SYS_ROOT=$with_devkit/$host/sys-root
fi fi
]) ])
]) ])
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
[ [
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
[use this as the name of the configuration @<:@generated from important configuration options@:>@])], [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
[ CONF_NAME=${with_conf_name} ]) [ CONF_NAME=${with_conf_name} ])
# Test from where we are running configure, in or outside of src root. # Test from where we are running configure, in or outside of src root.
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
|| test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
|| test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
# We are running configure from the src root. # We are running configure from the src root.
# Create a default ./build/target-variant-debuglevel output root. # Create a default ./build/target-variant-debuglevel output root.
if test "x${CONF_NAME}" = x; then if test "x${CONF_NAME}" = x; then
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
fi fi
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
$MKDIR -p "$OUTPUT_ROOT" $MKDIR -p "$OUTPUT_ROOT"
if test ! -d "$OUTPUT_ROOT"; then if test ! -d "$OUTPUT_ROOT"; then
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
fi fi
else else
# We are running configure from outside of the src dir. # We are running configure from outside of the src dir.
# Then use the current directory as output dir! # Then use the current directory as output dir!
# If configuration is situated in normal build directory, just use the build # If configuration is situated in normal build directory, just use the build
# directory name as configuration name, otherwise use the complete path. # directory name as configuration name, otherwise use the complete path.
if test "x${CONF_NAME}" = x; then if test "x${CONF_NAME}" = x; then
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
fi fi
OUTPUT_ROOT="$CURDIR" OUTPUT_ROOT="$CURDIR"
@ -428,10 +428,10 @@ else
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
# other files # other files
files_present=`$LS $OUTPUT_ROOT` files_present=`$LS $OUTPUT_ROOT`
# Configure has already touched config.log and confdefs.h in the current dir when this check # Configure has already touched config.log and confdefs.h in the current dir when this check
# is performed. # is performed.
filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
| $TR -d '\n'` | $TR -d '\n'`
if test "x$filtered_files" != x; then if test "x$filtered_files" != x; then
AC_MSG_NOTICE([Current directory is $CURDIR.]) AC_MSG_NOTICE([Current directory is $CURDIR.])
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here]) AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
@ -443,46 +443,46 @@ else
AC_MSG_ERROR([Will not continue creating configuration in $CURDIR]) AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
fi fi
fi fi
fi fi
AC_MSG_CHECKING([what configuration name to use]) AC_MSG_CHECKING([what configuration name to use])
AC_MSG_RESULT([$CONF_NAME]) AC_MSG_RESULT([$CONF_NAME])
BASIC_FIXUP_PATH(OUTPUT_ROOT) BASIC_FIXUP_PATH(OUTPUT_ROOT)
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk) AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
AC_SUBST(CONF_NAME, $CONF_NAME) AC_SUBST(CONF_NAME, $CONF_NAME)
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT) AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
# Most of the probed defines are put into config.h # Most of the probed defines are put into config.h
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in]) AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
# The spec.gmk file contains all variables for the make system. # The spec.gmk file contains all variables for the make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
# The hotspot-spec.gmk file contains legacy variables for the hotspot make system. # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
# The bootcycle-spec.gmk file contains support for boot cycle builds. # The bootcycle-spec.gmk file contains support for boot cycle builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
# The compare.sh is used to compare the build output to other builds. # The compare.sh is used to compare the build output to other builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
# Spec.sh is currently used by compare-objects.sh # Spec.sh is currently used by compare-objects.sh
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
# The generated Makefile knows where the spec.gmk is and where the source is. # The generated Makefile knows where the spec.gmk is and where the source is.
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
# which will look for generated configurations # which will look for generated configurations
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
# Save the arguments given to us # Save the arguments given to us
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
]) ])
AC_DEFUN_ONCE([BASIC_SETUP_LOGGING], AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
[ [
# Setup default logging of stdout and stderr to build.log in the output root. # Setup default logging of stdout and stderr to build.log in the output root.
BUILD_LOG='$(OUTPUT_ROOT)/build.log' BUILD_LOG='$(OUTPUT_ROOT)/build.log'
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
AC_SUBST(BUILD_LOG) AC_SUBST(BUILD_LOG)
AC_SUBST(BUILD_LOG_PREVIOUS) AC_SUBST(BUILD_LOG_PREVIOUS)
AC_SUBST(BUILD_LOG_WRAPPER) AC_SUBST(BUILD_LOG_WRAPPER)
]) ])
@ -581,85 +581,85 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
AC_DEFUN([BASIC_CHECK_FIND_DELETE], AC_DEFUN([BASIC_CHECK_FIND_DELETE],
[ [
# Test if find supports -delete # Test if find supports -delete
AC_MSG_CHECKING([if find supports -delete]) AC_MSG_CHECKING([if find supports -delete])
FIND_DELETE="-delete" FIND_DELETE="-delete"
DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1` TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
if test -f $DELETEDIR/TestIfFindSupportsDelete; then if test -f $DELETEDIR/TestIfFindSupportsDelete; then
# No, it does not. # No, it does not.
rm $DELETEDIR/TestIfFindSupportsDelete rm $DELETEDIR/TestIfFindSupportsDelete
FIND_DELETE="-exec rm \{\} \+" FIND_DELETE="-exec rm \{\} \+"
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
fi fi
rmdir $DELETEDIR rmdir $DELETEDIR
AC_SUBST(FIND_DELETE) AC_SUBST(FIND_DELETE)
]) ])
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
[ [
BASIC_CHECK_GNU_MAKE BASIC_CHECK_GNU_MAKE
BASIC_CHECK_FIND_DELETE BASIC_CHECK_FIND_DELETE
# These tools might not be installed by default, # These tools might not be installed by default,
# need hint on how to install them. # need hint on how to install them.
BASIC_REQUIRE_PROG(UNZIP, unzip) BASIC_REQUIRE_PROG(UNZIP, unzip)
BASIC_REQUIRE_PROG(ZIP, zip) BASIC_REQUIRE_PROG(ZIP, zip)
# Non-required basic tools # Non-required basic tools
AC_PATH_PROG(LDD, ldd) AC_PATH_PROG(LDD, ldd)
if test "x$LDD" = "x"; then if test "x$LDD" = "x"; then
# List shared lib dependencies is used for # List shared lib dependencies is used for
# debug output and checking for forbidden dependencies. # debug output and checking for forbidden dependencies.
# We can build without it. # We can build without it.
LDD="true" LDD="true"
fi fi
AC_PATH_PROG(OTOOL, otool) AC_PATH_PROG(OTOOL, otool)
if test "x$OTOOL" = "x"; then if test "x$OTOOL" = "x"; then
OTOOL="true" OTOOL="true"
fi fi
AC_PATH_PROGS(READELF, [readelf greadelf]) AC_PATH_PROGS(READELF, [readelf greadelf])
AC_PATH_PROG(HG, hg) AC_PATH_PROG(HG, hg)
AC_PATH_PROG(STAT, stat) AC_PATH_PROG(STAT, stat)
AC_PATH_PROG(TIME, time) AC_PATH_PROG(TIME, time)
# Check if it's GNU time # Check if it's GNU time
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
if test "x$IS_GNU_TIME" != x; then if test "x$IS_GNU_TIME" != x; then
IS_GNU_TIME=yes IS_GNU_TIME=yes
else else
IS_GNU_TIME=no IS_GNU_TIME=no
fi fi
AC_SUBST(IS_GNU_TIME) AC_SUBST(IS_GNU_TIME)
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_PROG(COMM, comm) BASIC_REQUIRE_PROG(COMM, comm)
fi fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
BASIC_REQUIRE_PROG(XATTR, xattr) BASIC_REQUIRE_PROG(XATTR, xattr)
AC_PATH_PROG(CODESIGN, codesign) AC_PATH_PROG(CODESIGN, codesign)
if test "x$CODESIGN" != "x"; then if test "x$CODESIGN" != "x"; then
# Verify that the openjdk_codesign certificate is present # Verify that the openjdk_codesign certificate is present
AC_MSG_CHECKING([if openjdk_codesign certificate is present]) AC_MSG_CHECKING([if openjdk_codesign certificate is present])
rm -f codesign-testfile rm -f codesign-testfile
touch codesign-testfile touch codesign-testfile
codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN= codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
rm -f codesign-testfile rm -f codesign-testfile
if test "x$CODESIGN" = x; then if test "x$CODESIGN" = x; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
fi
fi fi
fi fi
fi
]) ])
# Check if build directory is on local disk. If not possible to determine, # Check if build directory is on local disk. If not possible to determine,
@ -669,8 +669,8 @@ fi
# Argument 3: what to do otherwise (remote disk or failure) # Argument 3: what to do otherwise (remote disk or failure)
AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK], AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
[ [
# df -l lists only local disks; if the given directory is not found then # df -l lists only local disks; if the given directory is not found then
# a non-zero exit code is given # a non-zero exit code is given
if test "x$DF" = x; then if test "x$DF" = x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# msys does not have df; use Windows "net use" instead. # msys does not have df; use Windows "net use" instead.
@ -707,32 +707,30 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[ [
AC_MSG_CHECKING([if build directory is on local disk])
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
[OUTPUT_DIR_IS_LOCAL="yes"],
[OUTPUT_DIR_IS_LOCAL="no"])
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
AC_MSG_CHECKING([if build directory is on local disk]) BASIC_CHECK_SRC_PERMS
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
[OUTPUT_DIR_IS_LOCAL="yes"],
[OUTPUT_DIR_IS_LOCAL="no"])
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
BASIC_CHECK_SRC_PERMS # Check if the user has any old-style ALT_ variables set.
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
# Check if the user has any old-style ALT_ variables set. # Before generating output files, test if they exist. If they do, this is a reconfigure.
FOUND_ALT_VARIABLES=`env | grep ^ALT_` # Since we can't properly handle the dependencies for this, warn the user about the situation
if test -e $OUTPUT_ROOT/spec.gmk; then
# Before generating output files, test if they exist. If they do, this is a reconfigure. IS_RECONFIGURE=yes
# Since we can't properly handle the dependencies for this, warn the user about the situation else
if test -e $OUTPUT_ROOT/spec.gmk; then IS_RECONFIGURE=no
IS_RECONFIGURE=yes fi
else
IS_RECONFIGURE=no
fi
if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
HIDE_PERFORMANCE_HINTS=yes
else
HIDE_PERFORMANCE_HINTS=no
# Hide it the next time around...
$TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
fi
if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
HIDE_PERFORMANCE_HINTS=yes
else
HIDE_PERFORMANCE_HINTS=no
# Hide it the next time around...
$TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
fi
]) ])

View File

@ -145,7 +145,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
# Not in mixed or Windows style, start by that. # Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path` new_path=`cmd //c echo $path`
fi fi
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path]) BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
if test "x$path" != "x$new_path"; then if test "x$path" != "x$new_path"; then
@ -175,8 +175,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
# bat and cmd files are not always considered executable in cygwin causing which # bat and cmd files are not always considered executable in cygwin causing which
# to not find them # to not find them
if test "x$new_path" = x \ if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then && test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"` new_path=`$CYGPATH -u "$path"`
fi fi
if test "x$new_path" = x; then if test "x$new_path" = x; then
@ -191,8 +191,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
# bat and cmd files are not always considered executable in cygwin causing which # bat and cmd files are not always considered executable in cygwin causing which
# to not find them # to not find them
if test "x$new_path" = x \ if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then && test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"` new_path=`$CYGPATH -u "$path"`
fi fi
if test "x$new_path" = x; then if test "x$new_path" = x; then
@ -218,9 +218,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
# Short path failed, file does not exist as specified. # Short path failed, file does not exist as specified.
# Try adding .exe or .cmd # Try adding .exe or .cmd
if test -f "${new_path}.exe"; then if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe" input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd" input_to_shortpath="${new_path}.cmd"
else else
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.]) AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found]) AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
@ -254,7 +254,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
# Now try to locate executable using which # Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null` new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then if test "x$new_path" = x; then
# Oops. Which didn't find the executable. # Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect, # The splitting of arguments from the executable at a space might have been incorrect,
@ -264,9 +264,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
arguments="EOL" arguments="EOL"
new_path="$path" new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
new_path=`$WHICH "$new_path" 2> /dev/null` new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error. # It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.]) AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
@ -302,7 +302,7 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
[ [
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m` SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
if test $SRC_ROOT_LENGTH -gt 100; then if test $SRC_ROOT_LENGTH -gt 100; then
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported]) AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
fi fi
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@ -311,14 +311,14 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
AC_MSG_RESULT([$CYGWIN_VERSION]) AC_MSG_RESULT([$CYGWIN_VERSION])
WINDOWS_ENV_VENDOR='cygwin' WINDOWS_ENV_VENDOR='cygwin'
WINDOWS_ENV_VERSION="$CYGWIN_VERSION" WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
if test "x$CYGWIN_VERSION_OK" = x; then if test "x$CYGWIN_VERSION_OK" = x; then
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.]) AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
if test "x$CYGPATH" = x; then if test "x$CYGPATH" = x; then
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
fi fi
AC_MSG_CHECKING([cygwin root directory as unix-style path]) AC_MSG_CHECKING([cygwin root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
@ -329,13 +329,13 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then if test "x$test_cygdrive_prefix" = x; then
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.]) AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
fi fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
AC_MSG_CHECKING([msys release]) AC_MSG_CHECKING([msys release])
MSYS_VERSION=`$UNAME -r` MSYS_VERSION=`$UNAME -r`
AC_MSG_RESULT([$MSYS_VERSION]) AC_MSG_RESULT([$MSYS_VERSION])
WINDOWS_ENV_VENDOR='msys' WINDOWS_ENV_VENDOR='msys'
WINDOWS_ENV_VERSION="$MSYS_VERSION" WINDOWS_ENV_VERSION="$MSYS_VERSION"
@ -367,12 +367,12 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH], AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
[ [
# When using cygwin or msys, we need a wrapper binary that renames # When using cygwin or msys, we need a wrapper binary that renames
# /cygdrive/c/ arguments into c:/ arguments and peeks into # /cygdrive/c/ arguments into c:/ arguments and peeks into
# @files and rewrites these too! This wrapper binary is # @files and rewrites these too! This wrapper binary is
# called fixpath. # called fixpath.
FIXPATH= FIXPATH=
if test "x$OPENJDK_BUILD_OS" = xwindows; then if test "x$OPENJDK_BUILD_OS" = xwindows; then
AC_MSG_CHECKING([if fixpath can be created]) AC_MSG_CHECKING([if fixpath can be created])
FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
@ -389,7 +389,7 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then
# @ was chosen as separator to minimize risk of other tools messing around with it # @ was chosen as separator to minimize risk of other tools messing around with it
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq` all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
fi fi
rm -f $OUTPUT_ROOT/fixpath* rm -f $OUTPUT_ROOT/fixpath*
@ -397,24 +397,24 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then
$CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
cd $CURDIR cd $CURDIR
if test ! -x $OUTPUT_ROOT/fixpath.exe; then if test ! -x $OUTPUT_ROOT/fixpath.exe; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/fixpath1.log cat $OUTPUT_ROOT/fixpath1.log
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe]) AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
fi fi
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if fixpath.exe works]) AC_MSG_CHECKING([if fixpath.exe works])
cd $OUTPUT_ROOT cd $OUTPUT_ROOT
$FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
cd $CURDIR cd $CURDIR
if test ! -x $OUTPUT_ROOT/fixpath2.exe; then if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/fixpath2.log cat $OUTPUT_ROOT/fixpath2.log
AC_MSG_ERROR([fixpath did not work!]) AC_MSG_ERROR([fixpath did not work!])
fi fi
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
fi fi
AC_SUBST(FIXPATH) AC_SUBST(FIXPATH)
]) ])

View File

@ -44,7 +44,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring]) AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)]) AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
BOOT_JDK_FOUND=no BOOT_JDK_FOUND=no
else else
# Do we have an rt.jar? (On MacOSX it is called classes.jar) # Do we have an rt.jar? (On MacOSX it is called classes.jar)
if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring]) AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring])
@ -79,70 +79,70 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
# Test: Is bootjdk explicitely set by command line arguments? # Test: Is bootjdk explicitely set by command line arguments?
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS], AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
[ [
if test "x$with_boot_jdk" != x; then if test "x$with_boot_jdk" != x; then
BOOT_JDK=$with_boot_jdk BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments]) AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
fi fi
]) ])
# Test: Is bootjdk available from builddeps? # Test: Is bootjdk available from builddeps?
AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS], AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
[ [
BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no]) BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
]) ])
# Test: Is $JAVA_HOME set? # Test: Is $JAVA_HOME set?
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME], AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
[ [
if test "x$JAVA_HOME" != x; then if test "x$JAVA_HOME" != x; then
JAVA_HOME_PROCESSED="$JAVA_HOME" JAVA_HOME_PROCESSED="$JAVA_HOME"
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED) BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
if test ! -d "$JAVA_HOME_PROCESSED"; then if test ! -d "$JAVA_HOME_PROCESSED"; then
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!]) AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
else else
# Aha, the user has set a JAVA_HOME # Aha, the user has set a JAVA_HOME
# let us use that as the Boot JDK. # let us use that as the Boot JDK.
BOOT_JDK="$JAVA_HOME_PROCESSED" BOOT_JDK="$JAVA_HOME_PROCESSED"
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME]) AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
fi
fi fi
fi
]) ])
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK], AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
[ [
AC_PATH_PROG(JAVAC_CHECK, javac) AC_PATH_PROG(JAVAC_CHECK, javac)
AC_PATH_PROG(JAVA_CHECK, java) AC_PATH_PROG(JAVA_CHECK, java)
BINARY="$JAVAC_CHECK" BINARY="$JAVAC_CHECK"
if test "x$JAVAC_CHECK" = x; then if test "x$JAVAC_CHECK" = x; then
BINARY="$JAVA_CHECK" BINARY="$JAVA_CHECK"
fi fi
if test "x$BINARY" != x; then if test "x$BINARY" != x; then
# So there is a java(c) binary, it might be part of a JDK. # So there is a java(c) binary, it might be part of a JDK.
# Lets find the JDK/JRE directory by following symbolic links. # Lets find the JDK/JRE directory by following symbolic links.
# Linux/GNU systems often have links from /usr/bin/java to # Linux/GNU systems often have links from /usr/bin/java to
# /etc/alternatives/java to the real JDK binary. # /etc/alternatives/java to the real JDK binary.
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY) BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
BOOT_JDK=`dirname "$BINARY"` BOOT_JDK=`dirname "$BINARY"`
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
# Looks like we found ourselves an JDK # Looks like we found ourselves an JDK
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH]) AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
fi
fi fi
fi
]) ])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME], AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
[ [
if test -x /usr/libexec/java_home; then if test -x /usr/libexec/java_home; then
BOOT_JDK=`/usr/libexec/java_home` BOOT_JDK=`/usr/libexec/java_home`
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home]) AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
fi fi
]) ])
# Look for a jdk in the given path. If there are multiple, try to select the newest. # Look for a jdk in the given path. If there are multiple, try to select the newest.
@ -204,123 +204,123 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
AC_MSG_CHECKING([for $2 in Boot JDK]) AC_MSG_CHECKING([for $2 in Boot JDK])
$1=$BOOT_JDK/bin/$2 $1=$BOOT_JDK/bin/$2
if test ! -x [$]$1; then if test ! -x [$]$1; then
AC_MSG_RESULT(not found) AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk]) AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK]) AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi fi
AC_MSG_RESULT(ok) AC_MSG_RESULT(ok)
]) ])
############################################################################### ###############################################################################
# #
# We need a Boot JDK to bootstrap the build. # We need a Boot JDK to bootstrap the build.
# #
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK], AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
[ [
BOOT_JDK_FOUND=no BOOT_JDK_FOUND=no
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk], AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])]) [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
# We look for the Boot JDK through various means, going from more certain to # We look for the Boot JDK through various means, going from more certain to
# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
# we detected something (if so, the path to the jdk is in BOOT_JDK). But we # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
# must check if this is indeed valid; otherwise we'll continue looking. # must check if this is indeed valid; otherwise we'll continue looking.
# Test: Is bootjdk explicitely set by command line arguments? # Test: Is bootjdk explicitely set by command line arguments?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
# Having specified an argument which is incorrect will produce an instant failure; # Having specified an argument which is incorrect will produce an instant failure;
# we should not go on looking # we should not go on looking
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK]) AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fi fi
# Test: Is bootjdk available from builddeps? # Test: Is bootjdk available from builddeps?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
# Test: Is $JAVA_HOME set? # Test: Is $JAVA_HOME set?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
# Test: Is there a JDK installed in default, well-known locations? # Test: Is there a JDK installed in default, well-known locations?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
# If we haven't found anything yet, we've truly lost. Give up. # If we haven't found anything yet, we've truly lost. Give up.
if test "x$BOOT_JDK_FOUND" = xno; then if test "x$BOOT_JDK_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([openjdk]) HELP_MSG_MISSING_DEPENDENCY([openjdk])
AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG]) AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk]) AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
# Setup proper paths for what we found # Setup proper paths for what we found
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
if test ! -f "$BOOT_RTJAR"; then if test ! -f "$BOOT_RTJAR"; then
# On MacOSX it is called classes.jar # On MacOSX it is called classes.jar
BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
if test -f "$BOOT_RTJAR"; then if test -f "$BOOT_RTJAR"; then
# Remove the .. # Remove the ..
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
fi fi
fi fi
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
BOOT_JDK="$BOOT_JDK" BOOT_JDK="$BOOT_JDK"
AC_SUBST(BOOT_RTJAR) AC_SUBST(BOOT_RTJAR)
AC_SUBST(BOOT_TOOLSJAR) AC_SUBST(BOOT_TOOLSJAR)
AC_SUBST(BOOT_JDK) AC_SUBST(BOOT_JDK)
# Setup tools from the Boot JDK. # Setup tools from the Boot JDK.
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
# Finally, set some other options... # Finally, set some other options...
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility. # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
BOOT_JDK_SOURCETARGET="-source 7 -target 7" BOOT_JDK_SOURCETARGET="-source 7 -target 7"
AC_SUBST(BOOT_JDK_SOURCETARGET) AC_SUBST(BOOT_JDK_SOURCETARGET)
AC_SUBST(JAVAC_FLAGS) AC_SUBST(JAVAC_FLAGS)
]) ])
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
[ [
############################################################################## ##############################################################################
# #
# Specify options for anything that is run with the Boot JDK. # Specify options for anything that is run with the Boot JDK.
# #
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs], AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values, [specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])]) e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
if test "x$with_boot_jdk_jvmargs" = x; then if test "x$with_boot_jdk_jvmargs" = x; then
# Not all JVM:s accept the same arguments on the command line. # Not all JVM:s accept the same arguments on the command line.
# OpenJDK specific increase in thread stack for JDK build, # OpenJDK specific increase in thread stack for JDK build,
# well more specifically, when running javac. # well more specifically, when running javac.
if test "x$BUILD_NUM_BITS" = x32; then if test "x$BUILD_NUM_BITS" = x32; then
STACK_SIZE=768 STACK_SIZE=768
else else
# Running Javac on a JVM on a 64-bit machine, the stack takes more space # Running Javac on a JVM on a 64-bit machine, the stack takes more space
# since 64-bit pointers are pushed on the stach. Apparently, we need # since 64-bit pointers are pushed on the stach. Apparently, we need
# to increase the stack space when javacing the JDK.... # to increase the stack space when javacing the JDK....
STACK_SIZE=1536 STACK_SIZE=1536
fi fi
# Minimum amount of heap memory. # Minimum amount of heap memory.
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
# Why does macosx need more heap? Its the huge JDK batch. # Why does macosx need more heap? Its the huge JDK batch.
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
else else
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
fi fi
# When is adding -client something that speeds up the JVM? # When is adding -client something that speeds up the JVM?
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
@ -329,7 +329,7 @@ if test "x$with_boot_jdk_jvmargs" = x; then
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
# Disable special log output when a debug build is used as Boot JDK... # Disable special log output when a debug build is used as Boot JDK...
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
fi fi
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs) AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
]) ])

View File

@ -36,7 +36,7 @@ else
JAVA_EXEC_POS=1 JAVA_EXEC_POS=1
endif endif
ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA))) ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
endif endif

View File

@ -58,6 +58,6 @@ if test $? = 0; then
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
;; ;;
esac esac
fi fi
echo $OUT echo $OUT

View File

@ -25,78 +25,77 @@
AC_DEFUN([BPERF_CHECK_CORES], AC_DEFUN([BPERF_CHECK_CORES],
[ [
AC_MSG_CHECKING([for number of cores]) AC_MSG_CHECKING([for number of cores])
NUM_CORES=1 NUM_CORES=1
FOUND_CORES=no FOUND_CORES=no
if test -f /proc/cpuinfo; then
# Looks like a Linux (or cygwin) system
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
FOUND_CORES=yes
elif test -x /usr/sbin/psrinfo; then
# Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS
FOUND_CORES=yes
fi
if test "x$FOUND_CORES" = xyes; then if test -f /proc/cpuinfo; then
AC_MSG_RESULT([$NUM_CORES]) # Looks like a Linux (or cygwin) system
else NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
AC_MSG_RESULT([could not detect number of cores, defaulting to 1]) FOUND_CORES=yes
AC_MSG_WARN([This will disable all parallelism from build!]) elif test -x /usr/sbin/psrinfo; then
fi # Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS
FOUND_CORES=yes
fi
if test "x$FOUND_CORES" = xyes; then
AC_MSG_RESULT([$NUM_CORES])
else
AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
AC_MSG_WARN([This will disable all parallelism from build!])
fi
]) ])
AC_DEFUN([BPERF_CHECK_MEMORY_SIZE], AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
[ [
AC_MSG_CHECKING([for memory size]) AC_MSG_CHECKING([for memory size])
# Default to 1024 MB # Default to 1024 MB
MEMORY_SIZE=1024 MEMORY_SIZE=1024
FOUND_MEM=no FOUND_MEM=no
if test -f /proc/meminfo; then
# Looks like a Linux (or cygwin) system
MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
FOUND_MEM=yes
elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
FOUND_MEM=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
fi
if test "x$FOUND_MEM" = xyes; then if test -f /proc/meminfo; then
AC_MSG_RESULT([$MEMORY_SIZE MB]) # Looks like a Linux (or cygwin) system
else MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB]) MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
AC_MSG_WARN([This might seriously impact build performance!]) FOUND_MEM=yes
fi elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
FOUND_MEM=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
fi
if test "x$FOUND_MEM" = xyes; then
AC_MSG_RESULT([$MEMORY_SIZE MB])
else
AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
AC_MSG_WARN([This might seriously impact build performance!])
fi
]) ])
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES], AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
[ [
# How many cores do we have on this build system? # How many cores do we have on this build system?
AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores], AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
[number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])]) [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
if test "x$with_num_cores" = x; then if test "x$with_num_cores" = x; then
# The number of cores were not specified, try to probe them. # The number of cores were not specified, try to probe them.
BPERF_CHECK_CORES BPERF_CHECK_CORES
@ -110,7 +109,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
[ [
# How much memory do we have on this build system? # How much memory do we have on this build system?
AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size], AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
[memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])]) [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
if test "x$with_memory_size" = x; then if test "x$with_memory_size" = x; then
# The memory size was not specified, try to probe it. # The memory size was not specified, try to probe it.
BPERF_CHECK_MEMORY_SIZE BPERF_CHECK_MEMORY_SIZE
@ -122,10 +121,10 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS], AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
[ [
# Provide a decent default number of parallel jobs for make depending on # Provide a decent default number of parallel jobs for make depending on
# number of cores, amount of memory and machine architecture. # number of cores, amount of memory and machine architecture.
AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs], AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs],
[number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])]) [number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
if test "x$with_jobs" = x; then if test "x$with_jobs" = x; then
# Number of jobs was not specified, calculate. # Number of jobs was not specified, calculate.
AC_MSG_CHECKING([for appropriate number of jobs to run in parallel]) AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
@ -157,179 +156,178 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
AC_DEFUN([BPERF_SETUP_CCACHE], AC_DEFUN([BPERF_SETUP_CCACHE],
[ [
AC_ARG_ENABLE([ccache], AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache], [AS_HELP_STRING([--disable-ccache],
[disable using ccache to speed up recompilations @<:@enabled@:>@])], [disable using ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes]) [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then if test "x$ENABLE_CCACHE" = xyes; then
OLD_PATH="$PATH" OLD_PATH="$PATH"
if test "x$TOOLS_DIR" != x; then if test "x$TOOLS_DIR" != x; then
PATH=$TOOLS_DIR:$PATH PATH=$TOOLS_DIR:$PATH
fi
AC_PATH_PROG(CCACHE, ccache)
PATH="$OLD_PATH"
else
AC_MSG_CHECKING([for ccache])
AC_MSG_RESULT([explicitly disabled])
CCACHE=
fi
AC_SUBST(CCACHE)
AC_ARG_WITH([ccache-dir],
[AS_HELP_STRING([--with-ccache-dir],
[where to store ccache files @<:@~/.ccache@:>@])])
if test "x$with_ccache_dir" != x; then
# When using a non home ccache directory, assume the use is to share ccache files
# with other users. Thus change the umask.
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
fi fi
CCACHE_FOUND="" AC_PATH_PROG(CCACHE, ccache)
if test "x$CCACHE" != x; then PATH="$OLD_PATH"
BPERF_SETUP_CCACHE_USAGE else
fi AC_MSG_CHECKING([for ccache])
AC_MSG_RESULT([explicitly disabled])
CCACHE=
fi
AC_SUBST(CCACHE)
AC_ARG_WITH([ccache-dir],
[AS_HELP_STRING([--with-ccache-dir],
[where to store ccache files @<:@~/.ccache@:>@])])
if test "x$with_ccache_dir" != x; then
# When using a non home ccache directory, assume the use is to share ccache files
# with other users. Thus change the umask.
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
fi
CCACHE_FOUND=""
if test "x$CCACHE" != x; then
BPERF_SETUP_CCACHE_USAGE
fi
]) ])
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE], AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
[ [
if test "x$CCACHE" != x; then if test "x$CCACHE" != x; then
CCACHE_FOUND="true" CCACHE_FOUND="true"
# Only use ccache if it is 3.1.4 or later, which supports # Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers. # precompiled headers.
AC_MSG_CHECKING([if ccache supports precompiled headers]) AC_MSG_CHECKING([if ccache supports precompiled headers])
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null` HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
if test "x$HAS_GOOD_CCACHE" = x; then if test "x$HAS_GOOD_CCACHE" = x; then
AC_MSG_RESULT([no, disabling ccache]) AC_MSG_RESULT([no, disabling ccache])
CCACHE= CCACHE=
else else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers]) AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
PUSHED_FLAGS="$CXXFLAGS" PUSHED_FLAGS="$CXXFLAGS"
CXXFLAGS="-fpch-preprocess $CXXFLAGS" CXXFLAGS="-fpch-preprocess $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
CXXFLAGS="$PUSHED_FLAGS" CXXFLAGS="$PUSHED_FLAGS"
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
AC_MSG_RESULT([no, disabling ccaching of precompiled headers]) AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
CCACHE= CCACHE=
fi fi
fi
fi fi
fi
if test "x$CCACHE" != x; then if test "x$CCACHE" != x; then
CCACHE_SLOPPINESS=time_macros CCACHE_SLOPPINESS=time_macros
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
CCACHE_FLAGS=-fpch-preprocess CCACHE_FLAGS=-fpch-preprocess
if test "x$SET_CCACHE_DIR" != x; then if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1 mkdir -p $CCACHE_DIR > /dev/null 2>&1
chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
fi
fi fi
fi
]) ])
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS], AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
[ [
###############################################################################
#
# Can the C/C++ compiler use precompiled headers?
#
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1 ###############################################################################
if test "x$ENABLE_PRECOMPH" = xno; then #
# Can the C/C++ compiler use precompiled headers?
#
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1
if test "x$ENABLE_PRECOMPH" = xno; then
USE_PRECOMPILED_HEADER=0 USE_PRECOMPILED_HEADER=0
fi fi
if test "x$ENABLE_PRECOMPH" = xyes; then if test "x$ENABLE_PRECOMPH" = xyes; then
# Check that the compiler actually supports precomp headers. # Check that the compiler actually supports precomp headers.
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
AC_MSG_CHECKING([that precompiled headers work]) AC_MSG_CHECKING([that precompiled headers work])
echo "int alfa();" > conftest.h echo "int alfa();" > conftest.h
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
if test ! -f conftest.hpp.gch; then if test ! -f conftest.hpp.gch; then
USE_PRECOMPILED_HEADER=0 USE_PRECOMPILED_HEADER=0
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
fi fi
rm -f conftest.h conftest.hpp.gch rm -f conftest.h conftest.hpp.gch
fi fi
fi fi
AC_SUBST(USE_PRECOMPILED_HEADER) AC_SUBST(USE_PRECOMPILED_HEADER)
]) ])
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC], AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
[ [
AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java], AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])]) [use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
if test "x$with_sjavac_server_java" != x; then if test "x$with_sjavac_server_java" != x; then
SJAVAC_SERVER_JAVA="$with_sjavac_server_java" SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
if test "x$FOUND_VERSION" = x; then if test "x$FOUND_VERSION" = x; then
AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA]) AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
fi fi
else else
SJAVAC_SERVER_JAVA="" SJAVAC_SERVER_JAVA=""
# Hotspot specific options. # Hotspot specific options.
ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA]) ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
# JRockit specific options. # JRockit specific options.
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
fi fi
AC_SUBST(SJAVAC_SERVER_JAVA) AC_SUBST(SJAVAC_SERVER_JAVA)
if test "$MEMORY_SIZE" -gt "2500"; then if test "$MEMORY_SIZE" -gt "2500"; then
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
if test "$JVM_ARG_OK" = true; then if test "$JVM_ARG_OK" = true; then
JVM_64BIT=true JVM_64BIT=true
JVM_ARG_OK=false JVM_ARG_OK=false
fi
fi fi
fi
if test "$JVM_64BIT" = true; then if test "$JVM_64BIT" = true; then
if test "$MEMORY_SIZE" -gt "17000"; then if test "$MEMORY_SIZE" -gt "17000"; then
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
fi fi
if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$JVM_ARG_OK" = false; then if test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
AC_MSG_CHECKING([whether to use sjavac]) AC_MSG_CHECKING([whether to use sjavac])
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
[use sjavac to do fast incremental compiles @<:@disabled@:>@])], [use sjavac to do fast incremental compiles @<:@disabled@:>@])],
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no']) [ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
AC_MSG_RESULT([$ENABLE_SJAVAC]) AC_MSG_RESULT([$ENABLE_SJAVAC])
AC_SUBST(ENABLE_SJAVAC) AC_SUBST(ENABLE_SJAVAC)
if test "x$ENABLE_SJAVAC" = xyes; then if test "x$ENABLE_SJAVAC" = xyes; then
SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
else else
SJAVAC_SERVER_DIR= SJAVAC_SERVER_DIR=
fi fi
AC_SUBST(SJAVAC_SERVER_DIR) AC_SUBST(SJAVAC_SERVER_DIR)
]) ])

View File

@ -34,7 +34,7 @@
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} # If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
# The needed cups builddeps are platform independent header files. # The needed cups builddeps are platform independent header files.
# I.e. they need not be part of the devkit. # I.e. they need not be part of the devkit.
builddep_cups=lib/cups_1_3_9.zip builddep_cups=lib/cups_1_3_9.zip

View File

@ -29,7 +29,7 @@
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
DEVTOOLS=/java/devtools DEVTOOLS=/java/devtools
builddep_cups=${DEVTOOLS}/linux/cups/include builddep_cups=${DEVTOOLS}/linux/cups/include

View File

@ -25,223 +25,223 @@
AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS], AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
[ [
define(LIST_OF_BUILD_DEPENDENCIES,) define(LIST_OF_BUILD_DEPENDENCIES,)
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
if test "x$with_builddeps_conf" != x; then if test "x$with_builddeps_conf" != x; then
AC_MSG_CHECKING([for supplied builddeps configuration file]) AC_MSG_CHECKING([for supplied builddeps configuration file])
builddepsfile=$with_builddeps_conf builddepsfile=$with_builddeps_conf
if test -s $builddepsfile; then if test -s $builddepsfile; then
. $builddepsfile . $builddepsfile
AC_MSG_RESULT([loaded!]) AC_MSG_RESULT([loaded!])
else else
AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!]) AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
fi fi
else else
AC_MSG_CHECKING([for builddeps.conf files in sources...]) AC_MSG_CHECKING([for builddeps.conf files in sources...])
builddepsfile=`mktemp` builddepsfile=`mktemp`
touch $builddepsfile touch $builddepsfile
# Put all found confs into a single file. # Put all found confs into a single file.
find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
# Source the file to acquire the variables # Source the file to acquire the variables
if test -s $builddepsfile; then if test -s $builddepsfile; then
. $builddepsfile . $builddepsfile
AC_MSG_RESULT([found at least one!]) AC_MSG_RESULT([found at least one!])
else else
AC_MSG_ERROR([Could not find any builddeps.conf at all!]) AC_MSG_ERROR([Could not find any builddeps.conf at all!])
fi fi
fi
# Create build and target names that use _ instead of "-" and ".".
# This is necessary to use them in variable names.
build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
# Extract rewrite information for build and target
eval rewritten_build=\${REWRITE_${build_var}}
if test "x$rewritten_build" = x; then
rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
echo Build stays the same $rewritten_build
else
echo Rewriting build for builddeps into $rewritten_build
fi
eval rewritten_target=\${REWRITE_${target_var}}
if test "x$rewritten_target" = x; then
rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
echo Target stays the same $rewritten_target
else
echo Rewriting target for builddeps into $rewritten_target
fi
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
fi fi
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip]) # Create build and target names that use _ instead of "-" and ".".
if test "x$BDEPS_UNZIP" = x7z; then # This is necessary to use them in variable names.
BDEPS_UNZIP="7z x" build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
# Extract rewrite information for build and target
eval rewritten_build=\${REWRITE_${build_var}}
if test "x$rewritten_build" = x; then
rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
echo Build stays the same $rewritten_build
else
echo Rewriting build for builddeps into $rewritten_build
fi fi
eval rewritten_target=\${REWRITE_${target_var}}
if test "x$rewritten_target" = x; then
rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
echo Target stays the same $rewritten_target
else
echo Rewriting target for builddeps into $rewritten_target
fi
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
fi
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
if test "x$BDEPS_UNZIP" = x7z; then
BDEPS_UNZIP="7z x"
fi
AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp]) AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
]) ])
AC_DEFUN([BDEPS_FTPGET], AC_DEFUN([BDEPS_FTPGET],
[ [
# $1 is the ftp://abuilddeps.server.com/libs/cups.zip # $1 is the ftp://abuilddeps.server.com/libs/cups.zip
# $2 is the local file name for the downloaded file. # $2 is the local file name for the downloaded file.
VALID_TOOL=no VALID_TOOL=no
if test "x$BDEPS_FTP" = xwget; then if test "x$BDEPS_FTP" = xwget; then
VALID_TOOL=yes VALID_TOOL=yes
wget -O $2 $1 wget -O $2 $1
fi fi
if test "x$BDEPS_FTP" = xlftp; then if test "x$BDEPS_FTP" = xlftp; then
VALID_TOOL=yes VALID_TOOL=yes
lftp -c "get $1 -o $2" lftp -c "get $1 -o $2"
fi fi
if test "x$BDEPS_FTP" = xftp; then if test "x$BDEPS_FTP" = xftp; then
VALID_TOOL=yes VALID_TOOL=yes
FTPSERVER=`echo $1 | cut -f 3 -d '/'` FTPSERVER=`echo $1 | cut -f 3 -d '/'`
FTPPATH=`echo $1 | cut -f 4- -d '/'` FTPPATH=`echo $1 | cut -f 4- -d '/'`
FTPUSERPWD=${FTPSERVER%%@*} FTPUSERPWD=${FTPSERVER%%@*}
if test "x$FTPSERVER" != "x$FTPUSERPWD"; then if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
FTPUSER=${userpwd%%:*} FTPUSER=${userpwd%%:*}
FTPPWD=${userpwd#*@} FTPPWD=${userpwd#*@}
FTPSERVER=${FTPSERVER#*@} FTPSERVER=${FTPSERVER#*@}
else else
FTPUSER=ftp FTPUSER=ftp
FTPPWD=ftp FTPPWD=ftp
fi
# the "pass" command does not work on some
# ftp clients (read ftp.exe) but if it works,
# passive mode is better!
(\
echo "user $FTPUSER $FTPPWD" ;\
echo "pass" ;\
echo "bin" ;\
echo "get $FTPPATH $2" ;\
) | ftp -in $FTPSERVER
fi
if test "x$VALID_TOOL" != xyes; then
AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
fi fi
# the "pass" command does not work on some
# ftp clients (read ftp.exe) but if it works,
# passive mode is better!
( \
echo "user $FTPUSER $FTPPWD" ; \
echo "pass" ; \
echo "bin" ; \
echo "get $FTPPATH $2" ; \
) | ftp -in $FTPSERVER
fi
if test "x$VALID_TOOL" != xyes; then
AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
fi
]) ])
AC_DEFUN([BDEPS_CHECK_MODULE], AC_DEFUN([BDEPS_CHECK_MODULE],
[ [
define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n']) define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
# Source the builddeps file again, to make sure it uses the latest variables! # Source the builddeps file again, to make sure it uses the latest variables!
. $builddepsfile . $builddepsfile
# Look for a target and build machine specific resource! # Look for a target and build machine specific resource!
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
if test "x$resource" = x; then if test "x$resource" = x; then
# Ok, lets instead look for a target specific resource # Ok, lets instead look for a target specific resource
eval resource=\${builddep_$2_TARGET_${rewritten_target_var}} eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
fi
if test "x$resource" = x; then
# Ok, lets instead look for a build specific resource
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
fi
if test "x$resource" = x; then
# Ok, lets instead look for a generic resource
# (The $2 comes from M4 and not the shell, thus no need for eval here.)
resource=${builddep_$2}
fi
if test "x$resource" != x; then
AC_MSG_NOTICE([Using builddeps $resource for $2])
# If the resource in the builddeps.conf file is an existing directory,
# for example /java/linux/cups
if test -d ${resource}; then
depdir=${resource}
else
BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
fi
# Source the builddeps file again, because in the previous command, the depdir
# was updated to point at the current build dependency install directory.
. $builddepsfile
# Now extract variables from the builddeps.conf files.
theroot=${builddep_$2_ROOT}
thecflags=${builddep_$2_CFLAGS}
thelibs=${builddep_$2_LIBS}
if test "x$depdir" = x; then
AC_MSG_ERROR([Could not download build dependency $2])
fi
$1=$depdir
if test "x$theroot" != x; then
$1="$theroot"
fi
if test "x$thecflags" != x; then
$1_CFLAGS="$thecflags"
fi
if test "x$thelibs" != x; then
$1_LIBS="$thelibs"
fi
m4_default([$4], [:])
m4_ifvaln([$5], [else $5])
fi
m4_ifvaln([$5], [else $5])
fi fi
if test "x$resource" = x; then
# Ok, lets instead look for a build specific resource
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
fi
if test "x$resource" = x; then
# Ok, lets instead look for a generic resource
# (The $2 comes from M4 and not the shell, thus no need for eval here.)
resource=${builddep_$2}
fi
if test "x$resource" != x; then
AC_MSG_NOTICE([Using builddeps $resource for $2])
# If the resource in the builddeps.conf file is an existing directory,
# for example /java/linux/cups
if test -d ${resource}; then
depdir=${resource}
else
BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
fi
# Source the builddeps file again, because in the previous command, the depdir
# was updated to point at the current build dependency install directory.
. $builddepsfile
# Now extract variables from the builddeps.conf files.
theroot=${builddep_$2_ROOT}
thecflags=${builddep_$2_CFLAGS}
thelibs=${builddep_$2_LIBS}
if test "x$depdir" = x; then
AC_MSG_ERROR([Could not download build dependency $2])
fi
$1=$depdir
if test "x$theroot" != x; then
$1="$theroot"
fi
if test "x$thecflags" != x; then
$1_CFLAGS="$thecflags"
fi
if test "x$thelibs" != x; then
$1_LIBS="$thelibs"
fi
m4_default([$4], [:])
m4_ifvaln([$5], [else $5])
fi
m4_ifvaln([$5], [else $5])
fi
]) ])
AC_DEFUN([BDEPS_FETCH], AC_DEFUN([BDEPS_FETCH],
[ [
# $1 is for example mymodule # $1 is for example mymodule
# $2 is for example libs/general/libmymod_1_2_3.zip # $2 is for example libs/general/libmymod_1_2_3.zip
# $3 is for example ftp://mybuilddeps.myserver.com/builddeps # $3 is for example ftp://mybuilddeps.myserver.com/builddeps
# $4 is for example /localhome/builddeps # $4 is for example /localhome/builddeps
# $5 is the name of the variable into which we store the depdir, eg MYMOD # $5 is the name of the variable into which we store the depdir, eg MYMOD
# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
filename=`basename $2` filename=`basename $2`
filebase=`echo $filename | sed 's/\.[[^\.]]*$//'` filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
filebase=${filename%%.*} filebase=${filename%%.*}
extension=${filename#*.} extension=${filename#*.}
installdir=$4/$filebase installdir=$4/$filebase
if test ! -f $installdir/$filename.unpacked; then if test ! -f $installdir/$filename.unpacked; then
AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir]) AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
if test ! -d $installdir; then if test ! -d $installdir; then
mkdir -p $installdir mkdir -p $installdir
fi
if test ! -d $installdir; then
AC_MSG_ERROR([Could not create directory $installdir])
fi
tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
touch $tmpfile
if test ! -f $tmpfile; then
AC_MSG_ERROR([Could not create files in directory $installdir])
fi
BDEPS_FTPGET([$3/$2] , [$tmpfile])
mv $tmpfile $installdir/$filename
if test ! -s $installdir/$filename; then
AC_MSG_ERROR([Could not download $3/$2])
fi
case "$extension" in
zip) echo "Unzipping $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
;;
tar.gz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
tgz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
*) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
;;
esac
fi fi
if test -f $installdir/$filename.unpacked; then if test ! -d $installdir; then
$5=$installdir AC_MSG_ERROR([Could not create directory $installdir])
fi fi
tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
touch $tmpfile
if test ! -f $tmpfile; then
AC_MSG_ERROR([Could not create files in directory $installdir])
fi
BDEPS_FTPGET([$3/$2] , [$tmpfile])
mv $tmpfile $installdir/$filename
if test ! -s $installdir/$filename; then
AC_MSG_ERROR([Could not download $3/$2])
fi
case "$extension" in
zip) echo "Unzipping $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
;;
tar.gz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
tgz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
*) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
;;
esac
fi
if test -f $installdir/$filename.unpacked; then
$5=$installdir
fi
]) ])
AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS], AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
[ [
AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf], AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
[use this configuration file for the builddeps])]) [use this configuration file for the builddeps])])
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server], AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
[download and use build dependencies from this server url])]) [download and use build dependencies from this server url])])
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir], AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
[store downloaded build dependencies here @<:@/localhome/builddeps@:>@])], [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
[], [],
[with_builddeps_dir=/localhome/builddeps]) [with_builddeps_dir=/localhome/builddeps])
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group], AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
[chgrp the downloaded build dependencies to this group])]) [chgrp the downloaded build dependencies to this group])])
]) ])

View File

@ -22,7 +22,7 @@
# questions. # questions.
# #
# This script is processed by configure before it's usable. It is run from # This script is processed by configure before it's usable. It is run from
# the root of the build directory. # the root of the build directory.
@ -67,14 +67,14 @@ UNZIP="@UNZIP@"
SRC_ROOT="@SRC_ROOT@" SRC_ROOT="@SRC_ROOT@"
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
PATH="@VS_PATH@" PATH="@VS_PATH@"
fi fi
# Now locate the main script and run it. # Now locate the main script and run it.
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh" REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT" echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
exit 1 exit 1
fi fi
. "$REAL_COMPARE_SCRIPT" "$@" . "$REAL_COMPARE_SCRIPT" "$@"

View File

@ -46,4 +46,4 @@
#define HAVE_LIBGIF #define HAVE_LIBGIF
#define HAVE_LIBZ #define HAVE_LIBZ
#define HAVE_LIBM #define HAVE_LIBM
#define HAVE_ALTZONE #define HAVE_ALTZONE

View File

@ -88,7 +88,6 @@ check_hg_updates() {
check_autoconf_timestamps check_autoconf_timestamps
fi fi
fi fi
fi fi
} }
@ -106,7 +105,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then
fi fi
fi fi
# Autoconf calls the configure script recursively sometimes. # Autoconf calls the configure script recursively sometimes.
# Don't start logging twice in that case # Don't start logging twice in that case
if test "x$conf_debug_configure" = xtrue; then if test "x$conf_debug_configure" = xtrue; then
conf_debug_configure=recursive conf_debug_configure=recursive
@ -120,28 +119,28 @@ conf_openjdk_target=
for conf_option for conf_option
do do
case $conf_option in case $conf_option in
--openjdk-target=*) --openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'` conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;; continue ;;
--debug-configure) --debug-configure)
if test "x$conf_debug_configure" != xrecursive; then if test "x$conf_debug_configure" != xrecursive; then
conf_debug_configure=true conf_debug_configure=true
export conf_debug_configure export conf_debug_configure
fi fi
continue ;; continue ;;
*) *)
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;; conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
esac esac
case $conf_option in case $conf_option in
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*) -build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) -target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*) -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-help | --help | --hel | --he | -h) -help | --help | --hel | --he | -h)
conf_print_help=true ;; conf_print_help=true ;;
esac esac
done done
@ -179,7 +178,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then
else else
echo Running generated-configure.sh echo Running generated-configure.sh
conf_script_to_run=$conf_script_dir/generated-configure.sh conf_script_to_run=$conf_script_dir/generated-configure.sh
fi fi
if test "x$conf_debug_configure" != x; then if test "x$conf_debug_configure" != x; then
# Turn on shell debug output if requested (initial or recursive) # Turn on shell debug output if requested (initial or recursive)

View File

@ -236,7 +236,7 @@ CONFIG_STATUS="$OUTPUT_ROOT/config.status"
# Create the actual output files. Now the main work of configure is done. # Create the actual output files. Now the main work of configure is done.
AC_OUTPUT AC_OUTPUT
# Try to move the config.log file to the output directory. # Try to move the config.log file to the output directory.
if test -e ./config.log; then if test -e ./config.log; then
$MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
fi fi

File diff suppressed because it is too large Load Diff

View File

@ -25,194 +25,194 @@
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP], AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
[ [
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd) AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
]) ])
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
[ [
# Print a helpful message on how to acquire the necessary build dependency. # Print a helpful message on how to acquire the necessary build dependency.
# $1 is the help tag: freetyp2, cups, pulse, alsa etc # $1 is the help tag: freetyp2, cups, pulse, alsa etc
MISSING_DEPENDENCY=$1 MISSING_DEPENDENCY=$1
PKGHANDLER_COMMAND= PKGHANDLER_COMMAND=
case $PKGHANDLER in case $PKGHANDLER in
apt-get) apt-get)
apt_help $MISSING_DEPENDENCY ;; apt_help $MISSING_DEPENDENCY ;;
yum) yum)
yum_help $MISSING_DEPENDENCY ;; yum_help $MISSING_DEPENDENCY ;;
port) port)
port_help $MISSING_DEPENDENCY ;; port_help $MISSING_DEPENDENCY ;;
pkgutil) pkgutil)
pkgutil_help $MISSING_DEPENDENCY ;; pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd) pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;; pkgadd_help $MISSING_DEPENDENCY ;;
* ) * )
break ;; break ;;
esac esac
if test "x$PKGHANDLER_COMMAND" != x; then if test "x$PKGHANDLER_COMMAND" != x; then
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi fi
]) ])
cygwin_help() { cygwin_help() {
case $1 in case $1 in
unzip) unzip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
zip) zip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
make) make)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
* ) * )
break ;; break ;;
esac esac
} }
apt_help() { apt_help() {
case $1 in case $1 in
devkit) devkit)
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
openjdk) openjdk)
PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
alsa) alsa)
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
cups) cups)
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
freetype2) freetype2)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
pulse) pulse)
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
x11) x11)
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache) ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
* ) * )
break ;; break ;;
esac esac
} }
yum_help() { yum_help() {
case $1 in case $1 in
devkit) devkit)
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
openjdk) openjdk)
PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
alsa) alsa)
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
cups) cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype2) freetype2)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
pulse) pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11) x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;; PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
ccache) ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;; PKGHANDLER_COMMAND="sudo yum install ccache" ;;
* ) * )
break ;; break ;;
esac esac
} }
port_help() { port_help() {
PKGHANDLER_COMMAND="" PKGHANDLER_COMMAND=""
} }
pkgutil_help() { pkgutil_help() {
PKGHANDLER_COMMAND="" PKGHANDLER_COMMAND=""
} }
pkgadd_help() { pkgadd_help() {
PKGHANDLER_COMMAND="" PKGHANDLER_COMMAND=""
} }
AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
[ [
# Finally output some useful information to the user # Finally output some useful information to the user
if test "x$CCACHE_FOUND" != x; then if test "x$CCACHE_FOUND" != x; then
if test "x$HAS_GOOD_CCACHE" = x; then if test "x$HAS_GOOD_CCACHE" = x; then
CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
else else
CCACHE_STATUS="installed and in use" CCACHE_STATUS="installed and in use"
fi fi
else else
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
CCACHE_STATUS="not installed (consider installing)" CCACHE_STATUS="not installed (consider installing)"
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
else else
CCACHE_STATUS="not available for your system" CCACHE_STATUS="not available for your system"
fi fi
fi fi
printf "\n" printf "\n"
printf "====================================================\n" printf "====================================================\n"
printf "A new configuration has been successfully created in\n" printf "A new configuration has been successfully created in\n"
printf "$OUTPUT_ROOT\n" printf "$OUTPUT_ROOT\n"
if test "x$CONFIGURE_COMMAND_LINE" != x; then if test "x$CONFIGURE_COMMAND_LINE" != x; then
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
else else
printf "using default settings.\n" printf "using default settings.\n"
fi fi
printf "\n" printf "\n"
printf "Configuration summary:\n" printf "Configuration summary:\n"
printf "* Debug level: $DEBUG_LEVEL\n" printf "* Debug level: $DEBUG_LEVEL\n"
printf "* JDK variant: $JDK_VARIANT\n" printf "* JDK variant: $JDK_VARIANT\n"
printf "* JVM variants: $with_jvm_variants\n" printf "* JVM variants: $with_jvm_variants\n"
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
printf "\n" printf "\n"
printf "Tools summary:\n" printf "Tools summary:\n"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
fi fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
printf "\n" printf "\n"
printf "Build performance summary:\n" printf "Build performance summary:\n"
printf "* Cores to use: $JOBS\n" printf "* Cores to use: $JOBS\n"
printf "* Memory limit: $MEMORY_SIZE MB\n" printf "* Memory limit: $MEMORY_SIZE MB\n"
printf "* ccache status: $CCACHE_STATUS\n" printf "* ccache status: $CCACHE_STATUS\n"
printf "\n" printf "\n"
if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
printf "$CCACHE_HELP_MSG\n" printf "$CCACHE_HELP_MSG\n"
HELP_MSG_MISSING_DEPENDENCY([ccache]) HELP_MSG_MISSING_DEPENDENCY([ccache])
printf "$HELP_MSG\n" printf "$HELP_MSG\n"
printf "\n" printf "\n"
fi fi
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
printf "NOTE: You have requested to build more than one version of the JVM, which\n" printf "NOTE: You have requested to build more than one version of the JVM, which\n"
printf "will result in longer build times.\n" printf "will result in longer build times.\n"
printf "\n" printf "\n"
fi fi
if test "x$FOUND_ALT_VARIABLES" != "x"; then if test "x$FOUND_ALT_VARIABLES" != "x"; then
printf "WARNING: You have old-style ALT_ environment variables set.\n" printf "WARNING: You have old-style ALT_ environment variables set.\n"
printf "These are not respected, and will be ignored. It is recommended\n" printf "These are not respected, and will be ignored. It is recommended\n"
printf "that you clean your environment. The following variables are set:\n" printf "that you clean your environment. The following variables are set:\n"
printf "$FOUND_ALT_VARIABLES\n" printf "$FOUND_ALT_VARIABLES\n"
printf "\n" printf "\n"
fi fi
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
printf "WARNING: Your build output directory is not on a local disk.\n" printf "WARNING: Your build output directory is not on a local disk.\n"
printf "This will severely degrade build performance!\n" printf "This will severely degrade build performance!\n"
printf "It is recommended that you create an output directory on a local disk,\n" printf "It is recommended that you create an output directory on a local disk,\n"
printf "and run the configure script again from that directory.\n" printf "and run the configure script again from that directory.\n"
printf "\n" printf "\n"
fi fi
if test "x$IS_RECONFIGURE" = "xyes"; then if test "x$IS_RECONFIGURE" = "xyes"; then
printf "WARNING: The result of this configuration has overridden an older\n" printf "WARNING: The result of this configuration has overridden an older\n"
printf "configuration. You *should* run 'make clean' to make sure you get a\n" printf "configuration. You *should* run 'make clean' to make sure you get a\n"
printf "proper build. Failure to do so might result in strange build problems.\n" printf "proper build. Failure to do so might result in strange build problems.\n"
printf "\n" printf "\n"
fi fi
]) ])

View File

@ -111,12 +111,12 @@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols # Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
# creation. # creation.
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
FULL_DEBUG_SYMBOLS=1 FULL_DEBUG_SYMBOLS=1
# Ensure hotspot uses the objcopy that configure located # Ensure hotspot uses the objcopy that configure located
ALT_OBJCOPY:=$(OBJCOPY) ALT_OBJCOPY:=$(OBJCOPY)
else else
FULL_DEBUG_SYMBOLS=0 FULL_DEBUG_SYMBOLS=0
endif endif

View File

@ -25,235 +25,234 @@
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
[ [
############################################################################### ###############################################################################
# #
# Check which variant of the JDK that we want to build. # Check which variant of the JDK that we want to build.
# Currently we have: # Currently we have:
# normal: standard edition # normal: standard edition
# but the custom make system may add other variants # but the custom make system may add other variants
# #
# Effectively the JDK variant gives a name to a specific set of # Effectively the JDK variant gives a name to a specific set of
# modules to compile into the JDK. In the future, these modules # modules to compile into the JDK. In the future, these modules
# might even be Jigsaw modules. # might even be Jigsaw modules.
# #
AC_MSG_CHECKING([which variant of the JDK to build]) AC_MSG_CHECKING([which variant of the JDK to build])
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
[JDK variant to build (normal) @<:@normal@:>@])]) [JDK variant to build (normal) @<:@normal@:>@])])
if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
JDK_VARIANT="normal" JDK_VARIANT="normal"
else else
AC_MSG_ERROR([The available JDK variants are: normal]) AC_MSG_ERROR([The available JDK variants are: normal])
fi fi
AC_SUBST(JDK_VARIANT) AC_SUBST(JDK_VARIANT)
AC_MSG_RESULT([$JDK_VARIANT]) AC_MSG_RESULT([$JDK_VARIANT])
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS], AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
[ [
############################################################################### ###############################################################################
# #
# Check which variants of the JVM that we want to build. # Check which variants of the JVM that we want to build.
# Currently we have: # Currently we have:
# server: normal interpreter and a tiered C1/C2 compiler # server: normal interpreter and a tiered C1/C2 compiler
# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
# minimal1: reduced form of client with optional VM services and features stripped out # minimal1: reduced form of client with optional VM services and features stripped out
# kernel: kernel footprint JVM that passes the TCK without major performance problems, # kernel: kernel footprint JVM that passes the TCK without major performance problems,
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
# zero: no machine code interpreter, no compiler # zero: no machine code interpreter, no compiler
# zeroshark: zero interpreter and shark/llvm compiler backend # zeroshark: zero interpreter and shark/llvm compiler backend
AC_MSG_CHECKING([which variants of the JVM to build]) AC_MSG_CHECKING([which variants of the JVM to build])
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])]) [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
if test "x$with_jvm_variants" = x; then if test "x$with_jvm_variants" = x; then
with_jvm_variants="server" with_jvm_variants="server"
fi fi
JVM_VARIANTS=",$with_jvm_variants," JVM_VARIANTS=",$with_jvm_variants,"
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
if test "x$TEST_VARIANTS" != "x,"; then if test "x$TEST_VARIANTS" != "x,"; then
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark]) AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
fi fi
AC_MSG_RESULT([$with_jvm_variants]) AC_MSG_RESULT([$with_jvm_variants])
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
if test "x$JVM_VARIANT_CLIENT" = xtrue; then if test "x$JVM_VARIANT_CLIENT" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
fi fi
fi fi
if test "x$JVM_VARIANT_KERNEL" = xtrue; then if test "x$JVM_VARIANT_KERNEL" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
fi fi
fi fi
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.]) AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
fi fi
fi fi
# Replace the commas with AND for use in the build directory name. # Replace the commas with AND for use in the build directory name.
ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
if test "x$COUNT_VARIANTS" != "x,1"; then if test "x$COUNT_VARIANTS" != "x,1"; then
BUILDING_MULTIPLE_JVM_VARIANTS=yes BUILDING_MULTIPLE_JVM_VARIANTS=yes
else else
BUILDING_MULTIPLE_JVM_VARIANTS=no BUILDING_MULTIPLE_JVM_VARIANTS=no
fi fi
AC_SUBST(JVM_VARIANTS) AC_SUBST(JVM_VARIANTS)
AC_SUBST(JVM_VARIANT_SERVER) AC_SUBST(JVM_VARIANT_SERVER)
AC_SUBST(JVM_VARIANT_CLIENT) AC_SUBST(JVM_VARIANT_CLIENT)
AC_SUBST(JVM_VARIANT_MINIMAL1) AC_SUBST(JVM_VARIANT_MINIMAL1)
AC_SUBST(JVM_VARIANT_KERNEL) AC_SUBST(JVM_VARIANT_KERNEL)
AC_SUBST(JVM_VARIANT_ZERO) AC_SUBST(JVM_VARIANT_ZERO)
AC_SUBST(JVM_VARIANT_ZEROSHARK) AC_SUBST(JVM_VARIANT_ZEROSHARK)
INCLUDE_SA=true INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false INCLUDE_SA=false
fi fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false INCLUDE_SA=false
fi fi
AC_SUBST(INCLUDE_SA) AC_SUBST(INCLUDE_SA)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
MACOSX_UNIVERSAL="true" MACOSX_UNIVERSAL="true"
fi fi
AC_SUBST(MACOSX_UNIVERSAL)
AC_SUBST(MACOSX_UNIVERSAL)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL], AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
[ [
############################################################################### ###############################################################################
# #
# Set the debug level # Set the debug level
# release: no debug information, all optimizations, no asserts. # release: no debug information, all optimizations, no asserts.
# fastdebug: debug information (-g), all optimizations, all asserts # fastdebug: debug information (-g), all optimizations, all asserts
# slowdebug: debug information (-g), no optimizations, all asserts # slowdebug: debug information (-g), no optimizations, all asserts
# #
DEBUG_LEVEL="release" DEBUG_LEVEL="release"
AC_MSG_CHECKING([which debug level to use]) AC_MSG_CHECKING([which debug level to use])
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])], [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
[ [
ENABLE_DEBUG="${enableval}" ENABLE_DEBUG="${enableval}"
DEBUG_LEVEL="fastdebug" DEBUG_LEVEL="fastdebug"
], [ENABLE_DEBUG="no"]) ], [ENABLE_DEBUG="no"])
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])], [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
[ [
DEBUG_LEVEL="${withval}" DEBUG_LEVEL="${withval}"
if test "x$ENABLE_DEBUG" = xyes; then if test "x$ENABLE_DEBUG" = xyes; then
AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.]) AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
fi fi
]) ])
AC_MSG_RESULT([$DEBUG_LEVEL]) AC_MSG_RESULT([$DEBUG_LEVEL])
if test "x$DEBUG_LEVEL" != xrelease && \ if test "x$DEBUG_LEVEL" != xrelease && \
test "x$DEBUG_LEVEL" != xfastdebug && \ test "x$DEBUG_LEVEL" != xfastdebug && \
test "x$DEBUG_LEVEL" != xslowdebug; then test "x$DEBUG_LEVEL" != xslowdebug; then
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
fi fi
############################################################################### ###############################################################################
# #
# Setup legacy vars/targets and new vars to deal with different debug levels. # Setup legacy vars/targets and new vars to deal with different debug levels.
# #
case $DEBUG_LEVEL in case $DEBUG_LEVEL in
release ) release )
VARIANT="OPT" VARIANT="OPT"
FASTDEBUG="false" FASTDEBUG="false"
DEBUG_CLASSFILES="false" DEBUG_CLASSFILES="false"
BUILD_VARIANT_RELEASE="" BUILD_VARIANT_RELEASE=""
HOTSPOT_DEBUG_LEVEL="product" HOTSPOT_DEBUG_LEVEL="product"
HOTSPOT_EXPORT="product" HOTSPOT_EXPORT="product"
;; ;;
fastdebug ) fastdebug )
VARIANT="DBG" VARIANT="DBG"
FASTDEBUG="true" FASTDEBUG="true"
DEBUG_CLASSFILES="true" DEBUG_CLASSFILES="true"
BUILD_VARIANT_RELEASE="-fastdebug" BUILD_VARIANT_RELEASE="-fastdebug"
HOTSPOT_DEBUG_LEVEL="fastdebug" HOTSPOT_DEBUG_LEVEL="fastdebug"
HOTSPOT_EXPORT="fastdebug" HOTSPOT_EXPORT="fastdebug"
;; ;;
slowdebug ) slowdebug )
VARIANT="DBG" VARIANT="DBG"
FASTDEBUG="false" FASTDEBUG="false"
DEBUG_CLASSFILES="true" DEBUG_CLASSFILES="true"
BUILD_VARIANT_RELEASE="-debug" BUILD_VARIANT_RELEASE="-debug"
HOTSPOT_DEBUG_LEVEL="jvmg" HOTSPOT_DEBUG_LEVEL="jvmg"
HOTSPOT_EXPORT="debug" HOTSPOT_EXPORT="debug"
;; ;;
esac esac
##### #####
# Generate the legacy makefile targets for hotspot. # Generate the legacy makefile targets for hotspot.
# The hotspot api for selecting the build artifacts, really, needs to be improved. # The hotspot api for selecting the build artifacts, really, needs to be improved.
# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
# But until then ... # But until then ...
HOTSPOT_TARGET="" HOTSPOT_TARGET=""
if test "x$JVM_VARIANT_SERVER" = xtrue; then if test "x$JVM_VARIANT_SERVER" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
fi fi
if test "x$JVM_VARIANT_CLIENT" = xtrue; then if test "x$JVM_VARIANT_CLIENT" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
fi fi
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
fi fi
if test "x$JVM_VARIANT_KERNEL" = xtrue; then if test "x$JVM_VARIANT_KERNEL" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
fi fi
if test "x$JVM_VARIANT_ZERO" = xtrue; then if test "x$JVM_VARIANT_ZERO" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
fi fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
fi fi
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
# On Macosx universal binaries are produced, but they only contain # On Macosx universal binaries are produced, but they only contain
# 64 bit intel. This invalidates control of which jvms are built # 64 bit intel. This invalidates control of which jvms are built
# from configure, but only server is valid anyway. Fix this # from configure, but only server is valid anyway. Fix this
# when hotspot makefiles are rewritten. # when hotspot makefiles are rewritten.
if test "x$MACOSX_UNIVERSAL" = xtrue; then if test "x$MACOSX_UNIVERSAL" = xtrue; then
HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
fi fi
##### #####
AC_SUBST(DEBUG_LEVEL) AC_SUBST(DEBUG_LEVEL)
AC_SUBST(VARIANT) AC_SUBST(VARIANT)
AC_SUBST(FASTDEBUG) AC_SUBST(FASTDEBUG)
AC_SUBST(DEBUG_CLASSFILES) AC_SUBST(DEBUG_CLASSFILES)
AC_SUBST(BUILD_VARIANT_RELEASE) AC_SUBST(BUILD_VARIANT_RELEASE)
]) ])
@ -264,7 +263,7 @@ AC_SUBST(BUILD_VARIANT_RELEASE)
AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM], AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
[ [
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
[suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"]) [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
AC_MSG_CHECKING([for presence of closed sources]) AC_MSG_CHECKING([for presence of closed sources])
if test -d "$SRC_ROOT/jdk/src/closed"; then if test -d "$SRC_ROOT/jdk/src/closed"; then
@ -301,100 +300,100 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
[ [
############################################################################### ###############################################################################
# #
# Should we build a JDK/JVM with headful support (ie a graphical ui)? # Should we build a JDK/JVM with headful support (ie a graphical ui)?
# We always build headless support. # We always build headless support.
# #
AC_MSG_CHECKING([headful support]) AC_MSG_CHECKING([headful support])
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
[disable building headful support (graphical UI support) @<:@enabled@:>@])], [disable building headful support (graphical UI support) @<:@enabled@:>@])],
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
SUPPORT_HEADLESS=yes SUPPORT_HEADLESS=yes
BUILD_HEADLESS="BUILD_HEADLESS:=true" BUILD_HEADLESS="BUILD_HEADLESS:=true"
if test "x$SUPPORT_HEADFUL" = xyes; then if test "x$SUPPORT_HEADFUL" = xyes; then
# We are building both headful and headless. # We are building both headful and headless.
headful_msg="include support for both headful and headless" headful_msg="include support for both headful and headless"
fi fi
if test "x$SUPPORT_HEADFUL" = xno; then if test "x$SUPPORT_HEADFUL" = xno; then
# Thus we are building headless only. # Thus we are building headless only.
BUILD_HEADLESS="BUILD_HEADLESS:=true" BUILD_HEADLESS="BUILD_HEADLESS:=true"
headful_msg="headless only" headful_msg="headless only"
fi fi
AC_MSG_RESULT([$headful_msg]) AC_MSG_RESULT([$headful_msg])
AC_SUBST(SUPPORT_HEADLESS) AC_SUBST(SUPPORT_HEADLESS)
AC_SUBST(SUPPORT_HEADFUL) AC_SUBST(SUPPORT_HEADFUL)
AC_SUBST(BUILD_HEADLESS) AC_SUBST(BUILD_HEADLESS)
# Control wether Hotspot runs Queens test after build. # Control wether Hotspot runs Queens test after build.
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
[run the Queens test after Hotspot build @<:@disabled@:>@])],, [run the Queens test after Hotspot build @<:@disabled@:>@])],,
[enable_hotspot_test_in_build=no]) [enable_hotspot_test_in_build=no])
if test "x$enable_hotspot_test_in_build" = "xyes"; then if test "x$enable_hotspot_test_in_build" = "xyes"; then
TEST_IN_BUILD=true TEST_IN_BUILD=true
else else
TEST_IN_BUILD=false TEST_IN_BUILD=false
fi fi
AC_SUBST(TEST_IN_BUILD) AC_SUBST(TEST_IN_BUILD)
############################################################################### ###############################################################################
# #
# Choose cacerts source file # Choose cacerts source file
# #
AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
[specify alternative cacerts file])]) [specify alternative cacerts file])])
if test "x$with_cacerts_file" != x; then if test "x$with_cacerts_file" != x; then
CACERTS_FILE=$with_cacerts_file CACERTS_FILE=$with_cacerts_file
else else
CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
fi fi
AC_SUBST(CACERTS_FILE) AC_SUBST(CACERTS_FILE)
############################################################################### ###############################################################################
# #
# Enable or disable unlimited crypto # Enable or disable unlimited crypto
# #
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto], AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
[Enable unlimited crypto policy @<:@disabled@:>@])],, [Enable unlimited crypto policy @<:@disabled@:>@])],,
[enable_unlimited_crypto=no]) [enable_unlimited_crypto=no])
if test "x$enable_unlimited_crypto" = "xyes"; then if test "x$enable_unlimited_crypto" = "xyes"; then
UNLIMITED_CRYPTO=true UNLIMITED_CRYPTO=true
else else
UNLIMITED_CRYPTO=false UNLIMITED_CRYPTO=false
fi fi
AC_SUBST(UNLIMITED_CRYPTO) AC_SUBST(UNLIMITED_CRYPTO)
############################################################################### ###############################################################################
# #
# Enable or disable the elliptic curve crypto implementation # Enable or disable the elliptic curve crypto implementation
# #
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
[ [
AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
ENABLE_INTREE_EC=yes ENABLE_INTREE_EC=yes
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
ENABLE_INTREE_EC=no ENABLE_INTREE_EC=no
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
AC_SUBST(ENABLE_INTREE_EC) AC_SUBST(ENABLE_INTREE_EC)
]) ])
############################################################################### ###############################################################################
# #
# Compress jars # Compress jars
# #
COMPRESS_JARS=false COMPRESS_JARS=false
AC_SUBST(COMPRESS_JARS) AC_SUBST(COMPRESS_JARS)
]) ])
############################################################################### ###############################################################################
@ -403,153 +402,152 @@ AC_SUBST(COMPRESS_JARS)
# #
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
[ [
# Source the version numbers # Source the version numbers
. $AUTOCONF_DIR/version-numbers . $AUTOCONF_DIR/version-numbers
# Get the settings from parameters # Get the settings from parameters
AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
[Set milestone value for build @<:@internal@:>@])]) [Set milestone value for build @<:@internal@:>@])])
if test "x$with_milestone" = xyes; then if test "x$with_milestone" = xyes; then
AC_MSG_ERROR([Milestone must have a value]) AC_MSG_ERROR([Milestone must have a value])
elif test "x$with_milestone" != x; then elif test "x$with_milestone" != x; then
MILESTONE="$with_milestone" MILESTONE="$with_milestone"
fi
if test "x$MILESTONE" = x; then
MILESTONE=internal
fi
AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
[Set update version value for build @<:@b00@:>@])])
if test "x$with_update_version" = xyes; then
AC_MSG_ERROR([Update version must have a value])
elif test "x$with_update_version" != x; then
JDK_UPDATE_VERSION="$with_update_version"
fi
AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
[Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
if test "x$with_user_release_suffix" = xyes; then
AC_MSG_ERROR([Release suffix must have a value])
elif test "x$with_user_release_suffix" != x; then
USER_RELEASE_SUFFIX="$with_user_release_suffix"
fi
AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
[Set build number value for build @<:@b00@:>@])])
if test "x$with_build_number" = xyes; then
AC_MSG_ERROR([Build number must have a value])
elif test "x$with_build_number" != x; then
JDK_BUILD_NUMBER="$with_build_number"
fi
# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
if test "x$JDK_BUILD_NUMBER" = x; then
JDK_BUILD_NUMBER=b00
if test "x$USER_RELEASE_SUFFIX" = x; then
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi fi
fi if test "x$MILESTONE" = x; then
MILESTONE=internal
fi
# Now set the JDK version, milestone, build number etc. AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
AC_SUBST(USER_RELEASE_SUFFIX) [Set update version value for build @<:@b00@:>@])])
AC_SUBST(JDK_MAJOR_VERSION) if test "x$with_update_version" = xyes; then
AC_SUBST(JDK_MINOR_VERSION) AC_MSG_ERROR([Update version must have a value])
AC_SUBST(JDK_MICRO_VERSION) elif test "x$with_update_version" != x; then
AC_SUBST(JDK_UPDATE_VERSION) JDK_UPDATE_VERSION="$with_update_version"
AC_SUBST(JDK_BUILD_NUMBER) fi
AC_SUBST(MILESTONE)
AC_SUBST(LAUNCHER_NAME)
AC_SUBST(PRODUCT_NAME)
AC_SUBST(PRODUCT_SUFFIX)
AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(COMPANY_NAME)
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
COPYRIGHT_YEAR=`date +'%Y'` AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
AC_SUBST(COPYRIGHT_YEAR) [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
if test "x$with_user_release_suffix" = xyes; then
AC_MSG_ERROR([Release suffix must have a value])
elif test "x$with_user_release_suffix" != x; then
USER_RELEASE_SUFFIX="$with_user_release_suffix"
fi
if test "x$JDK_UPDATE_VERSION" != x; then AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" [Set build number value for build @<:@b00@:>@])])
else if test "x$with_build_number" = xyes; then
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" AC_MSG_ERROR([Build number must have a value])
fi elif test "x$with_build_number" != x; then
AC_SUBST(JDK_VERSION) JDK_BUILD_NUMBER="$with_build_number"
fi
# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
if test "x$JDK_BUILD_NUMBER" = x; then
JDK_BUILD_NUMBER=b00
if test "x$USER_RELEASE_SUFFIX" = x; then
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
fi
COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` # Now set the JDK version, milestone, build number etc.
AC_SUBST(COOKED_BUILD_NUMBER) AC_SUBST(USER_RELEASE_SUFFIX)
AC_SUBST(JDK_MAJOR_VERSION)
AC_SUBST(JDK_MINOR_VERSION)
AC_SUBST(JDK_MICRO_VERSION)
AC_SUBST(JDK_UPDATE_VERSION)
AC_SUBST(JDK_BUILD_NUMBER)
AC_SUBST(MILESTONE)
AC_SUBST(LAUNCHER_NAME)
AC_SUBST(PRODUCT_NAME)
AC_SUBST(PRODUCT_SUFFIX)
AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(COMPANY_NAME)
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
COPYRIGHT_YEAR=`date +'%Y'`
AC_SUBST(COPYRIGHT_YEAR)
if test "x$JDK_UPDATE_VERSION" != x; then
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
else
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
fi
AC_SUBST(JDK_VERSION)
COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
AC_SUBST(COOKED_BUILD_NUMBER)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
[ [
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
AC_SUBST(HOTSPOT_MAKE_ARGS) AC_SUBST(HOTSPOT_MAKE_ARGS)
# The name of the Service Agent jar.
SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
fi
AC_SUBST(SALIB_NAME)
# The name of the Service Agent jar.
SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
fi
AC_SUBST(SALIB_NAME)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
[ [
# #
# ENABLE_DEBUG_SYMBOLS # ENABLE_DEBUG_SYMBOLS
# This must be done after the toolchain is setup, since we're looking at objcopy. # This must be done after the toolchain is setup, since we're looking at objcopy.
# #
AC_ARG_ENABLE([debug-symbols], AC_ARG_ENABLE([debug-symbols],
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])]) [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
AC_MSG_CHECKING([if we should generate debug symbols]) AC_MSG_CHECKING([if we should generate debug symbols])
if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
# explicit enabling of enable-debug-symbols and can't find objcopy # explicit enabling of enable-debug-symbols and can't find objcopy
# this is an error # this is an error
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
fi
if test "x$enable_debug_symbols" = "xyes"; then
ENABLE_DEBUG_SYMBOLS=true
elif test "x$enable_debug_symbols" = "xno"; then
ENABLE_DEBUG_SYMBOLS=false
else
# default on macosx is false
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=false
# Default is on if objcopy is found, otherwise off
elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=true
else
ENABLE_DEBUG_SYMBOLS=false
fi fi
fi
AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) if test "x$enable_debug_symbols" = "xyes"; then
ENABLE_DEBUG_SYMBOLS=true
elif test "x$enable_debug_symbols" = "xno"; then
ENABLE_DEBUG_SYMBOLS=false
else
# default on macosx is false
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=false
# Default is on if objcopy is found, otherwise off
elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=true
else
ENABLE_DEBUG_SYMBOLS=false
fi
fi
# AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
# ZIP_DEBUGINFO_FILES
#
AC_MSG_CHECKING([if we should zip debug-info files])
AC_ARG_ENABLE([zip-debug-info],
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
[enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
AC_MSG_RESULT([${enable_zip_debug_info}])
if test "x${enable_zip_debug_info}" = "xno"; then #
ZIP_DEBUGINFO_FILES=false # ZIP_DEBUGINFO_FILES
else #
ZIP_DEBUGINFO_FILES=true AC_MSG_CHECKING([if we should zip debug-info files])
fi AC_ARG_ENABLE([zip-debug-info],
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
[enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
AC_MSG_RESULT([${enable_zip_debug_info}])
AC_SUBST(ENABLE_DEBUG_SYMBOLS) if test "x${enable_zip_debug_info}" = "xno"; then
AC_SUBST(ZIP_DEBUGINFO_FILES) ZIP_DEBUGINFO_FILES=false
AC_SUBST(CFLAGS_DEBUG_SYMBOLS) else
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) ZIP_DEBUGINFO_FILES=true
fi
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
AC_SUBST(ZIP_DEBUGINFO_FILES)
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
]) ])
# Support for customization of the build process. Some build files # Support for customization of the build process. Some build files
@ -557,5 +555,5 @@ AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
# for a degree of customization of the build targets and the rules/recipes # for a degree of customization of the build targets and the rules/recipes
# to create them # to create them
AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir], AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir]) [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
AC_SUBST(CUSTOM_MAKE_DIR) AC_SUBST(CUSTOM_MAKE_DIR)

File diff suppressed because it is too large Load Diff

View File

@ -53,37 +53,37 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
VAR_CPU_ARCH=ppc VAR_CPU_ARCH=ppc
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
;; ;;
powerpc64) powerpc64)
VAR_CPU=ppc64 VAR_CPU=ppc64
VAR_CPU_ARCH=ppc VAR_CPU_ARCH=ppc
VAR_CPU_BITS=64 VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
;; ;;
s390) s390)
VAR_CPU=s390 VAR_CPU=s390
VAR_CPU_ARCH=s390 VAR_CPU_ARCH=s390
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
;; ;;
s390x) s390x)
VAR_CPU=s390x VAR_CPU=s390x
VAR_CPU_ARCH=s390 VAR_CPU_ARCH=s390
VAR_CPU_BITS=64 VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
;; ;;
sparc) sparc)
VAR_CPU=sparc VAR_CPU=sparc
VAR_CPU_ARCH=sparc VAR_CPU_ARCH=sparc
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
;; ;;
sparcv9) sparcv9)
VAR_CPU=sparcv9 VAR_CPU=sparcv9
VAR_CPU_ARCH=sparc VAR_CPU_ARCH=sparc
VAR_CPU_BITS=64 VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
;; ;;
*) *)
AC_MSG_ERROR([unsupported cpu $1]) AC_MSG_ERROR([unsupported cpu $1])
;; ;;
@ -140,56 +140,56 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
# OPENJDK_BUILD_OS, etc. # OPENJDK_BUILD_OS, etc.
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD], AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
[ [
# Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
# (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
# Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build, # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
# but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME. # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
OPENJDK_TARGET_AUTOCONF_NAME="$host" OPENJDK_TARGET_AUTOCONF_NAME="$host"
OPENJDK_BUILD_AUTOCONF_NAME="$build" OPENJDK_BUILD_AUTOCONF_NAME="$build"
AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME) AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME) AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
PLATFORM_EXTRACT_VARS_FROM_OS($build_os) PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu) PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
# ..and setup our own variables. (Do this explicitely to facilitate searching) # ..and setup our own variables. (Do this explicitely to facilitate searching)
OPENJDK_BUILD_OS="$VAR_OS" OPENJDK_BUILD_OS="$VAR_OS"
OPENJDK_BUILD_OS_API="$VAR_OS_API" OPENJDK_BUILD_OS_API="$VAR_OS_API"
OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV" OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
OPENJDK_BUILD_CPU="$VAR_CPU" OPENJDK_BUILD_CPU="$VAR_CPU"
OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_BUILD_OS) AC_SUBST(OPENJDK_BUILD_OS)
AC_SUBST(OPENJDK_BUILD_OS_API) AC_SUBST(OPENJDK_BUILD_OS_API)
AC_SUBST(OPENJDK_BUILD_CPU) AC_SUBST(OPENJDK_BUILD_CPU)
AC_SUBST(OPENJDK_BUILD_CPU_ARCH) AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
AC_SUBST(OPENJDK_BUILD_CPU_BITS) AC_SUBST(OPENJDK_BUILD_CPU_BITS)
AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN) AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
AC_MSG_CHECKING([openjdk-build os-cpu]) AC_MSG_CHECKING([openjdk-build os-cpu])
AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU]) AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
PLATFORM_EXTRACT_VARS_FROM_OS($host_os) PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu) PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
# ... and setup our own variables. (Do this explicitely to facilitate searching) # ... and setup our own variables. (Do this explicitely to facilitate searching)
OPENJDK_TARGET_OS="$VAR_OS" OPENJDK_TARGET_OS="$VAR_OS"
OPENJDK_TARGET_OS_API="$VAR_OS_API" OPENJDK_TARGET_OS_API="$VAR_OS_API"
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV" OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
OPENJDK_TARGET_CPU="$VAR_CPU" OPENJDK_TARGET_CPU="$VAR_CPU"
OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_TARGET_OS) AC_SUBST(OPENJDK_TARGET_OS)
AC_SUBST(OPENJDK_TARGET_OS_API) AC_SUBST(OPENJDK_TARGET_OS_API)
AC_SUBST(OPENJDK_TARGET_CPU) AC_SUBST(OPENJDK_TARGET_CPU)
AC_SUBST(OPENJDK_TARGET_CPU_ARCH) AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
AC_SUBST(OPENJDK_TARGET_CPU_BITS) AC_SUBST(OPENJDK_TARGET_CPU_BITS)
AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN) AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
AC_MSG_CHECKING([openjdk-target os-cpu]) AC_MSG_CHECKING([openjdk-target os-cpu])
AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
]) ])
# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
@ -198,7 +198,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS], AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
[ [
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits], AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])]) [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
# We have three types of compiles: # We have three types of compiles:
# native == normal compilation, target system == build system # native == normal compilation, target system == build system
@ -227,7 +227,7 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
OPENJDK_TARGET_CPU=sparc OPENJDK_TARGET_CPU=sparc
else else
AC_MSG_ERROR([Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9]) AC_MSG_ERROR([Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9])
fi fi
elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
AC_MSG_ERROR([It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead.]) AC_MSG_ERROR([It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead.])
elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
@ -238,184 +238,183 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
fi fi
AC_SUBST(COMPILE_TYPE) AC_SUBST(COMPILE_TYPE)
AC_MSG_CHECKING([compilation type]) AC_MSG_CHECKING([compilation type])
AC_MSG_RESULT([$COMPILE_TYPE]) AC_MSG_RESULT([$COMPILE_TYPE])
]) ])
# Setup the legacy variables, for controlling the old makefiles. # Setup the legacy variables, for controlling the old makefiles.
# #
AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS], AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
[ [
# Also store the legacy naming of the cpu. # Also store the legacy naming of the cpu.
# Ie i586 and amd64 instead of x86 and x86_64 # Ie i586 and amd64 instead of x86 and x86_64
OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU" OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_CPU" = xx86; then if test "x$OPENJDK_TARGET_CPU" = xx86; then
OPENJDK_TARGET_CPU_LEGACY="i586" OPENJDK_TARGET_CPU_LEGACY="i586"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except MacOSX replace x86_64 with amd64. # On all platforms except MacOSX replace x86_64 with amd64.
OPENJDK_TARGET_CPU_LEGACY="amd64" OPENJDK_TARGET_CPU_LEGACY="amd64"
fi fi
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY) AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
# And the second legacy naming of the cpu. # And the second legacy naming of the cpu.
# Ie i386 and amd64 instead of x86 and x86_64. # Ie i386 and amd64 instead of x86 and x86_64.
OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU" OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_CPU" = xx86; then if test "x$OPENJDK_TARGET_CPU" = xx86; then
OPENJDK_TARGET_CPU_LEGACY_LIB="i386" OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
fi fi
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB) AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
# This is the name of the cpu (but using i386 and amd64 instead of # This is the name of the cpu (but using i386 and amd64 instead of
# x86 and x86_64, respectively), preceeded by a /, to be used when # x86 and x86_64, respectively), preceeded by a /, to be used when
# locating libraries. On macosx, it's empty, though. # locating libraries. On macosx, it's empty, though.
OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB" OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
OPENJDK_TARGET_CPU_LIBDIR="" OPENJDK_TARGET_CPU_LIBDIR=""
fi fi
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR) AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
# OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
# /amd64 or /sparcv9. This string is appended to some library paths, like this: # /amd64 or /sparcv9. This string is appended to some library paths, like this:
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
OPENJDK_TARGET_CPU_ISADIR="" OPENJDK_TARGET_CPU_ISADIR=""
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
OPENJDK_TARGET_CPU_ISADIR="/amd64" OPENJDK_TARGET_CPU_ISADIR="/amd64"
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
OPENJDK_TARGET_CPU_ISADIR="/sparcv9" OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
fi
fi fi
AC_SUBST(OPENJDK_TARGET_CPU_ISADIR) fi
AC_SUBST(OPENJDK_TARGET_CPU_ISADIR)
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU" OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
# On linux only, we replace x86 with i386. # On linux only, we replace x86 with i386.
OPENJDK_TARGET_CPU_OSARCH="i386" OPENJDK_TARGET_CPU_OSARCH="i386"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except macosx, we replace x86_64 with amd64. # On all platforms except macosx, we replace x86_64 with amd64.
OPENJDK_TARGET_CPU_OSARCH="amd64" OPENJDK_TARGET_CPU_OSARCH="amd64"
fi fi
AC_SUBST(OPENJDK_TARGET_CPU_OSARCH) AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_CPU" = xx86; then if test "x$OPENJDK_TARGET_CPU" = xx86; then
OPENJDK_TARGET_CPU_JLI="i386" OPENJDK_TARGET_CPU_JLI="i386"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except macosx, we replace x86_64 with amd64. # On all platforms except macosx, we replace x86_64 with amd64.
OPENJDK_TARGET_CPU_JLI="amd64" OPENJDK_TARGET_CPU_JLI="amd64"
fi
# Now setup the -D flags for building libjli.
OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
fi fi
# Now setup the -D flags for building libjli. fi
OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
fi
fi
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
# Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
if test "x$OPENJDK_TARGET_OS_API" = xposix; then if test "x$OPENJDK_TARGET_OS_API" = xposix; then
OPENJDK_TARGET_OS_API_DIR="solaris" OPENJDK_TARGET_OS_API_DIR="solaris"
fi fi
if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
OPENJDK_TARGET_OS_API_DIR="windows" OPENJDK_TARGET_OS_API_DIR="windows"
fi fi
AC_SUBST(OPENJDK_TARGET_OS_API_DIR) AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
A_LP64="LP64:=" A_LP64="LP64:="
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
# unpack200.exe # unpack200.exe
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
ADD_LP64="-D_LP64=1" ADD_LP64="-D_LP64=1"
fi
fi fi
AC_SUBST(LP64,$A_LP64) fi
AC_SUBST(LP64,$A_LP64)
if test "x$COMPILE_TYPE" = "xcross"; then if test "x$COMPILE_TYPE" = "xcross"; then
# FIXME: ... or should this include reduced builds..? # FIXME: ... or should this include reduced builds..?
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY" DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
else else
DEFINE_CROSS_COMPILE_ARCH="" DEFINE_CROSS_COMPILE_ARCH=""
fi fi
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH) AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
# ZERO_ARCHDEF is used to enable architecture-specific code
case "${OPENJDK_TARGET_CPU}" in
ppc*) ZERO_ARCHDEF=PPC ;;
s390*) ZERO_ARCHDEF=S390 ;;
sparc*) ZERO_ARCHDEF=SPARC ;;
x86_64*) ZERO_ARCHDEF=AMD64 ;;
x86) ZERO_ARCHDEF=IA32 ;;
*) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
esac
AC_SUBST(ZERO_ARCHDEF)
# ZERO_ARCHDEF is used to enable architecture-specific code
case "${OPENJDK_TARGET_CPU}" in
ppc*) ZERO_ARCHDEF=PPC ;;
s390*) ZERO_ARCHDEF=S390 ;;
sparc*) ZERO_ARCHDEF=SPARC ;;
x86_64*) ZERO_ARCHDEF=AMD64 ;;
x86) ZERO_ARCHDEF=IA32 ;;
*) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
esac
AC_SUBST(ZERO_ARCHDEF)
]) ])
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
[ [
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
REQUIRED_OS_NAME=SunOS REQUIRED_OS_NAME=SunOS
REQUIRED_OS_VERSION=5.10 REQUIRED_OS_VERSION=5.10
fi fi
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
REQUIRED_OS_NAME=Linux REQUIRED_OS_NAME=Linux
REQUIRED_OS_VERSION=2.6 REQUIRED_OS_VERSION=2.6
fi fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
REQUIRED_OS_NAME=Windows REQUIRED_OS_NAME=Windows
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
REQUIRED_OS_VERSION=5.2 REQUIRED_OS_VERSION=5.2
else else
REQUIRED_OS_VERSION=5.1 REQUIRED_OS_VERSION=5.1
fi
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
REQUIRED_OS_NAME=Darwin
REQUIRED_OS_VERSION=11.2
fi fi
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
REQUIRED_OS_NAME=Darwin
REQUIRED_OS_VERSION=11.2
fi
AC_SUBST(REQUIRED_OS_NAME) AC_SUBST(REQUIRED_OS_NAME)
AC_SUBST(REQUIRED_OS_VERSION) AC_SUBST(REQUIRED_OS_VERSION)
]) ])
#%%% Build and target systems %%% #%%% Build and target systems %%%
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
[ [
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
# product you're building. The target of this build is called "host". Since this is confusing to most people, we # product you're building. The target of this build is called "host". Since this is confusing to most people, we
# have not adopted that system, but use "target" as the platform we are building for. In some places though we need # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
# to use the configure naming style. # to use the configure naming style.
AC_CANONICAL_BUILD AC_CANONICAL_BUILD
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
PLATFORM_EXTRACT_TARGET_AND_BUILD PLATFORM_EXTRACT_TARGET_AND_BUILD
PLATFORM_SETUP_TARGET_CPU_BITS PLATFORM_SETUP_TARGET_CPU_BITS
PLATFORM_SET_RELEASE_FILE_OS_VALUES PLATFORM_SET_RELEASE_FILE_OS_VALUES
PLATFORM_SETUP_LEGACY_VARS PLATFORM_SETUP_LEGACY_VARS
]) ])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
[ [
############################################################################### ###############################################################################
# Note that this is the build platform OS version! # Note that this is the build platform OS version!
OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
AC_SUBST(OS_VERSION_MAJOR) AC_SUBST(OS_VERSION_MAJOR)
AC_SUBST(OS_VERSION_MINOR) AC_SUBST(OS_VERSION_MINOR)
AC_SUBST(OS_VERSION_MICRO) AC_SUBST(OS_VERSION_MICRO)
]) ])
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
@ -441,68 +440,68 @@ AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[ [
############################################################################### ###############################################################################
# #
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
# (The JVM can use 32 or 64 bit Java pointers but that decision # (The JVM can use 32 or 64 bit Java pointers but that decision
# is made at runtime.) # is made at runtime.)
# #
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Always specify -m flags on Solaris # Always specify -m flags on Solaris
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
elif test "x$COMPILE_TYPE" = xreduced; then
if test "x$OPENJDK_TARGET_OS" != xwindows; then
# Specify -m if running reduced on other Posix platforms
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
elif test "x$COMPILE_TYPE" = xreduced; then
if test "x$OPENJDK_TARGET_OS" != xwindows; then
# Specify -m if running reduced on other Posix platforms
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
fi
fi fi
fi
# Make compilation sanity check # Make compilation sanity check
AC_CHECK_HEADERS([stdio.h], , [ AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.]) AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
if test "x$COMPILE_TYPE" = xreduced; then if test "x$COMPILE_TYPE" = xreduced; then
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.]) AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
elif test "x$COMPILE_TYPE" = xcross; then elif test "x$COMPILE_TYPE" = xcross; then
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.]) AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
AC_MSG_ERROR([Cannot continue.])
])
AC_CHECK_SIZEOF([int *], [1111])
if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
# Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
SIZEOF_INT_P="$ac_cv_sizeof_int_p"
fi fi
AC_MSG_ERROR([Cannot continue.])
])
AC_CHECK_SIZEOF([int *], [1111]) if test "x$SIZEOF_INT_P" = x; then
if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
# Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
SIZEOF_INT_P="$ac_cv_sizeof_int_p"
fi
if test "x$SIZEOF_INT_P" = x; then
# The test failed, lets stick to the assumed value. # The test failed, lets stick to the assumed value.
AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.]) AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.])
else else
TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P` TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)]) AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
fi fi
fi fi
AC_MSG_CHECKING([for target address size]) AC_MSG_CHECKING([for target address size])
AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits]) AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
]) ])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
[ [
############################################################################### ###############################################################################
# #
# Is the target little of big endian? # Is the target little of big endian?
# #
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"]) AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
if test "x$ENDIAN" = xuniversal_endianness; then if test "x$ENDIAN" = xuniversal_endianness; then
AC_MSG_ERROR([Building with both big and little endianness is not supported]) AC_MSG_ERROR([Building with both big and little endianness is not supported])
fi fi
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)]) AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
fi fi
]) ])

View File

@ -25,55 +25,54 @@
AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
[ [
# Where are the sources. Any of these can be overridden
# Where are the sources. Any of these can be overridden # using --with-override-corba and the likes.
# using --with-override-corba and the likes. LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" CORBA_TOPDIR="$SRC_ROOT/corba"
CORBA_TOPDIR="$SRC_ROOT/corba" JAXP_TOPDIR="$SRC_ROOT/jaxp"
JAXP_TOPDIR="$SRC_ROOT/jaxp" JAXWS_TOPDIR="$SRC_ROOT/jaxws"
JAXWS_TOPDIR="$SRC_ROOT/jaxws" HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" NASHORN_TOPDIR="$SRC_ROOT/nashorn"
NASHORN_TOPDIR="$SRC_ROOT/nashorn" JDK_TOPDIR="$SRC_ROOT/jdk"
JDK_TOPDIR="$SRC_ROOT/jdk" AC_SUBST(LANGTOOLS_TOPDIR)
AC_SUBST(LANGTOOLS_TOPDIR) AC_SUBST(CORBA_TOPDIR)
AC_SUBST(CORBA_TOPDIR) AC_SUBST(JAXP_TOPDIR)
AC_SUBST(JAXP_TOPDIR) AC_SUBST(JAXWS_TOPDIR)
AC_SUBST(JAXWS_TOPDIR) AC_SUBST(HOTSPOT_TOPDIR)
AC_SUBST(HOTSPOT_TOPDIR) AC_SUBST(NASHORN_TOPDIR)
AC_SUBST(NASHORN_TOPDIR) AC_SUBST(JDK_TOPDIR)
AC_SUBST(JDK_TOPDIR)
]) ])
AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
[ [
############################################################################### ###############################################################################
# #
# Pickup additional source for a component from outside of the source root # Pickup additional source for a component from outside of the source root
# or override source for a component. # or override source for a component.
# #
AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root], AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
[for each and every source directory, look in this additional source root for [for each and every source directory, look in this additional source root for
the same directory; if it exists and have files in it, include it in the build])]) the same directory; if it exists and have files in it, include it in the build])])
AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
[for each and every source directory, look in this override source root for
the same directory; if it exists, use that directory instead and
ignore the directory in the original source root])])
AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides], AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
[use the subdirs 'adds' and 'overrides' in the specified directory as [for each and every source directory, look in this override source root for
add-source-root and override-source-root])]) the same directory; if it exists, use that directory instead and
ignore the directory in the original source root])])
if test "x$with_adds_and_overrides" != x; then AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
[use the subdirs 'adds' and 'overrides' in the specified directory as
add-source-root and override-source-root])])
if test "x$with_adds_and_overrides" != x; then
with_add_source_root="$with_adds_and_overrides/adds" with_add_source_root="$with_adds_and_overrides/adds"
with_override_source_root="$with_adds_and_overrides/overrides" with_override_source_root="$with_adds_and_overrides/overrides"
fi fi
if test "x$with_add_source_root" != x; then if test "x$with_add_source_root" != x; then
if ! test -d $with_add_source_root; then if ! test -d $with_add_source_root; then
AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root]) AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
fi fi
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_add_source_root" cd "$with_add_source_root"
@ -82,219 +81,218 @@ if test "x$with_add_source_root" != x; then
# Verify that the addon source root does not have any root makefiles. # Verify that the addon source root does not have any root makefiles.
# If it does, then it is usually an error, prevent this. # If it does, then it is usually an error, prevent this.
if test -f $with_add_source_root/langtools/makefiles/Makefile || \ if test -f $with_add_source_root/langtools/makefiles/Makefile || \
test -f $with_add_source_root/langtools/make/Makefile; then test -f $with_add_source_root/langtools/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
fi fi
if test -f $with_add_source_root/corba/makefiles/Makefile || \ if test -f $with_add_source_root/corba/makefiles/Makefile || \
test -f $with_add_source_root/corba/make/Makefile; then test -f $with_add_source_root/corba/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
fi fi
if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
test -f $with_add_source_root/jaxp/make/Makefile; then test -f $with_add_source_root/jaxp/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
fi fi
if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
test -f $with_add_source_root/jaxws/make/Makefile; then test -f $with_add_source_root/jaxws/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
fi fi
if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
test -f $with_add_source_root/hotspot/make/Makefile; then test -f $with_add_source_root/hotspot/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
fi fi
if test -f $with_add_source_root/nashorn/makefiles/Makefile || \ if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
test -f $with_add_source_root/nashorn/make/Makefile; then test -f $with_add_source_root/nashorn/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.])
fi fi
if test -f $with_add_source_root/jdk/makefiles/Makefile || \ if test -f $with_add_source_root/jdk/makefiles/Makefile || \
test -f $with_add_source_root/jdk/make/Makefile; then test -f $with_add_source_root/jdk/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
fi fi
fi fi
AC_SUBST(ADD_SRC_ROOT) AC_SUBST(ADD_SRC_ROOT)
if test "x$with_override_source_root" != x; then if test "x$with_override_source_root" != x; then
if ! test -d $with_override_source_root; then if ! test -d $with_override_source_root; then
AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root]) AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
fi fi
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_source_root" cd "$with_override_source_root"
OVERRIDE_SRC_ROOT="`pwd`" OVERRIDE_SRC_ROOT="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if test -f $with_override_source_root/langtools/makefiles/Makefile || \ if test -f $with_override_source_root/langtools/makefiles/Makefile || \
test -f $with_override_source_root/langtools/make/Makefile; then test -f $with_override_source_root/langtools/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
fi fi
if test -f $with_override_source_root/corba/makefiles/Makefile || \ if test -f $with_override_source_root/corba/makefiles/Makefile || \
test -f $with_override_source_root/corba/make/Makefile; then test -f $with_override_source_root/corba/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
fi fi
if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
test -f $with_override_source_root/jaxp/make/Makefile; then test -f $with_override_source_root/jaxp/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
fi fi
if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
test -f $with_override_source_root/jaxws/make/Makefile; then test -f $with_override_source_root/jaxws/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
fi fi
if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
test -f $with_override_source_root/hotspot/make/Makefile; then test -f $with_override_source_root/hotspot/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
fi fi
if test -f $with_override_source_root/nashorn/makefiles/Makefile || \ if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
test -f $with_override_source_root/nashorn/make/Makefile; then test -f $with_override_source_root/nashorn/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.])
fi fi
if test -f $with_override_source_root/jdk/makefiles/Makefile || \ if test -f $with_override_source_root/jdk/makefiles/Makefile || \
test -f $with_override_source_root/jdk/make/Makefile; then test -f $with_override_source_root/jdk/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
fi fi
fi fi
AC_SUBST(OVERRIDE_SRC_ROOT) AC_SUBST(OVERRIDE_SRC_ROOT)
############################################################################### ###############################################################################
# #
# Override a repo completely, this is used for example when you have 3 small # Override a repo completely, this is used for example when you have 3 small
# development sandboxes of the langtools sources and want to avoid having 3 full # development sandboxes of the langtools sources and want to avoid having 3 full
# OpenJDK sources checked out on disk. # OpenJDK sources checked out on disk.
# #
# Assuming that the 3 langtools sandboxes are located here: # Assuming that the 3 langtools sandboxes are located here:
# /home/fredrik/sandbox1/langtools # /home/fredrik/sandbox1/langtools
# /home/fredrik/sandbox2/langtools # /home/fredrik/sandbox2/langtools
# /home/fredrik/sandbox3/langtools # /home/fredrik/sandbox3/langtools
# #
# From the source root you create build subdirs manually: # From the source root you create build subdirs manually:
# mkdir -p build1 build2 build3 # mkdir -p build1 build2 build3
# in each build directory run: # in each build directory run:
# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
# #
AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools], AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
[use this langtools dir for the build])]) [use this langtools dir for the build])])
AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba], AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
[use this corba dir for the build])]) [use this corba dir for the build])])
AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp], AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
[use this jaxp dir for the build])]) [use this jaxp dir for the build])])
AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws], AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
[use this jaxws dir for the build])]) [use this jaxws dir for the build])])
AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot], AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
[use this hotspot dir for the build])]) [use this hotspot dir for the build])])
AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn], AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
[use this nashorn dir for the build])]) [use this nashorn dir for the build])])
AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk], AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
[use this jdk dir for the build])]) [use this jdk dir for the build])])
if test "x$with_override_langtools" != x; then if test "x$with_override_langtools" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_langtools" cd "$with_override_langtools"
LANGTOOLS_TOPDIR="`pwd`" LANGTOOLS_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override langtools with a full langtools repo!]) AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
fi fi
AC_MSG_CHECKING([if langtools should be overridden]) AC_MSG_CHECKING([if langtools should be overridden])
AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR]) AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
fi fi
if test "x$with_override_corba" != x; then if test "x$with_override_corba" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_corba" cd "$with_override_corba"
CORBA_TOPDIR="`pwd`" CORBA_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override corba with a full corba repo!]) AC_MSG_ERROR([You have to override corba with a full corba repo!])
fi fi
AC_MSG_CHECKING([if corba should be overridden]) AC_MSG_CHECKING([if corba should be overridden])
AC_MSG_RESULT([yes with $CORBA_TOPDIR]) AC_MSG_RESULT([yes with $CORBA_TOPDIR])
fi fi
if test "x$with_override_jaxp" != x; then if test "x$with_override_jaxp" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_jaxp" cd "$with_override_jaxp"
JAXP_TOPDIR="`pwd`" JAXP_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!]) AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
fi fi
AC_MSG_CHECKING([if jaxp should be overridden]) AC_MSG_CHECKING([if jaxp should be overridden])
AC_MSG_RESULT([yes with $JAXP_TOPDIR]) AC_MSG_RESULT([yes with $JAXP_TOPDIR])
fi fi
if test "x$with_override_jaxws" != x; then if test "x$with_override_jaxws" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_jaxws" cd "$with_override_jaxws"
JAXWS_TOPDIR="`pwd`" JAXWS_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!]) AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
fi fi
AC_MSG_CHECKING([if jaxws should be overridden]) AC_MSG_CHECKING([if jaxws should be overridden])
AC_MSG_RESULT([yes with $JAXWS_TOPDIR]) AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
fi fi
if test "x$with_override_hotspot" != x; then if test "x$with_override_hotspot" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_hotspot" cd "$with_override_hotspot"
HOTSPOT_TOPDIR="`pwd`" HOTSPOT_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!]) AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
fi fi
AC_MSG_CHECKING([if hotspot should be overridden]) AC_MSG_CHECKING([if hotspot should be overridden])
AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR]) AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
fi fi
if test "x$with_override_nashorn" != x; then if test "x$with_override_nashorn" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_nashorn" cd "$with_override_nashorn"
NASHORN_TOPDIR="`pwd`" NASHORN_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!]) AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
fi fi
AC_MSG_CHECKING([if nashorn should be overridden]) AC_MSG_CHECKING([if nashorn should be overridden])
AC_MSG_RESULT([yes with $NASHORN_TOPDIR]) AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
fi fi
if test "x$with_override_jdk" != x; then if test "x$with_override_jdk" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_jdk" cd "$with_override_jdk"
JDK_TOPDIR="`pwd`" JDK_TOPDIR="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! test -f $JDK_TOPDIR/makefiles/Makefile; then if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
AC_MSG_ERROR([You have to override JDK with a full JDK repo!]) AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
fi fi
AC_MSG_CHECKING([if JDK should be overridden]) AC_MSG_CHECKING([if JDK should be overridden])
AC_MSG_RESULT([yes with $JDK_TOPDIR]) AC_MSG_RESULT([yes with $JDK_TOPDIR])
fi fi
]) ])
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
[ [
BUILD_OUTPUT="$OUTPUT_ROOT" BUILD_OUTPUT="$OUTPUT_ROOT"
AC_SUBST(BUILD_OUTPUT) AC_SUBST(BUILD_OUTPUT)
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
BUILD_HOTSPOT=true BUILD_HOTSPOT=true
AC_SUBST(HOTSPOT_DIST) AC_SUBST(HOTSPOT_DIST)
AC_SUBST(BUILD_HOTSPOT) AC_SUBST(BUILD_HOTSPOT)
AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot], AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot],
[import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])]) [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])])
if test "x$with_import_hotspot" != x; then if test "x$with_import_hotspot" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_import_hotspot" cd "$with_import_hotspot"
HOTSPOT_DIST="`pwd`" HOTSPOT_DIST="`pwd`"
cd "$CURDIR" cd "$CURDIR"
if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!]) AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!])
fi fi
AC_MSG_CHECKING([if hotspot should be imported]) AC_MSG_CHECKING([if hotspot should be imported])
AC_MSG_RESULT([yes from $HOTSPOT_DIST]) AC_MSG_RESULT([yes from $HOTSPOT_DIST])
BUILD_HOTSPOT=false BUILD_HOTSPOT=false
fi fi
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
]) ])

View File

@ -30,8 +30,8 @@
# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf) # (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
# using 'configure @CONFIGURE_COMMAND_LINE@' # using 'configure @CONFIGURE_COMMAND_LINE@'
# When calling macros, the spaces between arguments are # When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst # often semantically important! Sometimes we need to subst
# spaces and commas, therefore we need the following macros. # spaces and commas, therefore we need the following macros.
X:= X:=
SPACE:=$(X) $(X) SPACE:=$(X) $(X)
@ -56,17 +56,17 @@ MAKE:=@MAKE@
# Pass along the verbosity and log level settings. # Pass along the verbosity and log level settings.
ifeq (,$(findstring VERBOSE=,$(MAKE))) ifeq (,$(findstring VERBOSE=,$(MAKE)))
MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)" MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
endif endif
# No implicit variables or rules! # No implicit variables or rules!
ifeq (,$(findstring -R,$(MAKE))) ifeq (,$(findstring -R,$(MAKE)))
MAKE:=$(MAKE) -R MAKE:=$(MAKE) -R
endif endif
# Specify where the common include directory for makefiles is. # Specify where the common include directory for makefiles is.
ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE))) ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
endif endif
# The "human readable" name of this configuration # The "human readable" name of this configuration
@ -175,7 +175,7 @@ else
RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
endif endif
ifneq ($(USER_RELEASE_SUFFIX),) ifneq ($(USER_RELEASE_SUFFIX), )
FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER) FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
else else
FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER) FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
@ -287,7 +287,7 @@ CACERTS_FILE=@CACERTS_FILE@
# Enable unlimited crypto policy # Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@ UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
# Necessary additional compiler flags to compile X11 # Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@ X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@ X_LIBS:=@X_LIBS@
OPENWIN_HOME:=@OPENWIN_HOME@ OPENWIN_HOME:=@OPENWIN_HOME@
@ -388,7 +388,7 @@ LIPO:=@LIPO@
# Command to create a shared library # Command to create a shared library
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
# Options to linker to specify a mapfile. # Options to linker to specify a mapfile.
# (Note absence of := assignment, because we do not want to evaluate the macro body here) # (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@ SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
@ -461,7 +461,7 @@ NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
# Guarding this against resetting value. Legacy make files include spec multiple # Guarding this against resetting value. Legacy make files include spec multiple
# times. # times.
ifndef RC_FLAGS ifndef RC_FLAGS
RC_FLAGS:=@RC_FLAGS@ RC_FLAGS:=@RC_FLAGS@
endif endif
# A specific java binary with specific options can be used to run # A specific java binary with specific options can be used to run
@ -541,9 +541,9 @@ BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
# we have solved how to prevent the log wrapper to wait # we have solved how to prevent the log wrapper to wait
# for the background sjavac server process. # for the background sjavac server process.
ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi) ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
BUILD_LOG_WRAPPER:= BUILD_LOG_WRAPPER:=
else else
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@ BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
endif endif
# Build setup # Build setup
@ -563,12 +563,12 @@ MSVCR_DLL:=@MSVCR_DLL@
# of the next macro to get rid of superfluous files. # of the next macro to get rid of superfluous files.
ADD_SRCS=$1 ADD_SRCS=$1
ifneq (,$(ADD_SRC_ROOT)) ifneq (,$(ADD_SRC_ROOT))
# Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1)) ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
endif endif
ifneq (,$(OVERRIDE_SRC_ROOT)) ifneq (,$(OVERRIDE_SRC_ROOT))
# Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1)) ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
endif endif
# OVR_SRCS creates a filter expression to filter out sources in # OVR_SRCS creates a filter expression to filter out sources in
@ -578,9 +578,9 @@ endif
# We cannot do the scan in configure, since that would force us to rerun configure when # We cannot do the scan in configure, since that would force us to rerun configure when
# we add overridden sources. # we add overridden sources.
ifneq (,$(OVERRIDE_SRC_ROOT)) ifneq (,$(OVERRIDE_SRC_ROOT))
OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f))))) OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
else else
OVR_SRCS:= OVR_SRCS:=
endif endif
#################################################### ####################################################
@ -589,7 +589,7 @@ endif
# #
# Common prefix for all installed files. Defaults to /usr/local, # Common prefix for all installed files. Defaults to /usr/local,
# but /opt/myjdk is another common version. # but /opt/myjdk is another common version.
INSTALL_PREFIX=@prefix@ INSTALL_PREFIX=@prefix@
# Directories containing architecture-dependent files should be relative to exec_prefix # Directories containing architecture-dependent files should be relative to exec_prefix
@ -619,7 +619,7 @@ INSTALL_INCLUDEDIR=@libdir@
# Executables that other programs run. # Executables that other programs run.
INSTALL_LIBEXECDIR=@libexecdir@ INSTALL_LIBEXECDIR=@libexecdir@
# Locale-dependent but architecture-independent data, such as message catalogs. # Locale-dependent but architecture-independent data, such as message catalogs.
INSTALL_LOCALEDIR=@localedir@ INSTALL_LOCALEDIR=@localedir@
# Modifiable single-machine data # Modifiable single-machine data

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
VCVARSFILE="vc/bin/vcvars32.bat" VCVARSFILE="vc/bin/vcvars32.bat"
else else
VCVARSFILE="vc/bin/amd64/vcvars64.bat" VCVARSFILE="vc/bin/amd64/vcvars64.bat"
fi fi
VS_ENV_CMD="" VS_ENV_CMD=""
VS_ENV_ARGS="" VS_ENV_ARGS=""
@ -89,7 +89,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation]) AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation]) AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation]) AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
fi fi
if test "x$VS100COMNTOOLS" != x; then if test "x$VS100COMNTOOLS" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable]) TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
@ -118,7 +118,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
# the set env variables into the spec file. # the set env variables into the spec file.
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
[ [
# Store path to cygwin link.exe to help excluding it when searching for # Store path to cygwin link.exe to help excluding it when searching for
# VS linker. This must be done before changing the PATH when looking for VS. # VS linker. This must be done before changing the PATH when looking for VS.
AC_PATH_PROG(CYGWIN_LINK, link) AC_PATH_PROG(CYGWIN_LINK, link)
if test "x$CYGWIN_LINK" != x; then if test "x$CYGWIN_LINK" != x; then
@ -187,7 +187,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
# Now set all paths and other env variables. This will allow the rest of # Now set all paths and other env variables. This will allow the rest of
# the configure script to find and run the compiler in the proper way. # the configure script to find and run the compiler in the proper way.
AC_MSG_NOTICE([Setting extracted environment variables]) AC_MSG_NOTICE([Setting extracted environment variables])
. $OUTPUT_ROOT/localdevenv.sh . $OUTPUT_ROOT/localdevenv.sh
@ -198,7 +198,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# At this point, we should have corrent variables in the environment, or we can't continue. # At this point, we should have corrent variables in the environment, or we can't continue.
AC_MSG_CHECKING([for Visual Studio variables]) AC_MSG_CHECKING([for Visual Studio variables])
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
if test "x$INCLUDE" = x || test "x$LIB" = x; then if test "x$INCLUDE" = x || test "x$LIB" = x; then
AC_MSG_RESULT([present but broken]) AC_MSG_RESULT([present but broken])
@ -228,7 +228,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.]) AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
AC_MSG_CHECKING([for msvcr100.dll]) AC_MSG_CHECKING([for msvcr100.dll])
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll], AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])]) [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])

View File

@ -36,7 +36,7 @@ include MakeBase.gmk
default: all default: all
# Get all files except .hg in the hotspot directory. # Get all files except .hg in the hotspot directory.
HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print) HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
# The old build creates hotspot output dir before calling hotspot and # The old build creates hotspot output dir before calling hotspot and
# not doing it breaks builds on msys. # not doing it breaks builds on msys.

View File

@ -23,52 +23,52 @@
# questions. # questions.
# #
PREFIXES=-pkgPrefix CORBA org.omg \ PREFIXES=-pkgPrefix CORBA org.omg \
-pkgPrefix CosNaming org.omg \ -pkgPrefix CosNaming org.omg \
-pkgPrefix CosTransactions org.omg \ -pkgPrefix CosTransactions org.omg \
-pkgPrefix CosTSInteroperation org.omg \ -pkgPrefix CosTSInteroperation org.omg \
-pkgPrefix DynamicAny org.omg \ -pkgPrefix DynamicAny org.omg \
-pkgPrefix Dynamic org.omg \ -pkgPrefix Dynamic org.omg \
-pkgPrefix IOP org.omg \ -pkgPrefix IOP org.omg \
-pkgPrefix Messaging org.omg \ -pkgPrefix Messaging org.omg \
-pkgPrefix PortableInterceptor org.omg \ -pkgPrefix PortableInterceptor org.omg \
-pkgPrefix PortableServer org.omg \ -pkgPrefix PortableServer org.omg \
-pkgPrefix activation com.sun.corba.se.spi \ -pkgPrefix activation com.sun.corba.se.spi \
-pkgPrefix GIOP com.sun.corba.se \ -pkgPrefix GIOP com.sun.corba.se \
-pkgPrefix PortableActivationIDL com.sun.corba.se \ -pkgPrefix PortableActivationIDL com.sun.corba.se \
-pkgPrefix messages com.sun.corba.se -pkgPrefix messages com.sun.corba.se
define add_idl_package define add_idl_package
# param 1 = MYPACKAGE # param 1 = MYPACKAGE
# param 2 = src root # param 2 = src root
# param 3 = gensrc root # param 3 = gensrc root
# param 4 = source idl to compile # param 4 = source idl to compile
# param 5 = target idl package # param 5 = target idl package
# param 6 = delete these files that were output from the idlj # param 6 = delete these files that were output from the idlj
# param 7 = idls that match these patterns should be compiled with -oldImplBase # param 7 = idls that match these patterns should be compiled with -oldImplBase
# param 8 = the idlj command # param 8 = the idlj command
# Save the generated java files to a temporary directory so # Save the generated java files to a temporary directory so
# that we can find them and create proper dependencies. # that we can find them and create proper dependencies.
# After that, we move them to the real gensrc target dir. # After that, we move them to the real gensrc target dir.
$4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___ $4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
ifneq ($$(filter $7,$4),) ifneq ($$(filter $7,$4),)
$4_OLDIMPLBASE:=-oldImplBase $4_OLDIMPLBASE:=-oldImplBase
$4_OLDIMPLBASE_MSG:=with -oldImplBase $4_OLDIMPLBASE_MSG:=with -oldImplBase
endif endif
$5 : $4 $5 : $4
$(MKDIR) -p $3/$$($4_TMPDIR) $(MKDIR) -p $3/$$($4_TMPDIR)
$(RM) -rf $3/$$($4_TMPDIR) $(RM) -rf $3/$$($4_TMPDIR)
$(MKDIR) -p $(dir $5) $(MKDIR) -p $(dir $5)
$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4) $(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
$8 -td $3/$$($4_TMPDIR) \ $8 -td $3/$$($4_TMPDIR) \
-i $2/org/omg/CORBA \ -i $2/org/omg/CORBA \
-i $2/org/omg/PortableInterceptor \ -i $2/org/omg/PortableInterceptor \
-i $2/org/omg/PortableServer \ -i $2/org/omg/PortableServer \
-D CORBA3 -corba 3.0 \ -D CORBA3 -corba 3.0 \
-fall \ -fall \
$$($4_OLDIMPLBASE) \ $$($4_OLDIMPLBASE) \
$(PREFIXES) \ $(PREFIXES) \
$4 $4
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6) $(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
$(CP) -r $3/$$($4_TMPDIR)/* $3 $(CP) -r $3/$$($4_TMPDIR)/* $3
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5) ($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
@ -76,31 +76,31 @@ define add_idl_package
endef endef
define SetupIdlCompilation define SetupIdlCompilation
# param 1 is for example BUILD_IDLS # param 1 is for example BUILD_IDLS
# param 2,3,4,5,6,7,8 are named args. # param 2,3,4,5,6,7,8 are named args.
# IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES # IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(call LogSetupMacroEntry,SetupIdlCompilation($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 SetupIdlCompilation, please update IdlCompilation.gmk)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
# Find all existing java files and existing class files. # Find all existing java files and existing class files.
$$(eval $$(call MakeDir,$$($1_BIN))) $$(eval $$(call MakeDir,$$($1_BIN)))
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl") $1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
$1_BINS := $$(shell find $$($1_BIN) -name "*.java") $1_BINS := $$(shell find $$($1_BIN) -name "*.java")
# Prepend the source/bin path to the filter expressions. # Prepend the source/bin path to the filter expressions.
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES)) $1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES)) $1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES)) $1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES)) $1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES)) $1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
# Now remove unwanted java/class files. # Now remove unwanted java/class files.
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS)) $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS)) $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS)) $1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS)) $1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS))) $1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
# Now create the dependencies for each idl target. # Now create the dependencies for each idl target.
$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ)))) $$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
endef endef
.SUFFIXES: .java .class .package .SUFFIXES: .java .class .package

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
# This file is included by the root NewerMakefile and contains targets # This file is included by the root NewerMakefile and contains targets
# and utilities needed by JPRT. # and utilities needed by JPRT.
# Utilities used in this Makefile. Most of this makefile executes without # Utilities used in this Makefile. Most of this makefile executes without
@ -36,7 +36,7 @@ MKDIR=mkdir
PRINTF=printf PRINTF=printf
PWD=pwd PWD=pwd
# Insure we have a path that looks like it came from pwd # Insure we have a path that looks like it came from pwd
# (This is mostly for Windows sake and drive letters) # (This is mostly for Windows sake and drive letters)
define UnixPath # path define UnixPath # path
$(shell (cd "$1" && $(PWD))) $(shell (cd "$1" && $(PWD)))
endef endef
@ -47,19 +47,19 @@ ifdef OPENJDK
OPEN_BUILD=true OPEN_BUILD=true
else else
OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \ OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
$(wildcard $(root_dir)/jdk/make/closed), \ $(wildcard $(root_dir)/jdk/make/closed), \
$(wildcard $(root_dir)/jdk/test/closed), \ $(wildcard $(root_dir)/jdk/test/closed), \
$(wildcard $(root_dir)/hotspot/src/closed), \ $(wildcard $(root_dir)/hotspot/src/closed), \
$(wildcard $(root_dir)/hotspot/make/closed), \ $(wildcard $(root_dir)/hotspot/make/closed), \
$(wildcard $(root_dir)/hotspot/test/closed)), \ $(wildcard $(root_dir)/hotspot/test/closed)), \
false,true) false,true)
endif endif
HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false) HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
########################################################################### ###########################################################################
# To help in adoption of the new configure&&make build process, a bridge # To help in adoption of the new configure&&make build process, a bridge
# build will use the old settings to run configure and do the build. # build will use the old settings to run configure and do the build.
# Build with the configure bridge. After running configure, restart make # Build with the configure bridge. After running configure, restart make
# to parse the new spec file. # to parse the new spec file.
@ -85,80 +85,80 @@ $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
$(RM) $@.tmp $(RM) $@.tmp
$(MKDIR) -p $(BUILD_DIR_ROOT) $(MKDIR) -p $(BUILD_DIR_ROOT)
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp @$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
ifdef ARCH_DATA_MODEL ifdef ARCH_DATA_MODEL
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
endif endif
ifeq ($(ARCH_DATA_MODEL),32) ifeq ($(ARCH_DATA_MODEL),32)
@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp @$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
endif endif
ifdef ALT_PARALLEL_COMPILE_JOBS ifdef ALT_PARALLEL_COMPILE_JOBS
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
endif endif
ifdef ALT_BOOTDIR ifdef ALT_BOOTDIR
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
endif endif
ifdef ALT_CUPS_HEADERS_PATH ifdef ALT_CUPS_HEADERS_PATH
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
endif endif
ifdef ALT_FREETYPE_HEADERS_PATH ifdef ALT_FREETYPE_HEADERS_PATH
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
endif endif
ifdef ENABLE_SJAVAC ifdef ENABLE_SJAVAC
@$(ECHO) " --enable-sjavac" >> $@.tmp @$(ECHO) " --enable-sjavac" >> $@.tmp
endif endif
ifeq ($(HOTSPOT_AVAILABLE),false) ifeq ($(HOTSPOT_AVAILABLE),false)
ifdef ALT_JDK_IMPORT_PATH ifdef ALT_JDK_IMPORT_PATH
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp @$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
endif endif
endif endif
ifeq ($(OPEN_BUILD),true) ifeq ($(OPEN_BUILD),true)
@$(ECHO) " --enable-openjdk-only " >> $@.tmp @$(ECHO) " --enable-openjdk-only " >> $@.tmp
else else
# Todo: move to closed? # Todo: move to closed?
ifdef ALT_MOZILLA_HEADERS_PATH ifdef ALT_MOZILLA_HEADERS_PATH
@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp @$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
endif endif
ifdef ALT_JUNIT_DIR ifdef ALT_JUNIT_DIR
@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp @$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
endif endif
ifdef ANT_HOME ifdef ANT_HOME
@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp @$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
endif endif
ifdef ALT_JAVAFX_ZIP_DIR ifdef ALT_JAVAFX_ZIP_DIR
@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp @$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
endif endif
ifdef ALT_JMC_ZIP_DIR ifdef ALT_JMC_ZIP_DIR
@$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp @$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp
endif endif
ifdef ALT_WIXDIR ifdef ALT_WIXDIR
@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp @$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
endif endif
ifdef ALT_INSTALL_LZMA_PATH ifdef ALT_INSTALL_LZMA_PATH
@$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp @$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp
endif endif
ifdef ALT_INSTALL_UPX_PATH ifdef ALT_INSTALL_UPX_PATH
@$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp @$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp
endif endif
ifdef ALT_INSTALL_UPX_FILENAME ifdef ALT_INSTALL_UPX_FILENAME
@$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp @$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp
endif endif
ifdef ALT_CCSS_SIGNING_DIR ifdef ALT_CCSS_SIGNING_DIR
@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp @$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
endif endif
ifdef ALT_SLASH_JAVA ifdef ALT_SLASH_JAVA
@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp @$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
endif endif
ifdef ALT_SPARKLE_FRAMEWORK_DIR ifdef ALT_SPARKLE_FRAMEWORK_DIR
@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp @$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
endif endif
endif endif
@if [ -f $@ ] ; then \ @if [ -f $@ ] ; then \
if ! $(CMP) $@ $@.tmp > /dev/null ; then \ if ! $(CMP) $@ $@.tmp > /dev/null ; then \
$(CP) $@.tmp $@ ; \ $(CP) $@.tmp $@ ; \
fi ; \ fi ; \
else \ else \
$(CP) $@.tmp $@ ; \ $(CP) $@.tmp $@ ; \
fi fi
$(RM) $@.tmp $(RM) $@.tmp
PHONY_LIST += bridge2configure bridgeBuild PHONY_LIST += bridge2configure bridgeBuild
@ -170,7 +170,7 @@ ifndef JPRT_ARCHIVE_BUNDLE
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
endif endif
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
endif endif
# These targets execute in a SPEC free context, before calling bridgeBuild # These targets execute in a SPEC free context, before calling bridgeBuild
@ -212,9 +212,9 @@ bundles-only: start-make
$(MKDIR) -p $(BUILD_OUTPUT)/bundles $(MKDIR) -p $(BUILD_OUTPUT)/bundles
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
fi fi
@$(call TargetExit) @$(call TargetExit)
# Copy images to one unified location regardless of platform etc. # Copy images to one unified location regardless of platform etc.
@ -226,19 +226,19 @@ final-images-only: start-make
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
ifeq ($(OPENJDK_TARGET_OS),macosx) ifeq ($(OPENJDK_TARGET_OS),macosx)
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
endif endif
@$(call TargetExit) @$(call TargetExit)
# Keep track of phony targets # Keep track of phony targets
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
jprt_build_generic bundles jprt_bundle \ jprt_build_generic bundles jprt_bundle \
final-images final-images-only final-images final-images-only
########################################################################### ###########################################################################
# Phony targets # Phony targets

View File

@ -28,7 +28,7 @@
# Now load the spec # Now load the spec
include $(SPEC) include $(SPEC)
# Load the vital tools for all the makefiles. # Load the vital tools for all the makefiles.
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
# Include the corresponding custom file, if present. # Include the corresponding custom file, if present.
@ -38,19 +38,19 @@ include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
# Remove any build.log from a previous run, if they exist # Remove any build.log from a previous run, if they exist
ifneq (,$(BUILD_LOG)) ifneq (,$(BUILD_LOG))
ifneq (,$(BUILD_LOG_PREVIOUS)) ifneq (,$(BUILD_LOG_PREVIOUS))
# Rotate old log # Rotate old log
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null) $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null) $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
else else
$(shell $(RM) $(BUILD_LOG) 2> /dev/null) $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
endif endif
$(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null) $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
endif endif
# Remove any javac server logs and port files. This # Remove any javac server logs and port files. This
# prevents a new make run to reuse the previous servers. # prevents a new make run to reuse the previous servers.
ifneq (,$(SJAVAC_SERVER_DIR)) ifneq (,$(SJAVAC_SERVER_DIR))
$(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*) $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
endif endif
# Reset the build timers. # Reset the build timers.
@ -103,8 +103,8 @@ jaxws-only: start-make
@$(call TargetExit) @$(call TargetExit)
ifeq ($(BUILD_HOTSPOT),true) ifeq ($(BUILD_HOTSPOT),true)
hotspot: hotspot-only hotspot: hotspot-only
hotspot-only: start-make hotspot-only: start-make
@$(call TargetEnter) @$(call TargetEnter)
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk) @($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
@$(call TargetExit) @$(call TargetExit)
@ -149,9 +149,9 @@ profiles-only: start-make
@$(call TargetExit) @$(call TargetExit)
profiles-oscheck: profiles-oscheck:
ifneq ($(OPENJDK_TARGET_OS), linux) ifneq ($(OPENJDK_TARGET_OS), linux)
@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1 @echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
endif endif
install: images install-only install: images install-only
install-only: start-make install-only: start-make
@ -202,12 +202,12 @@ clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jd
dist-clean: clean dist-clean: clean
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers) @($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \ @$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \ if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\ $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
else \ else \
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \ ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
fi \ fi \
) )
@$(ECHO) Cleaned everything, you will have to re-run configure. @$(ECHO) Cleaned everything, you will have to re-run configure.
clean-langtools: clean-langtools:

View File

@ -48,314 +48,314 @@ $(subst $(SPACE),\n,$(strip $1)))))\
$(compress_post) $(compress_post)
decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \ decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \ -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
-e 's|X00|X|g' | tr '\n' '$2' -e 's|X00|X|g' | tr '\n' '$2'
define ListPathsSafely_If define ListPathsSafely_If
$(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1))))) $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
endef endef
define ListPathsSafely_Printf define ListPathsSafely_Printf
$(if $(strip $($1_LPS$4)),printf -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3) $(if $(strip $($1_LPS$4)),printf -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3)
endef endef
# Receipt example: # Receipt example:
# rm -f thepaths # rm -f thepaths
# $(call ListPathsSafely,THEPATHS,\n, >> thepaths) # $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
# The \n argument means translate spaces into \n # The \n argument means translate spaces into \n
# if instead , , (a space) is supplied, then spaces remain spaces. # if instead , , (a space) is supplied, then spaces remain spaces.
define ListPathsSafely define ListPathsSafely
$(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!)) $(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
$(call ListPathsSafely_If,$1,$2,1,250) $(call ListPathsSafely_If,$1,$2,1,250)
$(call ListPathsSafely_If,$1,$2,251,500) $(call ListPathsSafely_If,$1,$2,251,500)
$(call ListPathsSafely_If,$1,$2,501,750) $(call ListPathsSafely_If,$1,$2,501,750)
$(call ListPathsSafely_If,$1,$2,751,1000) $(call ListPathsSafely_If,$1,$2,751,1000)
$(call ListPathsSafely_If,$1,$2,1001,1250) $(call ListPathsSafely_If,$1,$2,1001,1250)
$(call ListPathsSafely_If,$1,$2,1251,1500) $(call ListPathsSafely_If,$1,$2,1251,1500)
$(call ListPathsSafely_If,$1,$2,1501,1750) $(call ListPathsSafely_If,$1,$2,1501,1750)
$(call ListPathsSafely_If,$1,$2,1751,2000) $(call ListPathsSafely_If,$1,$2,1751,2000)
$(call ListPathsSafely_If,$1,$2,2001,2250) $(call ListPathsSafely_If,$1,$2,2001,2250)
$(call ListPathsSafely_If,$1,$2,2251,2500) $(call ListPathsSafely_If,$1,$2,2251,2500)
$(call ListPathsSafely_If,$1,$2,2501,2750) $(call ListPathsSafely_If,$1,$2,2501,2750)
$(call ListPathsSafely_If,$1,$2,2751,3000) $(call ListPathsSafely_If,$1,$2,2751,3000)
$(call ListPathsSafely_If,$1,$2,3001,3250) $(call ListPathsSafely_If,$1,$2,3001,3250)
$(call ListPathsSafely_If,$1,$2,3251,3500) $(call ListPathsSafely_If,$1,$2,3251,3500)
$(call ListPathsSafely_If,$1,$2,3501,3750) $(call ListPathsSafely_If,$1,$2,3501,3750)
$(call ListPathsSafely_If,$1,$2,3751,4000) $(call ListPathsSafely_If,$1,$2,3751,4000)
$(call ListPathsSafely_If,$1,$2,4001,4250) $(call ListPathsSafely_If,$1,$2,4001,4250)
$(call ListPathsSafely_If,$1,$2,4251,4500) $(call ListPathsSafely_If,$1,$2,4251,4500)
$(call ListPathsSafely_If,$1,$2,4501,4750) $(call ListPathsSafely_If,$1,$2,4501,4750)
$(call ListPathsSafely_If,$1,$2,4751,5000) $(call ListPathsSafely_If,$1,$2,4751,5000)
$(call ListPathsSafely_If,$1,$2,5001,5250) $(call ListPathsSafely_If,$1,$2,5001,5250)
$(call ListPathsSafely_If,$1,$2,5251,5500) $(call ListPathsSafely_If,$1,$2,5251,5500)
$(call ListPathsSafely_If,$1,$2,5501,5750) $(call ListPathsSafely_If,$1,$2,5501,5750)
$(call ListPathsSafely_If,$1,$2,5751,6000) $(call ListPathsSafely_If,$1,$2,5751,6000)
$(call ListPathsSafely_If,$1,$2,6001,6250) $(call ListPathsSafely_If,$1,$2,6001,6250)
$(call ListPathsSafely_If,$1,$2,6251,6500) $(call ListPathsSafely_If,$1,$2,6251,6500)
$(call ListPathsSafely_If,$1,$2,6501,6750) $(call ListPathsSafely_If,$1,$2,6501,6750)
$(call ListPathsSafely_If,$1,$2,6751,7000) $(call ListPathsSafely_If,$1,$2,6751,7000)
$(call ListPathsSafely_If,$1,$2,7001,7250) $(call ListPathsSafely_If,$1,$2,7001,7250)
$(call ListPathsSafely_If,$1,$2,7251,7500) $(call ListPathsSafely_If,$1,$2,7251,7500)
$(call ListPathsSafely_If,$1,$2,7501,7750) $(call ListPathsSafely_If,$1,$2,7501,7750)
$(call ListPathsSafely_If,$1,$2,7751,8000) $(call ListPathsSafely_If,$1,$2,7751,8000)
$(call ListPathsSafely_If,$1,$2,8001,8250) $(call ListPathsSafely_If,$1,$2,8001,8250)
$(call ListPathsSafely_If,$1,$2,8251,8500) $(call ListPathsSafely_If,$1,$2,8251,8500)
$(call ListPathsSafely_If,$1,$2,8501,8750) $(call ListPathsSafely_If,$1,$2,8501,8750)
$(call ListPathsSafely_If,$1,$2,8751,9000) $(call ListPathsSafely_If,$1,$2,8751,9000)
$(call ListPathsSafely_If,$1,$2,9001,9250) $(call ListPathsSafely_If,$1,$2,9001,9250)
$(call ListPathsSafely_If,$1,$2,9251,9500) $(call ListPathsSafely_If,$1,$2,9251,9500)
$(call ListPathsSafely_If,$1,$2,9501,9750) $(call ListPathsSafely_If,$1,$2,9501,9750)
$(call ListPathsSafely_If,$1,$2,9751,10000) $(call ListPathsSafely_If,$1,$2,9751,10000)
$(call ListPathsSafely_If,$1,$2,10001,10250) $(call ListPathsSafely_If,$1,$2,10001,10250)
$(call ListPathsSafely_If,$1,$2,10251,10500) $(call ListPathsSafely_If,$1,$2,10251,10500)
$(call ListPathsSafely_If,$1,$2,10501,10750) $(call ListPathsSafely_If,$1,$2,10501,10750)
$(call ListPathsSafely_If,$1,$2,10751,11000) $(call ListPathsSafely_If,$1,$2,10751,11000)
$(call ListPathsSafely_If,$1,$2,11001,11250) $(call ListPathsSafely_If,$1,$2,11001,11250)
$(call ListPathsSafely_If,$1,$2,11251,11500) $(call ListPathsSafely_If,$1,$2,11251,11500)
$(call ListPathsSafely_If,$1,$2,11501,11750) $(call ListPathsSafely_If,$1,$2,11501,11750)
$(call ListPathsSafely_If,$1,$2,11751,12000) $(call ListPathsSafely_If,$1,$2,11751,12000)
$(call ListPathsSafely_If,$1,$2,12001,12250) $(call ListPathsSafely_If,$1,$2,12001,12250)
$(call ListPathsSafely_If,$1,$2,12251,12500) $(call ListPathsSafely_If,$1,$2,12251,12500)
$(call ListPathsSafely_If,$1,$2,12501,12750) $(call ListPathsSafely_If,$1,$2,12501,12750)
$(call ListPathsSafely_If,$1,$2,12751,13000) $(call ListPathsSafely_If,$1,$2,12751,13000)
$(call ListPathsSafely_If,$1,$2,13001,13250) $(call ListPathsSafely_If,$1,$2,13001,13250)
$(call ListPathsSafely_If,$1,$2,13251,13500) $(call ListPathsSafely_If,$1,$2,13251,13500)
$(call ListPathsSafely_If,$1,$2,13501,13750) $(call ListPathsSafely_If,$1,$2,13501,13750)
$(call ListPathsSafely_If,$1,$2,13751,14000) $(call ListPathsSafely_If,$1,$2,13751,14000)
$(call ListPathsSafely_If,$1,$2,14001,14250) $(call ListPathsSafely_If,$1,$2,14001,14250)
$(call ListPathsSafely_If,$1,$2,14251,14500) $(call ListPathsSafely_If,$1,$2,14251,14500)
$(call ListPathsSafely_If,$1,$2,14501,14750) $(call ListPathsSafely_If,$1,$2,14501,14750)
$(call ListPathsSafely_If,$1,$2,14751,15000) $(call ListPathsSafely_If,$1,$2,14751,15000)
$(call ListPathsSafely_If,$1,$2,15001,15250) $(call ListPathsSafely_If,$1,$2,15001,15250)
$(call ListPathsSafely_If,$1,$2,15251,15500) $(call ListPathsSafely_If,$1,$2,15251,15500)
$(call ListPathsSafely_If,$1,$2,15501,15750) $(call ListPathsSafely_If,$1,$2,15501,15750)
$(call ListPathsSafely_If,$1,$2,15751,16000) $(call ListPathsSafely_If,$1,$2,15751,16000)
$(call ListPathsSafely_Printf,$1,$2,$3,1) $(call ListPathsSafely_Printf,$1,$2,$3,1)
$(call ListPathsSafely_Printf,$1,$2,$3,251) $(call ListPathsSafely_Printf,$1,$2,$3,251)
$(call ListPathsSafely_Printf,$1,$2,$3,501) $(call ListPathsSafely_Printf,$1,$2,$3,501)
$(call ListPathsSafely_Printf,$1,$2,$3,751) $(call ListPathsSafely_Printf,$1,$2,$3,751)
$(call ListPathsSafely_Printf,$1,$2,$3,1001) $(call ListPathsSafely_Printf,$1,$2,$3,1001)
$(call ListPathsSafely_Printf,$1,$2,$3,1251) $(call ListPathsSafely_Printf,$1,$2,$3,1251)
$(call ListPathsSafely_Printf,$1,$2,$3,1501) $(call ListPathsSafely_Printf,$1,$2,$3,1501)
$(call ListPathsSafely_Printf,$1,$2,$3,1751) $(call ListPathsSafely_Printf,$1,$2,$3,1751)
$(call ListPathsSafely_Printf,$1,$2,$3,2001) $(call ListPathsSafely_Printf,$1,$2,$3,2001)
$(call ListPathsSafely_Printf,$1,$2,$3,2251) $(call ListPathsSafely_Printf,$1,$2,$3,2251)
$(call ListPathsSafely_Printf,$1,$2,$3,2501) $(call ListPathsSafely_Printf,$1,$2,$3,2501)
$(call ListPathsSafely_Printf,$1,$2,$3,2751) $(call ListPathsSafely_Printf,$1,$2,$3,2751)
$(call ListPathsSafely_Printf,$1,$2,$3,3001) $(call ListPathsSafely_Printf,$1,$2,$3,3001)
$(call ListPathsSafely_Printf,$1,$2,$3,3251) $(call ListPathsSafely_Printf,$1,$2,$3,3251)
$(call ListPathsSafely_Printf,$1,$2,$3,3501) $(call ListPathsSafely_Printf,$1,$2,$3,3501)
$(call ListPathsSafely_Printf,$1,$2,$3,3751) $(call ListPathsSafely_Printf,$1,$2,$3,3751)
$(call ListPathsSafely_Printf,$1,$2,$3,4001) $(call ListPathsSafely_Printf,$1,$2,$3,4001)
$(call ListPathsSafely_Printf,$1,$2,$3,4251) $(call ListPathsSafely_Printf,$1,$2,$3,4251)
$(call ListPathsSafely_Printf,$1,$2,$3,4501) $(call ListPathsSafely_Printf,$1,$2,$3,4501)
$(call ListPathsSafely_Printf,$1,$2,$3,4751) $(call ListPathsSafely_Printf,$1,$2,$3,4751)
$(call ListPathsSafely_Printf,$1,$2,$3,5001) $(call ListPathsSafely_Printf,$1,$2,$3,5001)
$(call ListPathsSafely_Printf,$1,$2,$3,5251) $(call ListPathsSafely_Printf,$1,$2,$3,5251)
$(call ListPathsSafely_Printf,$1,$2,$3,5501) $(call ListPathsSafely_Printf,$1,$2,$3,5501)
$(call ListPathsSafely_Printf,$1,$2,$3,5751) $(call ListPathsSafely_Printf,$1,$2,$3,5751)
$(call ListPathsSafely_Printf,$1,$2,$3,6001) $(call ListPathsSafely_Printf,$1,$2,$3,6001)
$(call ListPathsSafely_Printf,$1,$2,$3,6251) $(call ListPathsSafely_Printf,$1,$2,$3,6251)
$(call ListPathsSafely_Printf,$1,$2,$3,6501) $(call ListPathsSafely_Printf,$1,$2,$3,6501)
$(call ListPathsSafely_Printf,$1,$2,$3,6751) $(call ListPathsSafely_Printf,$1,$2,$3,6751)
$(call ListPathsSafely_Printf,$1,$2,$3,7001) $(call ListPathsSafely_Printf,$1,$2,$3,7001)
$(call ListPathsSafely_Printf,$1,$2,$3,7251) $(call ListPathsSafely_Printf,$1,$2,$3,7251)
$(call ListPathsSafely_Printf,$1,$2,$3,7501) $(call ListPathsSafely_Printf,$1,$2,$3,7501)
$(call ListPathsSafely_Printf,$1,$2,$3,7751) $(call ListPathsSafely_Printf,$1,$2,$3,7751)
$(call ListPathsSafely_Printf,$1,$2,$3,8001) $(call ListPathsSafely_Printf,$1,$2,$3,8001)
$(call ListPathsSafely_Printf,$1,$2,$3,8251) $(call ListPathsSafely_Printf,$1,$2,$3,8251)
$(call ListPathsSafely_Printf,$1,$2,$3,8501) $(call ListPathsSafely_Printf,$1,$2,$3,8501)
$(call ListPathsSafely_Printf,$1,$2,$3,8751) $(call ListPathsSafely_Printf,$1,$2,$3,8751)
$(call ListPathsSafely_Printf,$1,$2,$3,9001) $(call ListPathsSafely_Printf,$1,$2,$3,9001)
$(call ListPathsSafely_Printf,$1,$2,$3,9251) $(call ListPathsSafely_Printf,$1,$2,$3,9251)
$(call ListPathsSafely_Printf,$1,$2,$3,9501) $(call ListPathsSafely_Printf,$1,$2,$3,9501)
$(call ListPathsSafely_Printf,$1,$2,$3,9751) $(call ListPathsSafely_Printf,$1,$2,$3,9751)
$(call ListPathsSafely_Printf,$1,$2,$3,10001) $(call ListPathsSafely_Printf,$1,$2,$3,10001)
$(call ListPathsSafely_Printf,$1,$2,$3,10251) $(call ListPathsSafely_Printf,$1,$2,$3,10251)
$(call ListPathsSafely_Printf,$1,$2,$3,10501) $(call ListPathsSafely_Printf,$1,$2,$3,10501)
$(call ListPathsSafely_Printf,$1,$2,$3,10751) $(call ListPathsSafely_Printf,$1,$2,$3,10751)
$(call ListPathsSafely_Printf,$1,$2,$3,11001) $(call ListPathsSafely_Printf,$1,$2,$3,11001)
$(call ListPathsSafely_Printf,$1,$2,$3,11251) $(call ListPathsSafely_Printf,$1,$2,$3,11251)
$(call ListPathsSafely_Printf,$1,$2,$3,11501) $(call ListPathsSafely_Printf,$1,$2,$3,11501)
$(call ListPathsSafely_Printf,$1,$2,$3,11751) $(call ListPathsSafely_Printf,$1,$2,$3,11751)
$(call ListPathsSafely_Printf,$1,$2,$3,12001) $(call ListPathsSafely_Printf,$1,$2,$3,12001)
$(call ListPathsSafely_Printf,$1,$2,$3,12251) $(call ListPathsSafely_Printf,$1,$2,$3,12251)
$(call ListPathsSafely_Printf,$1,$2,$3,12501) $(call ListPathsSafely_Printf,$1,$2,$3,12501)
$(call ListPathsSafely_Printf,$1,$2,$3,12751) $(call ListPathsSafely_Printf,$1,$2,$3,12751)
$(call ListPathsSafely_Printf,$1,$2,$3,13001) $(call ListPathsSafely_Printf,$1,$2,$3,13001)
$(call ListPathsSafely_Printf,$1,$2,$3,13251) $(call ListPathsSafely_Printf,$1,$2,$3,13251)
$(call ListPathsSafely_Printf,$1,$2,$3,13501) $(call ListPathsSafely_Printf,$1,$2,$3,13501)
$(call ListPathsSafely_Printf,$1,$2,$3,13751) $(call ListPathsSafely_Printf,$1,$2,$3,13751)
$(call ListPathsSafely_Printf,$1,$2,$3,14001) $(call ListPathsSafely_Printf,$1,$2,$3,14001)
$(call ListPathsSafely_Printf,$1,$2,$3,14251) $(call ListPathsSafely_Printf,$1,$2,$3,14251)
$(call ListPathsSafely_Printf,$1,$2,$3,14501) $(call ListPathsSafely_Printf,$1,$2,$3,14501)
$(call ListPathsSafely_Printf,$1,$2,$3,14751) $(call ListPathsSafely_Printf,$1,$2,$3,14751)
$(call ListPathsSafely_Printf,$1,$2,$3,15001) $(call ListPathsSafely_Printf,$1,$2,$3,15001)
$(call ListPathsSafely_Printf,$1,$2,$3,15251) $(call ListPathsSafely_Printf,$1,$2,$3,15251)
$(call ListPathsSafely_Printf,$1,$2,$3,15501) $(call ListPathsSafely_Printf,$1,$2,$3,15501)
$(call ListPathsSafely_Printf,$1,$2,$3,15751) $(call ListPathsSafely_Printf,$1,$2,$3,15751)
endef endef
define ListPathsSafelyNow_IfPrintf define ListPathsSafelyNow_IfPrintf
ifneq (,$$(word $4,$$($1))) ifneq (,$$(word $4,$$($1)))
$$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1)))) $$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
$$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3) $$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
endif endif
endef endef
# And an non-receipt version: # And an non-receipt version:
define ListPathsSafelyNow define ListPathsSafelyNow
ifneq (,$$(word 10001,$$($1))) ifneq (,$$(word 10001,$$($1)))
$$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!) $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
endif endif
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000) $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
endef endef
# The source tips can come from the Mercurial repository, or in the files # The source tips can come from the Mercurial repository, or in the files
# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same # $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
# directory as the original $(HGDIR) directory. # directory as the original $(HGDIR) directory.
# These should not be := assignments, only used from the root Makefile. # These should not be := assignments, only used from the root Makefile.
HG_VERSION = $(shell $(HG) version 2> /dev/null) HG_VERSION = $(shell $(HG) version 2> /dev/null)
HG_DIRECTORY=.hg HG_DIRECTORY=.hg
HGTIP_FILENAME=.hgtip HGTIP_FILENAME=.hgtip
HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \ REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
$(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \ $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
$(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \ $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
2> /dev/null))))) 2> /dev/null)))))
# Emit the repo:tip pairs to $@ # Emit the repo:tip pairs to $@
define GetSourceTips define GetSourceTips
$(CD) $(SRC_ROOT) ; \ $(CD) $(SRC_ROOT) ; \
for i in $(REPO_LIST) IGNORE ; do \ for i in $(REPO_LIST) IGNORE ; do \
if [ "$${i}" = "IGNORE" ] ; then \ if [ "$${i}" = "IGNORE" ] ; then \
continue; \ continue; \
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \ elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
$(PRINTF) " %s:%s" \ $(PRINTF) " %s:%s" \
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \ "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \ elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
$(PRINTF) " %s:%s" \ $(PRINTF) " %s:%s" \
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \ "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
fi; \ fi; \
done >> $@ done >> $@
$(PRINTF) "\n" >> $@ $(PRINTF) "\n" >> $@
endef endef
# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk # Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
define CreateHgTip define CreateHgTip
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\ $(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME); \
$(ECHO) $1/$(HGTIP_FILENAME) $(ECHO) $1/$(HGTIP_FILENAME)
endef endef
define SetupLogging define SetupLogging
ifeq ($$(LOG_LEVEL),trace) ifeq ($$(LOG_LEVEL),trace)
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make # 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 # For each target executed, will print
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer) # 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 # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
# (and causing a crash on Cygwin). # (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. # 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. # 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 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) 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 endif
# Never remove warning messages; this is just for completeness # Never remove warning messages; this is just for completeness
LOG_WARN= LOG_WARN=
ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),) ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
LOG_INFO= LOG_INFO=
else else
LOG_INFO=> /dev/null LOG_INFO=> /dev/null
endif endif
ifneq ($$(findstring $$(LOG_LEVEL),debug trace),) ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
LOG_DEBUG= LOG_DEBUG=
else else
LOG_DEBUG=> /dev/null LOG_DEBUG=> /dev/null
endif endif
ifneq ($$(findstring $$(LOG_LEVEL),trace),) ifneq ($$(findstring $$(LOG_LEVEL),trace),)
LOG_TRACE= LOG_TRACE=
else else
LOG_TRACE=> /dev/null LOG_TRACE=> /dev/null
endif endif
endef endef
# Make sure logging is setup for everyone that includes MakeBase.gmk. # Make sure logging is setup for everyone that includes MakeBase.gmk.
@ -363,43 +363,43 @@ $(eval $(call SetupLogging))
# This is to be called by all SetupFoo macros # This is to be called by all SetupFoo macros
define LogSetupMacroEntry define LogSetupMacroEntry
$(if $(27),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk)) $(if $(27),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
$(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i)))))) $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
endef endef
# Make directory without forking mkdir if not needed # Make directory without forking mkdir if not needed
define MakeDir define MakeDir
ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9)) ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
$$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9) $$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
endif endif
endef endef
ifeq ($(OPENJDK_TARGET_OS),solaris) ifeq ($(OPENJDK_TARGET_OS),solaris)
# On Solaris, if the target is a symlink and exists, cp won't overwrite. # On Solaris, if the target is a symlink and exists, cp won't overwrite.
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
# name of the target file differs from the source file, rename after copy. # name of the target file differs from the source file, rename after copy.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) '$@' $(RM) '$@'
$(CP) -f -r -P '$<' '$(@D)' $(CP) -f -r -P '$<' '$(@D)'
if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
endef endef
else ifeq ($(OPENJDK_TARGET_OS),macosx) else ifeq ($(OPENJDK_TARGET_OS),macosx)
# On mac, extended attributes sometimes creep into the source files, which may later # On mac, extended attributes sometimes creep into the source files, which may later
# cause the creation of ._* files which confuses testing. Clear these with xattr if # cause the creation of ._* files which confuses testing. Clear these with xattr if
# set. Some files get their write permissions removed after being copied to the # set. Some files get their write permissions removed after being copied to the
# output dir. When these are copied again to images, xattr would fail. By only clearing # output dir. When these are copied again to images, xattr would fail. By only clearing
# attributes when they are present, failing on this is avoided. # attributes when they are present, failing on this is avoided.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -fRP '$<' '$@' $(CP) -fRP '$<' '$@'
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
endef endef
else else
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -fP '$<' '$@' $(CP) -fP '$<' '$@'
endef endef
endif endif
# Convenience functions for working around make's limitations with $(filter ). # Convenience functions for working around make's limitations with $(filter ).
@ -409,25 +409,25 @@ not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
################################################################################ ################################################################################
# In Cygwin, finds are very costly, both because of expensive forks and because # In Cygwin, finds are very costly, both because of expensive forks and because
# of bad file system caching. Find is used extensively in $(shell) commands to # of bad file system caching. Find is used extensively in $(shell) commands to
# find source files. This makes rerunning make with no or few changes rather # find source files. This makes rerunning make with no or few changes rather
# expensive. To speed this up, these two macros are used to cache the results # expensive. To speed this up, these two macros are used to cache the results
# of simple find commands for reuse. # of simple find commands for reuse.
# #
# Runs a find and stores both the directories where it was run and the results. # Runs a find and stores both the directories where it was run and the results.
# This macro can be called multiple times to add to the cache. Only finds files # This macro can be called multiple times to add to the cache. Only finds files
# with no filters. # with no filters.
# #
# Needs to be called with $(eval ) # Needs to be called with $(eval )
# #
# Param 1 - Dir to find in # Param 1 - Dir to find in
ifeq ($(OPENJDK_BUILD_OS),windows) ifeq ($(OPENJDK_BUILD_OS),windows)
define FillCacheFind define FillCacheFind
FIND_CACHE_DIR += $1 FIND_CACHE_DIR += $1
FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l)) FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
endef endef
else else
define FillCacheFind define FillCacheFind
endef endef
endif endif
# Mimics find by looking in the cache if all of the directories have been cached. # Mimics find by looking in the cache if all of the directories have been cached.
@ -437,9 +437,9 @@ endif
# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless. # The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
# Param 1 - Dirs to find in # Param 1 - Dirs to find in
define CacheFind define CacheFind
$(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1),\ $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
$(shell $(FIND) $1 -type f -o -type l),\ $(shell $(FIND) $1 -type f -o -type l), \
$(filter $(addsuffix %,$1),$(FIND_CACHE))) $(filter $(addsuffix %,$1),$(FIND_CACHE)))
endef endef
################################################################################ ################################################################################

View File

@ -26,7 +26,7 @@
################################################################ ################################################################
# #
# This file contains helper functions for the top-level Makefile that does # This file contains helper functions for the top-level Makefile that does
# not depend on the spec.gmk file having been read. (The purpose of this # not depend on the spec.gmk file having been read. (The purpose of this
# file is ju to avoid cluttering the top-level Makefile.) # file is ju to avoid cluttering the top-level Makefile.)
# #
################################################################ ################################################################
@ -49,7 +49,7 @@ list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
# Global targets are possible to run either with or without a SPEC. The prototypical # Global targets are possible to run either with or without a SPEC. The prototypical
# global target is "help". # global target is "help".
global_targets=help jprt% bridgeBuild global_targets=help jprt% bridgeBuild
############################## ##############################
@ -57,55 +57,55 @@ global_targets=help jprt% bridgeBuild
############################## ##############################
define CheckEnvironment define CheckEnvironment
# Find all environment or command line variables that begin with ALT. # Find all environment or command line variables that begin with ALT.
$(if $(list_alt_overrides), $(if $(list_alt_overrides),
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n" @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n" @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n" @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
) )
endef endef
### Functions for timers ### Functions for timers
# Record starting time for build of a sub repository. # Record starting time for build of a sub repository.
define RecordStartTime define RecordStartTime
$(MKDIR) -p $(BUILDTIMESDIR) $(MKDIR) -p $(BUILDTIMESDIR)
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1 $(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable $(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
endef endef
# Record ending time and calculate the difference and store it in a # Record ending time and calculate the difference and store it in a
# easy to read format. Handles builds that cross midnight. Expects # easy to read format. Handles builds that cross midnight. Expects
# that a build will never take 24 hours or more. # that a build will never take 24 hours or more.
define RecordEndTime define RecordEndTime
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1 $(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable $(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \ $(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \ $(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \ M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
> $(BUILDTIMESDIR)/build_time_diff_$1 > $(BUILDTIMESDIR)/build_time_diff_$1
endef endef
# Find all build_time_* files and print their contents in a list sorted # Find all build_time_* files and print their contents in a list sorted
# on the name of the sub repository. # on the name of the sub repository.
define ReportBuildTimes define ReportBuildTimes
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \ $(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \ "`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \ "`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \ "`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`" "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
endef endef
define ResetAllTimers define ResetAllTimers
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*) $$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
endef endef
define StartGlobalTimer define StartGlobalTimer
$(call RecordStartTime,TOTAL) $(call RecordStartTime,TOTAL)
endef endef
define StopGlobalTimer define StopGlobalTimer
$(call RecordEndTime,TOTAL) $(call RecordEndTime,TOTAL)
endef endef
### Functions for managing makefile structure (start/end of makefile and individual targets) ### Functions for managing makefile structure (start/end of makefile and individual targets)
@ -123,184 +123,184 @@ endef
# Check if the current target is the final target, as specified by # Check if the current target is the final target, as specified by
# the user on the command line. If so, call AtRootMakeEnd. # the user on the command line. If so, call AtRootMakeEnd.
define CheckIfMakeAtEnd define CheckIfMakeAtEnd
# Check if the current target is the last goal # Check if the current target is the last goal
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd)) $(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
# If the target is 'foo-only', check if our goal was stated as 'foo' # If the target is 'foo-only', check if our goal was stated as 'foo'
$(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd)) $(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
endef endef
# Hook to be called when starting to execute a top-level target # Hook to be called when starting to execute a top-level target
define TargetEnter define TargetEnter
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n" $(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
$(call RecordStartTime,$(patsubst %-only,%,$@)) $(call RecordStartTime,$(patsubst %-only,%,$@))
endef endef
# Hook to be called when finish executing a top-level target # Hook to be called when finish executing a top-level target
define TargetExit define TargetExit
$(call RecordEndTime,$(patsubst %-only,%,$@)) $(call RecordEndTime,$(patsubst %-only,%,$@))
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \ $(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`" "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
$(call CheckIfMakeAtEnd) $(call CheckIfMakeAtEnd)
endef endef
# Hook to be called as the very first thing when running a normal build # Hook to be called as the very first thing when running a normal build
define AtMakeStart define AtMakeStart
$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n)) $(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
$(call CheckEnvironment) $(call CheckEnvironment)
@$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n" @$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
@$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n" @$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
$(call StartGlobalTimer) $(call StartGlobalTimer)
endef endef
# Hook to be called as the very last thing for targets that are "top level" targets # Hook to be called as the very last thing for targets that are "top level" targets
define AtMakeEnd define AtMakeEnd
[ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true [ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
$(call StopGlobalTimer) $(call StopGlobalTimer)
$(call ReportBuildTimes) $(call ReportBuildTimes)
@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n" @$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
$(call CheckEnvironment) $(call CheckEnvironment)
endef endef
### Functions for parsing and setting up make options from command-line ### Functions for parsing and setting up make options from command-line
define FatalError define FatalError
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
$$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue)) $$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
endef endef
define ParseLogLevel define ParseLogLevel
ifeq ($$(origin VERBOSE),undefined) ifeq ($$(origin VERBOSE),undefined)
# Setup logging according to LOG (but only if VERBOSE is not given) # Setup logging according to LOG (but only if VERBOSE is not given)
# If the "nofile" argument is given, act on it and strip it away # If the "nofile" argument is given, act on it and strip it away
ifneq ($$(findstring nofile,$$(LOG)),) ifneq ($$(findstring nofile,$$(LOG)),)
# Reset the build log wrapper, regardless of other values # Reset the build log wrapper, regardless of other values
override BUILD_LOG_WRAPPER= override BUILD_LOG_WRAPPER=
# COMMA is defined in spec.gmk, but that is not included yet # COMMA is defined in spec.gmk, but that is not included yet
COMMA=, COMMA=,
# First try to remove ",nofile" if it exists # First try to remove ",nofile" if it exists
LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG)) LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
# Otherwise just remove "nofile" # Otherwise just remove "nofile"
LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1)) LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
# We might have ended up with a leading comma. Remove it # We might have ended up with a leading comma. Remove it
LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2))) LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
LOG_LEVEL:=$$(LOG_STRIPPED3) LOG_LEVEL:=$$(LOG_STRIPPED3)
else
LOG_LEVEL:=$$(LOG)
endif
ifeq ($$(LOG_LEVEL),)
# Set LOG to "warn" as default if not set (and no VERBOSE given)
override LOG_LEVEL=warn
endif
ifeq ($$(LOG_LEVEL),warn)
VERBOSE=-s
else ifeq ($$(LOG_LEVEL),info)
VERBOSE=-s
else ifeq ($$(LOG_LEVEL),debug)
VERBOSE=
else ifeq ($$(LOG_LEVEL),trace)
VERBOSE=
else
$$(info Error: LOG must be one of: warn, info, debug or trace.)
$$(eval $$(call FatalError))
endif
else else
# Provide resonable interpretations of LOG_LEVEL if VERBOSE is given. LOG_LEVEL:=$$(LOG)
ifeq ($(VERBOSE),)
LOG_LEVEL:=debug
else
LOG_LEVEL:=warn
endif
ifneq ($$(LOG),)
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
$$(eval $$(call FatalError))
endif
endif
endif endif
ifeq ($$(LOG_LEVEL),)
# Set LOG to "warn" as default if not set (and no VERBOSE given)
override LOG_LEVEL=warn
endif
ifeq ($$(LOG_LEVEL),warn)
VERBOSE=-s
else ifeq ($$(LOG_LEVEL),info)
VERBOSE=-s
else ifeq ($$(LOG_LEVEL),debug)
VERBOSE=
else ifeq ($$(LOG_LEVEL),trace)
VERBOSE=
else
$$(info Error: LOG must be one of: warn, info, debug or trace.)
$$(eval $$(call FatalError))
endif
else
# Provide resonable interpretations of LOG_LEVEL if VERBOSE is given.
ifeq ($(VERBOSE),)
LOG_LEVEL:=debug
else
LOG_LEVEL:=warn
endif
ifneq ($$(LOG),)
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
$$(eval $$(call FatalError))
endif
endif
endif
endef endef
define ParseConfAndSpec define ParseConfAndSpec
ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),) ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
# If we only have global targets, no need to bother with SPEC or CONF # If we only have global targets, no need to bother with SPEC or CONF
ifneq ($$(origin SPEC),undefined) ifneq ($$(origin SPEC),undefined)
# We have been given a SPEC, check that it works out properly # We have been given a SPEC, check that it works out properly
ifeq ($$(wildcard $$(SPEC)),) ifeq ($$(wildcard $$(SPEC)),)
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC)) $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
$$(eval $$(call FatalError)) $$(eval $$(call FatalError))
endif endif
ifneq ($$(origin CONF),undefined) ifneq ($$(origin CONF),undefined)
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves, # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call. # but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0) ifeq ($$(MAKELEVEL),0)
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.) $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(eval $$(call FatalError)) $$(eval $$(call FatalError))
endif
endif
# ... OK, we're satisfied, we'll use this SPEC later on
else
# Find all spec.gmk files in the build output directory
output_dir=$$(root_dir)/build
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
ifeq ($$(all_spec_files),)
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
$$(eval $$(call FatalError))
endif
# Extract the configuration names from the path
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
ifneq ($$(origin CONF),undefined)
# User have given a CONF= argument.
ifeq ($$(CONF),)
# If given CONF=, match all configurations
matching_confs=$$(strip $$(all_confs))
else
# Otherwise select those that contain the given CONF string
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
endif
ifeq ($$(matching_confs),)
$$(info No configurations found matching CONF=$$(CONF))
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(eval $$(call FatalError))
else
ifeq ($$(words $$(matching_confs)),1)
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
else
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
endif
endif
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
else
# No CONF or SPEC given, check the available configurations
ifneq ($$(words $$(all_spec_files)),1)
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
$$(eval $$(call FatalError))
endif
# We found exactly one configuration, use it
SPEC=$$(strip $$(all_spec_files))
endif
endif endif
endif
# ... OK, we're satisfied, we'll use this SPEC later on
else
# Find all spec.gmk files in the build output directory
output_dir=$$(root_dir)/build
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
ifeq ($$(all_spec_files),)
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
$$(eval $$(call FatalError))
endif
# Extract the configuration names from the path
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
ifneq ($$(origin CONF),undefined)
# User have given a CONF= argument.
ifeq ($$(CONF),)
# If given CONF=, match all configurations
matching_confs=$$(strip $$(all_confs))
else
# Otherwise select those that contain the given CONF string
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
endif
ifeq ($$(matching_confs),)
$$(info No configurations found matching CONF=$$(CONF))
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(eval $$(call FatalError))
else
ifeq ($$(words $$(matching_confs)),1)
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
else
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
endif
endif
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
else
# No CONF or SPEC given, check the available configurations
ifneq ($$(words $$(all_spec_files)),1)
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
$$(eval $$(call FatalError))
endif
# We found exactly one configuration, use it
SPEC=$$(strip $$(all_spec_files))
endif
endif endif
endif
endef endef
### Convenience functions from Main.gmk ### Convenience functions from Main.gmk
# Cleans the component given as $1 # Cleans the component given as $1
define CleanComponent define CleanComponent
@$(PRINTF) "Cleaning $1 build artifacts ..." @$(PRINTF) "Cleaning $1 build artifacts ..."
@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1) @($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
@$(PRINTF) " done\n" @$(PRINTF) " done\n"
endef endef
endif # _MAKEHELPERS_GMK endif # _MAKEHELPERS_GMK

File diff suppressed because it is too large Load Diff

View File

@ -24,74 +24,74 @@
# #
define SetupRMICompilation define SetupRMICompilation
# param 1 is a name for a variable to depend on. # param 1 is a name for a variable to depend on.
# param 2 and up are named args. # param 2 and up are named args.
# CLASSES:=List of classes to generate stubs for # CLASSES:=List of classes to generate stubs for
# CLASSES_DIR:=Directory where to look for classes # CLASSES_DIR:=Directory where to look for classes
# STUB_CLASSES_DIR:=Directory in where to put stub classes # STUB_CLASSES_DIR:=Directory in where to put stub classes
# RUN_V11:=Set to run rmic with -v1.1 # RUN_V11:=Set to run rmic with -v1.1
# RUN_V12:=Set to run rmic with -v1.2 # RUN_V12:=Set to run rmic with -v1.2
# RUN_IIOP:=Set to run rmic with -iiop # RUN_IIOP:=Set to run rmic with -iiop
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage # RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
# KEEP_GENERATED:=Set to keep generated sources around # KEEP_GENERATED:=Set to keep generated sources around
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(call LogSetupMacroEntry,SetupRMICompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(call LogSetupMacroEntry,SetupRMICompilation($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 SetupRMICompilation, please update RMICompilation.gmk)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
$1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES)) $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
$1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH))) $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
$1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH))) $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
$1_TARGETS := $$($1_STUB_FILES) $1_TARGETS := $$($1_STUB_FILES)
$1_ARGS := $1_ARGS :=
ifneq (,$$($1_RUN_V11)) ifneq (,$$($1_RUN_V11))
$1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH))) $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
$1_TARGETS += $$($1_SKEL_FILES) $1_TARGETS += $$($1_SKEL_FILES)
$1_ARGS += -v1.1 $1_ARGS += -v1.1
endif endif
ifneq (,$$($1_RUN_V12)) ifneq (,$$($1_RUN_V12))
$1_ARGS += -v1.2 $1_ARGS += -v1.2
endif endif
$1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f)) $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
$1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES))) $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
$1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES))) $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
ifneq (,$$($1_RUN_IIOP)) ifneq (,$$($1_RUN_IIOP))
$1_TARGETS += $$($1_TIE_FILES) $1_TARGETS += $$($1_TIE_FILES)
$1_ARGS += -iiop $1_ARGS += -iiop
endif endif
ifneq (,$$($1_RUN_IIOP_STDPKG)) ifneq (,$$($1_RUN_IIOP_STDPKG))
$1_TARGETS += $$($1_TIE_STDPKG_FILES) $1_TARGETS += $$($1_TIE_STDPKG_FILES)
$1_ARGS2 := -iiop -standardPackage $1_ARGS2 := -iiop -standardPackage
endif endif
ifneq (,$$($1_KEEP_GENERATED)) ifneq (,$$($1_KEEP_GENERATED))
$1_ARGS += -keepgenerated $1_ARGS += -keepgenerated
$1_TARGETS += $$(subst .class,.java,$$($1_TARGETS)) $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
endif endif
$1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES)) $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
$$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES) $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
$$($1_DEP_FILE): $$($1_CLASS_FILES) $$($1_DEP_FILE): $$($1_CLASS_FILES)
$(MKDIR) -p $$($1_STUB_CLASSES_DIR) $(MKDIR) -p $$($1_STUB_CLASSES_DIR)
if [ "x$$($1_ARGS)" != "x" ]; then \ if [ "x$$($1_ARGS)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
fi; fi;
if [ "x$$($1_ARGS2)" != "x" ]; then \ if [ "x$$($1_ARGS2)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
fi; fi;
$1 := $$($1_TARGETS) $1 := $$($1_TARGETS)
# By marking as secondary, this "touch" file doesn't need to be touched and will never exist. # By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
.SECONDARY: $$($1_DEP_FILE) .SECONDARY: $$($1_DEP_FILE)
endef endef

View File

@ -25,12 +25,12 @@
########################################################################################## ##########################################################################################
# #
# This Makefile, together with Tools.gmk, can be used to compile a set of # This Makefile, together with Tools.gmk, can be used to compile a set of
# gcc based cross compilation, portable, self contained packages, capable # gcc based cross compilation, portable, self contained packages, capable
# of building OpenJDK. # of building OpenJDK.
# #
# In addition to the makefiles, access to Oracle Linux installation # In addition to the makefiles, access to Oracle Linux installation
# media is required. This has been tested against Oracle Enterprise Linux # media is required. This has been tested against Oracle Enterprise Linux
# 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point # 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point
# to directory containing the RPMs. # to directory containing the RPMs.
# #
@ -43,9 +43,9 @@
# #
# To build the full set of crosstools, use a command line looking like this: # To build the full set of crosstools, use a command line looking like this:
# #
# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/ # make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
# #
# To create a x86_64 package without the redundant i686 cross compiler, do # To create a x86_64 package without the redundant i686 cross compiler, do
# like this: # like this:
# #
# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/ # make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
@ -54,70 +54,68 @@
# Main makefile which iterates over all host and target platforms. # Main makefile which iterates over all host and target platforms.
# #
os := $(shell uname -o) os := $(shell uname -o)
cpu := x86_64 cpu := x86_64
#$(shell uname -p) #$(shell uname -p)
# #
# This wrapper script can handle exactly these platforms # This wrapper script can handle exactly these platforms
# #
platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu) platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu) #platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
# Figure out what platform this is building on. # Figure out what platform this is building on.
me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu) me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
$(info Building on platform $(me)) $(info Building on platform $(me))
all compile : $(platforms) all compile : $(platforms)
ifeq (,$(SKIP_ME)) ifeq (,$(SKIP_ME))
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me))) $(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
endif endif
OUTPUT_ROOT = $(abspath ../../../build/devkit) OUTPUT_ROOT = $(abspath ../../../build/devkit)
RESULT = $(OUTPUT_ROOT)/result RESULT = $(OUTPUT_ROOT)/result
submakevars = HOST=$@ BUILD=$(me) \ submakevars = HOST=$@ BUILD=$(me) \
RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \ RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
OUTPUT_ROOT=$(OUTPUT_ROOT) OUTPUT_ROOT=$(OUTPUT_ROOT)
$(platforms) : $(platforms) :
@echo 'Building compilers for $@' @echo 'Building compilers for $@'
@echo 'Targets: $(platforms)' @echo 'Targets: $(platforms)'
for p in $@ $(filter-out $@,$(platforms)); do \ for p in $@ $(filter-out $@,$(platforms)); do \
$(MAKE) -f Tools.gmk all $(submakevars) \ $(MAKE) -f Tools.gmk all $(submakevars) \
TARGET=$$p || exit 1 ; \ TARGET=$$p || exit 1 ; \
done done
@echo 'Building ccache program for $@' @echo 'Building ccache program for $@'
$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@ $(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
@echo 'All done"' @echo 'All done"'
$(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms)))) $(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
ia32 : i686 ia32 : i686
today := $(shell date +%Y%m%d) today := $(shell date +%Y%m%d)
define Mktar define Mktar
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz $(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
$$($(1)_tar) : PLATFORM = $(1) $$($(1)_tar) : PLATFORM = $(1)
TARFILES += $$($(1)_tar) TARFILES += $$($(1)_tar)
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1)) $$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
endef endef
$(foreach p,$(platforms),$(eval $(call Mktar,$(p)))) $(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
tars : all $(TARFILES) tars : all $(TARFILES)
onlytars : $(TARFILES) onlytars : $(TARFILES)
%.tar.gz : %.tar.gz :
@echo 'Creating compiler package $@' @echo 'Creating compiler package $@'
cd $(RESULT)/$(PLATFORM) && tar -czf $@ * cd $(RESULT)/$(PLATFORM) && tar -czf $@ *
touch $@ touch $@
clean : clean :
rm -rf build result rm -rf build result
FORCE : FORCE :
.PHONY : $(configs) $(platforms) .PHONY : $(configs) $(platforms)

View File

@ -26,15 +26,15 @@
########################################################################################## ##########################################################################################
# #
# Workhorse makefile for creating ONE cross compiler # Workhorse makefile for creating ONE cross compiler
# Needs either to be from BUILD -> BUILD OR have # Needs either to be from BUILD -> BUILD OR have
# BUILD -> HOST prebuilt # BUILD -> HOST prebuilt
# #
# NOTE: There is a bug here. We don't limit the # NOTE: There is a bug here. We don't limit the
# PATH when building BUILD -> BUILD, which means that # PATH when building BUILD -> BUILD, which means that
# if you configure after you've once build the BUILD->BUILD # if you configure after you've once build the BUILD->BUILD
# compiler THAT one will be picked up as the compiler for itself. # compiler THAT one will be picked up as the compiler for itself.
# This is not so great, especially if you did a partial delete # This is not so great, especially if you did a partial delete
# of the target tree. # of the target tree.
# #
# Fix this... # Fix this...
# #
@ -43,45 +43,45 @@ $(info TARGET=$(TARGET))
$(info HOST=$(HOST)) $(info HOST=$(HOST))
$(info BUILD=$(BUILD)) $(info BUILD=$(BUILD))
ARCH := $(word 1,$(subst -, ,$(TARGET))) ARCH := $(word 1,$(subst -, ,$(TARGET)))
########################################################################################## ##########################################################################################
# Define external dependencies # Define external dependencies
# Latest that could be made to work. # Latest that could be made to work.
gcc_ver := gcc-4.7.3 gcc_ver := gcc-4.7.3
binutils_ver := binutils-2.22 binutils_ver := binutils-2.22
ccache_ver := ccache-3.1.9 ccache_ver := ccache-3.1.9
mpfr_ver := mpfr-3.0.1 mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2 gmp_ver := gmp-4.3.2
mpc_ver := mpc-1.0.1 mpc_ver := mpc-1.0.1
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2 GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2 BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2 MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2 GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
# RPMs in OEL5.5 # RPMs in OEL5.5
RPM_LIST := \ RPM_LIST := \
kernel-headers \ kernel-headers \
glibc-2 glibc-headers glibc-devel \ glibc-2 glibc-headers glibc-devel \
cups-libs cups-devel \ cups-libs cups-devel \
libX11 libX11-devel \ libX11 libX11-devel \
xorg-x11-proto-devel \ xorg-x11-proto-devel \
alsa-lib alsa-lib-devel \ alsa-lib alsa-lib-devel \
libXext libXext-devel \ libXext libXext-devel \
libXtst libXtst-devel \ libXtst libXtst-devel \
libXrender libXrender-devel \ libXrender libXrender-devel \
freetype freetype-devel \ freetype freetype-devel \
libXt libXt-devel \ libXt libXt-devel \
libSM libSM-devel \ libSM libSM-devel \
libICE libICE-devel \ libICE libICE-devel \
libXi libXi-devel \ libXi libXi-devel \
libXdmcp libXdmcp-devel \ libXdmcp libXdmcp-devel \
libXau libXau-devel \ libXau libXau-devel \
libgcc libgcc
ifeq ($(ARCH),x86_64) ifeq ($(ARCH),x86_64)
@ -90,7 +90,7 @@ ifeq ($(ARCH),x86_64)
ifeq ($(BUILD),$(HOST)) ifeq ($(BUILD),$(HOST))
ifeq ($(TARGET),$(HOST)) ifeq ($(TARGET),$(HOST))
# When building the native compiler for x86_64, enable mixed mode. # When building the native compiler for x86_64, enable mixed mode.
RPM_ARCHS += i386 i686 RPM_ARCHS += i386 i686
endif endif
endif endif
else else
@ -110,47 +110,47 @@ endif
# Ensure we have 32-bit libs also for x64. We enable mixed-mode. # Ensure we have 32-bit libs also for x64. We enable mixed-mode.
ifeq (x86_64,$(ARCH)) ifeq (x86_64,$(ARCH))
LIBDIRS := lib64 lib LIBDIRS := lib64 lib
CFLAGS_lib := -m32 CFLAGS_lib := -m32
else else
LIBDIRS := lib LIBDIRS := lib
endif endif
# Define directories # Define directories
RESULT := $(OUTPUT_ROOT)/result RESULT := $(OUTPUT_ROOT)/result
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET) BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
PREFIX := $(RESULT)/$(HOST) PREFIX := $(RESULT)/$(HOST)
TARGETDIR := $(PREFIX)/$(TARGET) TARGETDIR := $(PREFIX)/$(TARGET)
SYSROOT := $(TARGETDIR)/sys-root SYSROOT := $(TARGETDIR)/sys-root
DOWNLOAD := $(OUTPUT_ROOT)/download DOWNLOAD := $(OUTPUT_ROOT)/download
SRCDIR := $(OUTPUT_ROOT)/src SRCDIR := $(OUTPUT_ROOT)/src
# Marker file for unpacking rpms # Marker file for unpacking rpms
rpms := $(SYSROOT)/rpms_unpacked rpms := $(SYSROOT)/rpms_unpacked
# Need to patch libs that are linker scripts to use non-absolute paths # Need to patch libs that are linker scripts to use non-absolute paths
libs := $(SYSROOT)/libs_patched libs := $(SYSROOT)/libs_patched
########################################################################################## ##########################################################################################
# Unpack source packages # Unpack source packages
# Generate downloading + unpacking of sources. # Generate downloading + unpacking of sources.
define Download define Download
$(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1)))))) $(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
$(1)_CFG = $$($(1)_DIR)/configure $(1)_CFG = $$($(1)_DIR)/configure
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1))) $(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
$$($(1)_CFG) : $$($(1)_FILE) $$($(1)_CFG) : $$($(1)_FILE)
mkdir -p $$(SRCDIR) mkdir -p $$(SRCDIR)
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$< tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \ $$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
echo PATCHING $$(p) ; \ echo PATCHING $$(p) ; \
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \ patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
) )
touch $$@ touch $$@
$$($(1)_FILE) : $$($(1)_FILE) :
wget -P $(DOWNLOAD) $$($(1)) wget -P $(DOWNLOAD) $$($(1))
endef endef
# Download and unpack all source packages # Download and unpack all source packages
@ -159,48 +159,48 @@ $(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
########################################################################################## ##########################################################################################
# Unpack RPMS # Unpack RPMS
# Note. For building linux you should install rpm2cpio. # Note. For building linux you should install rpm2cpio.
define unrpm define unrpm
$(SYSROOT)/$(notdir $(1)).unpacked \ $(SYSROOT)/$(notdir $(1)).unpacked \
: $(1) : $(1)
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked $$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
endef endef
%.unpacked : %.unpacked :
$(info Unpacking target rpms and libraries from $<) $(info Unpacking target rpms and libraries from $<)
@(mkdir -p $(@D); \ @(mkdir -p $(@D); \
cd $(@D); \ cd $(@D); \
rpm2cpio $< | \ rpm2cpio $< | \
cpio --extract --make-directories \ cpio --extract --make-directories \
-f \ -f \
"./usr/share/doc/*" \ "./usr/share/doc/*" \
"./usr/share/man/*" \ "./usr/share/man/*" \
"./usr/X11R6/man/*" \ "./usr/X11R6/man/*" \
"*/X11/locale/*" \ "*/X11/locale/*" \
|| die ; ) || die ; )
touch $@ touch $@
$(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p)))) $(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
########################################################################################## ##########################################################################################
# Note: MUST create a <sys-root>/usr/lib even if not really needed. # Note: MUST create a <sys-root>/usr/lib even if not really needed.
# gcc will use a path relative to it to resolve lib64. (x86_64). # gcc will use a path relative to it to resolve lib64. (x86_64).
# we're creating multi-lib compiler with 32bit libc as well, so we should # we're creating multi-lib compiler with 32bit libc as well, so we should
# have it anyway, but just to make sure... # have it anyway, but just to make sure...
# Patch libc.so and libpthread.so to force linking against libraries in sysroot # Patch libc.so and libpthread.so to force linking against libraries in sysroot
# and not the ones installed on the build machine. # and not the ones installed on the build machine.
$(libs) : $(rpms) $(libs) : $(rpms)
@echo Patching libc and pthreads @echo Patching libc and pthreads
@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \ @(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
(cat $$f | sed -e 's|/usr/lib64/||g' \ (cat $$f | sed -e 's|/usr/lib64/||g' \
-e 's|/usr/lib/||g' \ -e 's|/usr/lib/||g' \
-e 's|/lib64/||g' \ -e 's|/lib64/||g' \
-e 's|/lib/||g' ) > $$f.tmp ; \ -e 's|/lib/||g' ) > $$f.tmp ; \
mv $$f.tmp $$f ; \ mv $$f.tmp $$f ; \
done) done)
@mkdir -p $(SYSROOT)/usr/lib @mkdir -p $(SYSROOT)/usr/lib
@touch $@ @touch $@
########################################################################################## ##########################################################################################
@ -210,264 +210,264 @@ $(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_v
########################################################################################## ##########################################################################################
# Default base config # Default base config
CONFIG = --target=$(TARGET) \ CONFIG = --target=$(TARGET) \
--host=$(HOST) --build=$(BUILD) \ --host=$(HOST) --build=$(BUILD) \
--prefix=$(PREFIX) --prefix=$(PREFIX)
PATHEXT = $(RESULT)/$(BUILD)/bin: PATHEXT = $(RESULT)/$(BUILD)/bin:
PATHPRE = PATH=$(PATHEXT)$(PATH) PATHPRE = PATH=$(PATHEXT)$(PATH)
BUILDPAR = -j16 BUILDPAR = -j16
# Default commands to when making # Default commands to when making
MAKECMD = MAKECMD =
INSTALLCMD = install INSTALLCMD = install
declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump
ifeq ($(HOST),$(BUILD)) ifeq ($(HOST),$(BUILD))
ifeq ($(HOST),$(TARGET)) ifeq ($(HOST),$(TARGET))
TOOLS = $(call declare_tools,_FOR_TARGET,) TOOLS = $(call declare_tools,_FOR_TARGET,)
endif endif
endif endif
TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-) TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
########################################################################################## ##########################################################################################
# Create a TARGET bfd + libiberty only. # Create a TARGET bfd + libiberty only.
# Configure one or two times depending on mulitlib arch. # Configure one or two times depending on mulitlib arch.
# If multilib, the second should be 32-bit, and we resolve # If multilib, the second should be 32-bit, and we resolve
# CFLAG_<name> to most likely -m32. # CFLAG_<name> to most likely -m32.
define mk_bfd define mk_bfd
$$(info Libs for $(1)) $$(info Libs for $(1))
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \ $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
: CFLAGS += $$(CFLAGS_$(1)) : CFLAGS += $$(CFLAGS_$(1))
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \ $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
: LIBDIRS = --libdir=$(TARGETDIR)/$(1) : LIBDIRS = --libdir=$(TARGETDIR)/$(1)
bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
endef endef
# Create one set of bfds etc for each multilib arch # Create one set of bfds etc for each multilib arch
$(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l)))) $(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l))))
# Only build these two libs. # Only build these two libs.
$(bfdlib) : MAKECMD = all-libiberty all-bfd $(bfdlib) : MAKECMD = all-libiberty all-bfd
$(bfdlib) : INSTALLCMD = install-libiberty install-bfd $(bfdlib) : INSTALLCMD = install-libiberty install-bfd
# Building targets libbfd + libiberty. HOST==TARGET, i.e not # Building targets libbfd + libiberty. HOST==TARGET, i.e not
# for a cross env. # for a cross env.
$(bfdmakes) : CONFIG = --target=$(TARGET) \ $(bfdmakes) : CONFIG = --target=$(TARGET) \
--host=$(TARGET) --build=$(BUILD) \ --host=$(TARGET) --build=$(BUILD) \
--prefix=$(TARGETDIR) \ --prefix=$(TARGETDIR) \
--with-sysroot=$(SYSROOT) \ --with-sysroot=$(SYSROOT) \
$(LIBDIRS) $(LIBDIRS)
$(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-) $(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
########################################################################################## ##########################################################################################
$(gcc) \ $(gcc) \
$(binutils) \ $(binutils) \
$(gmp) \ $(gmp) \
$(mpfr) \ $(mpfr) \
$(mpc) \ $(mpc) \
$(bfdmakes) \ $(bfdmakes) \
$(ccache) : ENVS += $(TOOLS) $(ccache) : ENVS += $(TOOLS)
# libdir to work around hateful bfd stuff installing into wrong dirs... # libdir to work around hateful bfd stuff installing into wrong dirs...
# ensure we have 64 bit bfd support in the HOST library. I.e our # ensure we have 64 bit bfd support in the HOST library. I.e our
# compiler on i686 will know 64 bit symbols, BUT later # compiler on i686 will know 64 bit symbols, BUT later
# we build just the libs again for TARGET, then with whatever the arch # we build just the libs again for TARGET, then with whatever the arch
# wants. # wants.
$(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS)) $(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
# Makefile creation. Simply run configure in build dir. # Makefile creation. Simply run configure in build dir.
$(bfdmakes) \ $(bfdmakes) \
$(BUILDDIR)/$(binutils_ver)/Makefile \ $(BUILDDIR)/$(binutils_ver)/Makefile \
: $(BINUTILS_CFG) : $(BINUTILS_CFG)
$(info Configuring $@. Log in $(@D)/log.config) $(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D) @mkdir -p $(@D)
( \ ( \
cd $(@D) ; \ cd $(@D) ; \
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
$(BINUTILS_CFG) \ $(BINUTILS_CFG) \
$(CONFIG) \ $(CONFIG) \
--with-sysroot=$(SYSROOT) \ --with-sysroot=$(SYSROOT) \
--disable-nls \ --disable-nls \
--program-prefix=$(TARGET)- \ --program-prefix=$(TARGET)- \
--enable-multilib \ --enable-multilib \
) > $(@D)/log.config 2>&1 ) > $(@D)/log.config 2>&1
@echo 'done' @echo 'done'
$(BUILDDIR)/$(mpfr_ver)/Makefile \ $(BUILDDIR)/$(mpfr_ver)/Makefile \
: $(MPFR_CFG) : $(MPFR_CFG)
$(info Configuring $@. Log in $(@D)/log.config) $(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D) @mkdir -p $(@D)
( \ ( \
cd $(@D) ; \ cd $(@D) ; \
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
$(MPFR_CFG) \ $(MPFR_CFG) \
$(CONFIG) \ $(CONFIG) \
--program-prefix=$(TARGET)- \ --program-prefix=$(TARGET)- \
--enable-shared=no \ --enable-shared=no \
--with-gmp=$(PREFIX) \ --with-gmp=$(PREFIX) \
) > $(@D)/log.config 2>&1 ) > $(@D)/log.config 2>&1
@echo 'done' @echo 'done'
$(BUILDDIR)/$(gmp_ver)/Makefile \ $(BUILDDIR)/$(gmp_ver)/Makefile \
: $(GMP_CFG) : $(GMP_CFG)
$(info Configuring $@. Log in $(@D)/log.config) $(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D) @mkdir -p $(@D)
( \ ( \
cd $(@D) ; \ cd $(@D) ; \
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
$(GMP_CFG) \ $(GMP_CFG) \
--host=$(HOST) --build=$(BUILD) \ --host=$(HOST) --build=$(BUILD) \
--prefix=$(PREFIX) \ --prefix=$(PREFIX) \
--disable-nls \ --disable-nls \
--program-prefix=$(TARGET)- \ --program-prefix=$(TARGET)- \
--enable-shared=no \ --enable-shared=no \
--with-mpfr=$(PREFIX) \ --with-mpfr=$(PREFIX) \
) > $(@D)/log.config 2>&1 ) > $(@D)/log.config 2>&1
@echo 'done' @echo 'done'
$(BUILDDIR)/$(mpc_ver)/Makefile \ $(BUILDDIR)/$(mpc_ver)/Makefile \
: $(MPC_CFG) : $(MPC_CFG)
$(info Configuring $@. Log in $(@D)/log.config) $(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D) @mkdir -p $(@D)
( \ ( \
cd $(@D) ; \ cd $(@D) ; \
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
$(MPC_CFG) \ $(MPC_CFG) \
$(CONFIG) \ $(CONFIG) \
--program-prefix=$(TARGET)- \ --program-prefix=$(TARGET)- \
--enable-shared=no \ --enable-shared=no \
--with-mpfr=$(PREFIX) \ --with-mpfr=$(PREFIX) \
--with-gmp=$(PREFIX) \ --with-gmp=$(PREFIX) \
) > $(@D)/log.config 2>&1 ) > $(@D)/log.config 2>&1
@echo 'done' @echo 'done'
# Only valid if glibc target -> linux # Only valid if glibc target -> linux
# proper destructor handling for c++ # proper destructor handling for c++
ifneq (,$(findstring linux,$(TARGET))) ifneq (,$(findstring linux,$(TARGET)))
$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit $(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
endif endif
# Want: # Want:
# c,c++ # c,c++
# shared libs # shared libs
# multilib (-m32/-m64 on x64) # multilib (-m32/-m64 on x64)
# skip native language. # skip native language.
# and link and assemble with the binutils we created # and link and assemble with the binutils we created
# earlier, so --with-gnu* # earlier, so --with-gnu*
$(BUILDDIR)/$(gcc_ver)/Makefile \ $(BUILDDIR)/$(gcc_ver)/Makefile \
: $(GCC_CFG) : $(GCC_CFG)
$(info Configuring $@. Log in $(@D)/log.config) $(info Configuring $@. Log in $(@D)/log.config)
mkdir -p $(@D) mkdir -p $(@D)
( \ ( \
cd $(@D) ; \ cd $(@D) ; \
$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \ $(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
$(CONFIG) \ $(CONFIG) \
--with-sysroot=$(SYSROOT) \ --with-sysroot=$(SYSROOT) \
--enable-languages=c,c++ \ --enable-languages=c,c++ \
--enable-shared \ --enable-shared \
--enable-multilib \ --enable-multilib \
--disable-nls \ --disable-nls \
--with-gnu-as \ --with-gnu-as \
--with-gnu-ld \ --with-gnu-ld \
--with-mpfr=$(PREFIX) \ --with-mpfr=$(PREFIX) \
--with-gmp=$(PREFIX) \ --with-gmp=$(PREFIX) \
--with-mpc=$(PREFIX) \ --with-mpc=$(PREFIX) \
) > $(@D)/log.config 2>&1 ) > $(@D)/log.config 2>&1
@echo 'done' @echo 'done'
# need binutils for gcc # need binutils for gcc
$(gcc) : $(binutils) $(gcc) : $(binutils)
# as of 4.3 or so need these for doing config # as of 4.3 or so need these for doing config
$(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc) $(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
$(mpfr) : $(gmp) $(mpfr) : $(gmp)
$(mpc) : $(gmp) $(mpfr) $(mpc) : $(gmp) $(mpfr)
########################################################################################## ##########################################################################################
# very straightforward. just build a ccache. it is only for host. # very straightforward. just build a ccache. it is only for host.
$(BUILDDIR)/$(ccache_ver)/Makefile \ $(BUILDDIR)/$(ccache_ver)/Makefile \
: $(CCACHE_CFG) : $(CCACHE_CFG)
$(info Configuring $@. Log in $(@D)/log.config) $(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D) @mkdir -p $(@D)
@( \ @( \
cd $(@D) ; \ cd $(@D) ; \
$(PATHPRE) $(ENVS) $(CCACHE_CFG) \ $(PATHPRE) $(ENVS) $(CCACHE_CFG) \
$(CONFIG) \ $(CONFIG) \
) > $(@D)/log.config 2>&1 ) > $(@D)/log.config 2>&1
@echo 'done' @echo 'done'
gccpatch = $(TARGETDIR)/gcc-patched gccpatch = $(TARGETDIR)/gcc-patched
########################################################################################## ##########################################################################################
# For some reason cpp is not created as a target-compiler # For some reason cpp is not created as a target-compiler
ifeq ($(HOST),$(TARGET)) ifeq ($(HOST),$(TARGET))
$(gccpatch) : $(gcc) link_libs $(gccpatch) : $(gcc) link_libs
@echo -n 'Creating compiler symlinks...' @echo -n 'Creating compiler symlinks...'
@for f in cpp; do \ @for f in cpp; do \
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ];\ if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
then \ then \
cd $(PREFIX)/bin && \ cd $(PREFIX)/bin && \
ln -s $$f $(TARGET)-$$f ; \ ln -s $$f $(TARGET)-$$f ; \
fi \ fi \
done done
@touch $@ @touch $@
@echo 'done' @echo 'done'
########################################################################################## ##########################################################################################
# Ugly at best. Seems that when we compile host->host compiler, that are NOT # Ugly at best. Seems that when we compile host->host compiler, that are NOT
# the BUILD compiler, the result will not try searching for libs in package root. # the BUILD compiler, the result will not try searching for libs in package root.
# "Solve" this by create links from the target libdirs to where they are. # "Solve" this by create links from the target libdirs to where they are.
link_libs: link_libs:
@echo -n 'Creating library symlinks...' @echo -n 'Creating library symlinks...'
@$(foreach l,$(LIBDIRS), \ @$(foreach l,$(LIBDIRS), \
for f in `cd $(PREFIX)/$(l) && ls`; do \ for f in `cd $(PREFIX)/$(l) && ls`; do \
if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \ if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
mkdir -p $(TARGETDIR)/$(l) && \ mkdir -p $(TARGETDIR)/$(l) && \
cd $(TARGETDIR)/$(l)/ && \ cd $(TARGETDIR)/$(l)/ && \
ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \ ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
fi \ fi \
done;) done;)
@echo 'done' @echo 'done'
else else
$(gccpatch) : $(gccpatch) :
@echo 'done' @echo 'done'
endif endif
########################################################################################## ##########################################################################################
# Build in two steps. # Build in two steps.
# make <default> # make <default>
# make install. # make install.
# Use path to our build hosts cross tools # Use path to our build hosts cross tools
# Always need to build cross tools for build host self. # Always need to build cross tools for build host self.
$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile $(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
$(info Building $(basename $@). Log in $(<D)/log.build) $(info Building $(basename $@). Log in $(<D)/log.build)
$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1 $(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
@echo -n 'installing...' @echo -n 'installing...'
$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1 $(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
@touch $@ @touch $@
@echo 'done' @echo 'done'
########################################################################################## ##########################################################################################
bfdlib : $(bfdlib) bfdlib : $(bfdlib)
binutils : $(binutils) binutils : $(binutils)
rpms : $(rpms) rpms : $(rpms)
libs : $(libs) libs : $(libs)
sysroot : rpms libs sysroot : rpms libs
gcc : sysroot $(gcc) $(gccpatch) gcc : sysroot $(gcc) $(gccpatch)
all : binutils gcc bfdlib all : binutils gcc bfdlib
# this is only built for host. so separate. # this is only built for host. so separate.
ccache : $(ccache) ccache : $(ccache)
.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot .PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot

View File

@ -24,49 +24,49 @@
# #
# EXCLUDE_PKGS is the list of packages to exclude from the # EXCLUDE_PKGS is the list of packages to exclude from the
# Java API Specification. Do not add these to CORE_PKGS. # Java API Specification. Do not add these to CORE_PKGS.
# The concatenation of EXCLUDE_PKGS and CORE_PKGS # The concatenation of EXCLUDE_PKGS and CORE_PKGS
# should make up the list of all packages under the # should make up the list of all packages under the
# src/shared/classes directory of the JDK source tree. # src/shared/classes directory of the JDK source tree.
# #
EXCLUDE_PKGS = \ EXCLUDE_PKGS = \
java.awt.peer \ java.awt.peer \
java.awt.dnd.peer \ java.awt.dnd.peer \
sun.* \ sun.* \
com.sun.* \ com.sun.* \
org.apache.* \ org.apache.* \
org.jcp.* \ org.jcp.* \
org.w3c.dom.css \ org.w3c.dom.css \
org.w3c.dom.html \ org.w3c.dom.html \
org.w3c.dom.stylesheets \ org.w3c.dom.stylesheets \
org.w3c.dom.traversal \ org.w3c.dom.traversal \
org.w3c.dom.ranges \ org.w3c.dom.ranges \
org.w3c.dom.views \ org.w3c.dom.views \
org.omg.stub.javax.management.remote.rmi org.omg.stub.javax.management.remote.rmi
# #
# ACTIVE_JSR_PKGS are packages that are part of an active JSR process-- # ACTIVE_JSR_PKGS are packages that are part of an active JSR process--
# one that is doing its own review. These packages are not included when # one that is doing its own review. These packages are not included when
# creating diff pages for the platform's JCP process. # creating diff pages for the platform's JCP process.
# #
# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs) # (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
# Note: # Note:
# This is a list of regular expressions. So foo.* matches "foo" and "foo.bar". # This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
# #
ACTIVE_JSR_PKGS= \ ACTIVE_JSR_PKGS= \
java.lang.invoke \ java.lang.invoke \
java.sql \ java.sql \
javax.activation \ javax.activation \
javax.annotation.* \ javax.annotation.* \
javax.jws.* \ javax.jws.* \
javax.lang.* \ javax.lang.* \
javax.management.* \ javax.management.* \
javax.script \ javax.script \
javax.sql.* \ javax.sql.* \
javax.tools.* \ javax.tools.* \
javax.xml.* \ javax.xml.* \
org.w3c.* \ org.w3c.* \
org.xml.sax org.xml.sax
# #
# CORE_PKGS is the list of packages that form the # CORE_PKGS is the list of packages that form the
@ -77,224 +77,224 @@ ACTIVE_JSR_PKGS= \
### determines which table the packages go in on the main page. ### determines which table the packages go in on the main page.
### Currently, there is only table ("Platform Packages") and ### Currently, there is only table ("Platform Packages") and
### everything goes in it, so REGEXP is "*". But if that policy ### everything goes in it, so REGEXP is "*". But if that policy
### changes, packages added will need to be reflected in that ### changes, packages added will need to be reflected in that
### list of wildcard expressions, as well. ### list of wildcard expressions, as well.
### ###
CORE_PKGS = \ CORE_PKGS = \
java.applet \ java.applet \
java.awt \ java.awt \
java.awt.color \ java.awt.color \
java.awt.datatransfer \ java.awt.datatransfer \
java.awt.dnd \ java.awt.dnd \
java.awt.event \ java.awt.event \
java.awt.font \ java.awt.font \
java.awt.geom \ java.awt.geom \
java.awt.im \ java.awt.im \
java.awt.im.spi \ java.awt.im.spi \
java.awt.image \ java.awt.image \
java.awt.image.renderable \ java.awt.image.renderable \
java.awt.print \ java.awt.print \
java.beans \ java.beans \
java.beans.beancontext \ java.beans.beancontext \
java.io \ java.io \
java.lang \ java.lang \
java.lang.annotation \ java.lang.annotation \
java.lang.instrument \ java.lang.instrument \
java.lang.invoke \ java.lang.invoke \
java.lang.management \ java.lang.management \
java.lang.ref \ java.lang.ref \
java.lang.reflect \ java.lang.reflect \
java.math \ java.math \
java.net \ java.net \
java.nio \ java.nio \
java.nio.channels \ java.nio.channels \
java.nio.channels.spi \ java.nio.channels.spi \
java.nio.charset \ java.nio.charset \
java.nio.charset.spi \ java.nio.charset.spi \
java.nio.file \ java.nio.file \
java.nio.file.attribute \ java.nio.file.attribute \
java.nio.file.spi \ java.nio.file.spi \
java.rmi \ java.rmi \
java.rmi.activation \ java.rmi.activation \
java.rmi.dgc \ java.rmi.dgc \
java.rmi.registry \ java.rmi.registry \
java.rmi.server \ java.rmi.server \
java.security \ java.security \
java.security.acl \ java.security.acl \
java.security.cert \ java.security.cert \
java.security.interfaces \ java.security.interfaces \
java.security.spec \ java.security.spec \
java.sql \ java.sql \
java.text \ java.text \
java.text.spi \ java.text.spi \
java.time \ java.time \
java.time.chrono \ java.time.chrono \
java.time.format \ java.time.format \
java.time.temporal \ java.time.temporal \
java.time.zone \ java.time.zone \
java.util \ java.util \
java.util.concurrent \ java.util.concurrent \
java.util.concurrent.atomic \ java.util.concurrent.atomic \
java.util.concurrent.locks \ java.util.concurrent.locks \
java.util.function \ java.util.function \
java.util.jar \ java.util.jar \
java.util.logging \ java.util.logging \
java.util.prefs \ java.util.prefs \
java.util.regex \ java.util.regex \
java.util.spi \ java.util.spi \
java.util.stream \ java.util.stream \
java.util.zip \ java.util.zip \
javax.accessibility \ javax.accessibility \
javax.activation \ javax.activation \
javax.activity \ javax.activity \
javax.annotation \ javax.annotation \
javax.annotation.processing \ javax.annotation.processing \
javax.crypto \ javax.crypto \
javax.crypto.interfaces \ javax.crypto.interfaces \
javax.crypto.spec \ javax.crypto.spec \
javax.imageio \ javax.imageio \
javax.imageio.event \ javax.imageio.event \
javax.imageio.metadata \ javax.imageio.metadata \
javax.imageio.plugins.jpeg \ javax.imageio.plugins.jpeg \
javax.imageio.plugins.bmp \ javax.imageio.plugins.bmp \
javax.imageio.spi \ javax.imageio.spi \
javax.imageio.stream \ javax.imageio.stream \
javax.jws \ javax.jws \
javax.jws.soap \ javax.jws.soap \
javax.lang.model \ javax.lang.model \
javax.lang.model.element \ javax.lang.model.element \
javax.lang.model.type \ javax.lang.model.type \
javax.lang.model.util \ javax.lang.model.util \
javax.management \ javax.management \
javax.management.loading \ javax.management.loading \
javax.management.monitor \ javax.management.monitor \
javax.management.relation \ javax.management.relation \
javax.management.openmbean \ javax.management.openmbean \
javax.management.timer \ javax.management.timer \
javax.management.modelmbean \ javax.management.modelmbean \
javax.management.remote \ javax.management.remote \
javax.management.remote.rmi \ javax.management.remote.rmi \
javax.naming \ javax.naming \
javax.naming.directory \ javax.naming.directory \
javax.naming.event \ javax.naming.event \
javax.naming.ldap \ javax.naming.ldap \
javax.naming.spi \ javax.naming.spi \
javax.net \ javax.net \
javax.net.ssl \ javax.net.ssl \
javax.print \ javax.print \
javax.print.attribute \ javax.print.attribute \
javax.print.attribute.standard \ javax.print.attribute.standard \
javax.print.event \ javax.print.event \
javax.rmi \ javax.rmi \
javax.rmi.CORBA \ javax.rmi.CORBA \
javax.rmi.ssl \ javax.rmi.ssl \
javax.script \ javax.script \
javax.security.auth \ javax.security.auth \
javax.security.auth.callback \ javax.security.auth.callback \
javax.security.auth.kerberos \ javax.security.auth.kerberos \
javax.security.auth.login \ javax.security.auth.login \
javax.security.auth.spi \ javax.security.auth.spi \
javax.security.auth.x500 \ javax.security.auth.x500 \
javax.security.cert \ javax.security.cert \
javax.security.sasl \ javax.security.sasl \
javax.sound.sampled \ javax.sound.sampled \
javax.sound.sampled.spi \ javax.sound.sampled.spi \
javax.sound.midi \ javax.sound.midi \
javax.sound.midi.spi \ javax.sound.midi.spi \
javax.sql \ javax.sql \
javax.sql.rowset \ javax.sql.rowset \
javax.sql.rowset.serial \ javax.sql.rowset.serial \
javax.sql.rowset.spi \ javax.sql.rowset.spi \
javax.swing \ javax.swing \
javax.swing.border \ javax.swing.border \
javax.swing.colorchooser \ javax.swing.colorchooser \
javax.swing.filechooser \ javax.swing.filechooser \
javax.swing.event \ javax.swing.event \
javax.swing.table \ javax.swing.table \
javax.swing.text \ javax.swing.text \
javax.swing.text.html \ javax.swing.text.html \
javax.swing.text.html.parser \ javax.swing.text.html.parser \
javax.swing.text.rtf \ javax.swing.text.rtf \
javax.swing.tree \ javax.swing.tree \
javax.swing.undo \ javax.swing.undo \
javax.swing.plaf \ javax.swing.plaf \
javax.swing.plaf.basic \ javax.swing.plaf.basic \
javax.swing.plaf.metal \ javax.swing.plaf.metal \
javax.swing.plaf.multi \ javax.swing.plaf.multi \
javax.swing.plaf.nimbus \ javax.swing.plaf.nimbus \
javax.swing.plaf.synth \ javax.swing.plaf.synth \
javax.tools \ javax.tools \
javax.tools.annotation \ javax.tools.annotation \
javax.transaction \ javax.transaction \
javax.transaction.xa \ javax.transaction.xa \
javax.xml.parsers \ javax.xml.parsers \
javax.xml.bind \ javax.xml.bind \
javax.xml.bind.annotation \ javax.xml.bind.annotation \
javax.xml.bind.annotation.adapters \ javax.xml.bind.annotation.adapters \
javax.xml.bind.attachment \ javax.xml.bind.attachment \
javax.xml.bind.helpers \ javax.xml.bind.helpers \
javax.xml.bind.util \ javax.xml.bind.util \
javax.xml.soap \ javax.xml.soap \
javax.xml.ws \ javax.xml.ws \
javax.xml.ws.handler \ javax.xml.ws.handler \
javax.xml.ws.handler.soap \ javax.xml.ws.handler.soap \
javax.xml.ws.http \ javax.xml.ws.http \
javax.xml.ws.soap \ javax.xml.ws.soap \
javax.xml.ws.spi \ javax.xml.ws.spi \
javax.xml.ws.spi.http \ javax.xml.ws.spi.http \
javax.xml.ws.wsaddressing \ javax.xml.ws.wsaddressing \
javax.xml.transform \ javax.xml.transform \
javax.xml.transform.sax \ javax.xml.transform.sax \
javax.xml.transform.dom \ javax.xml.transform.dom \
javax.xml.transform.stax \ javax.xml.transform.stax \
javax.xml.transform.stream \ javax.xml.transform.stream \
javax.xml \ javax.xml \
javax.xml.crypto \ javax.xml.crypto \
javax.xml.crypto.dom \ javax.xml.crypto.dom \
javax.xml.crypto.dsig \ javax.xml.crypto.dsig \
javax.xml.crypto.dsig.dom \ javax.xml.crypto.dsig.dom \
javax.xml.crypto.dsig.keyinfo \ javax.xml.crypto.dsig.keyinfo \
javax.xml.crypto.dsig.spec \ javax.xml.crypto.dsig.spec \
javax.xml.datatype \ javax.xml.datatype \
javax.xml.validation \ javax.xml.validation \
javax.xml.namespace \ javax.xml.namespace \
javax.xml.xpath \ javax.xml.xpath \
javax.xml.stream \ javax.xml.stream \
javax.xml.stream.events \ javax.xml.stream.events \
javax.xml.stream.util \ javax.xml.stream.util \
org.ietf.jgss \ org.ietf.jgss \
org.omg.CORBA \ org.omg.CORBA \
org.omg.CORBA.DynAnyPackage \ org.omg.CORBA.DynAnyPackage \
org.omg.CORBA.ORBPackage \ org.omg.CORBA.ORBPackage \
org.omg.CORBA.TypeCodePackage \ org.omg.CORBA.TypeCodePackage \
org.omg.stub.java.rmi \ org.omg.stub.java.rmi \
org.omg.CORBA.portable \ org.omg.CORBA.portable \
org.omg.CORBA_2_3 \ org.omg.CORBA_2_3 \
org.omg.CORBA_2_3.portable \ org.omg.CORBA_2_3.portable \
org.omg.CosNaming \ org.omg.CosNaming \
org.omg.CosNaming.NamingContextExtPackage \ org.omg.CosNaming.NamingContextExtPackage \
org.omg.CosNaming.NamingContextPackage \ org.omg.CosNaming.NamingContextPackage \
org.omg.SendingContext \ org.omg.SendingContext \
org.omg.PortableServer \ org.omg.PortableServer \
org.omg.PortableServer.CurrentPackage \ org.omg.PortableServer.CurrentPackage \
org.omg.PortableServer.POAPackage \ org.omg.PortableServer.POAPackage \
org.omg.PortableServer.POAManagerPackage \ org.omg.PortableServer.POAManagerPackage \
org.omg.PortableServer.ServantLocatorPackage \ org.omg.PortableServer.ServantLocatorPackage \
org.omg.PortableServer.portable \ org.omg.PortableServer.portable \
org.omg.PortableInterceptor \ org.omg.PortableInterceptor \
org.omg.PortableInterceptor.ORBInitInfoPackage \ org.omg.PortableInterceptor.ORBInitInfoPackage \
org.omg.Messaging \ org.omg.Messaging \
org.omg.IOP \ org.omg.IOP \
org.omg.IOP.CodecFactoryPackage \ org.omg.IOP.CodecFactoryPackage \
org.omg.IOP.CodecPackage \ org.omg.IOP.CodecPackage \
org.omg.Dynamic \ org.omg.Dynamic \
org.omg.DynamicAny \ org.omg.DynamicAny \
org.omg.DynamicAny.DynAnyPackage \ org.omg.DynamicAny.DynAnyPackage \
org.omg.DynamicAny.DynAnyFactoryPackage \ org.omg.DynamicAny.DynAnyFactoryPackage \
org.w3c.dom \ org.w3c.dom \
org.w3c.dom.events \ org.w3c.dom.events \
org.w3c.dom.bootstrap \ org.w3c.dom.bootstrap \
org.w3c.dom.ls \ org.w3c.dom.ls \
org.xml.sax \ org.xml.sax \
org.xml.sax.ext \ org.xml.sax.ext \
org.xml.sax.helpers org.xml.sax.helpers

File diff suppressed because it is too large Load Diff

View File

@ -24,87 +24,87 @@
# #
# #
# This file contains the package names of all the "non-core" # This file contains the package names of all the "non-core"
# API published in the Java 2 SDK documentation. "Non-core" means # API published in the Java 2 SDK documentation. "Non-core" means
# it includes all published API outside of the JDK API specification. # it includes all published API outside of the JDK API specification.
# #
# These environment variables are used by javadoc in # These environment variables are used by javadoc in
# make/docs/Makefile and are referenced by the localization # make/docs/Makefile and are referenced by the localization
# team when determining which APIs to extract javadoc # team when determining which APIs to extract javadoc
# comments from. # comments from.
DOMAPI_PKGS = com.sun.java.browser.dom \ DOMAPI_PKGS = com.sun.java.browser.dom \
org.w3c.dom \ org.w3c.dom \
org.w3c.dom.bootstrap \ org.w3c.dom.bootstrap \
org.w3c.dom.ls \ org.w3c.dom.ls \
org.w3c.dom.ranges \ org.w3c.dom.ranges \
org.w3c.dom.traversal \ org.w3c.dom.traversal \
org.w3c.dom.html \ org.w3c.dom.html \
org.w3c.dom.stylesheets \ org.w3c.dom.stylesheets \
org.w3c.dom.css \ org.w3c.dom.css \
org.w3c.dom.events \ org.w3c.dom.events \
org.w3c.dom.views org.w3c.dom.views
JDI_PKGS = com.sun.jdi \ JDI_PKGS = com.sun.jdi \
com.sun.jdi.event \ com.sun.jdi.event \
com.sun.jdi.request \ com.sun.jdi.request \
com.sun.jdi.connect \ com.sun.jdi.connect \
com.sun.jdi.connect.spi com.sun.jdi.connect.spi
MGMT_PKGS = com.sun.management MGMT_PKGS = com.sun.management
JAAS_PKGS = com.sun.security.auth \ JAAS_PKGS = com.sun.security.auth \
com.sun.security.auth.callback \ com.sun.security.auth.callback \
com.sun.security.auth.login \ com.sun.security.auth.login \
com.sun.security.auth.module com.sun.security.auth.module
JGSS_PKGS = com.sun.security.jgss JGSS_PKGS = com.sun.security.jgss
OLD_JSSE_PKGS = com.sun.net.ssl OLD_JSSE_PKGS = com.sun.net.ssl
HTTPSERVER_PKGS = com.sun.net.httpserver \ HTTPSERVER_PKGS = com.sun.net.httpserver \
com.sun.net.httpserver.spi com.sun.net.httpserver.spi
NIO_PKGS = com.sun.nio.file NIO_PKGS = com.sun.nio.file
DOCLETAPI_PKGS = com.sun.javadoc DOCLETAPI_PKGS = com.sun.javadoc
TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java
TAGLETAPI_PKGS = com.sun.tools.doclets TAGLETAPI_PKGS = com.sun.tools.doclets
ATTACH_PKGS = com.sun.tools.attach \ ATTACH_PKGS = com.sun.tools.attach \
com.sun.tools.attach.spi com.sun.tools.attach.spi
JCONSOLE_PKGS = com.sun.tools.jconsole JCONSOLE_PKGS = com.sun.tools.jconsole
TREEAPI_PKGS = com.sun.source.doctree \ TREEAPI_PKGS = com.sun.source.doctree \
com.sun.source.tree \ com.sun.source.tree \
com.sun.source.util \ com.sun.source.util \
jdk jdk
SMARTCARDIO_PKGS = javax.smartcardio SMARTCARDIO_PKGS = javax.smartcardio
SCTPAPI_PKGS = com.sun.nio.sctp SCTPAPI_PKGS = com.sun.nio.sctp
ifeq ($(PLATFORM), macosx) ifeq ($(PLATFORM), macosx)
APPLE_EXT_PKGS = com.apple.concurrent \ APPLE_EXT_PKGS = com.apple.concurrent \
com.apple.eawt \ com.apple.eawt \
com.apple.eawt.event \ com.apple.eawt.event \
com.apple.eio com.apple.eio
endif endif
JDK_PKGS = jdk JDK_PKGS = jdk
# non-core packages in rt.jar # non-core packages in rt.jar
NON_CORE_PKGS = $(DOMAPI_PKGS) \ NON_CORE_PKGS = $(DOMAPI_PKGS) \
$(MGMT_PKGS) \ $(MGMT_PKGS) \
$(JAAS_PKGS) \ $(JAAS_PKGS) \
$(JGSS_PKGS) \ $(JGSS_PKGS) \
$(NIO_PKGS) \ $(NIO_PKGS) \
$(OLD_JSSE_PKGS) \ $(OLD_JSSE_PKGS) \
$(HTTPSERVER_PKGS) \ $(HTTPSERVER_PKGS) \
$(SMARTCARDIO_PKGS) \ $(SMARTCARDIO_PKGS) \
$(SCTPAPI_PKGS) \ $(SCTPAPI_PKGS) \
$(APPLE_EXT_PKGS) \ $(APPLE_EXT_PKGS) \
$(JDK_PKGS) $(JDK_PKGS)

View File

@ -8,42 +8,42 @@
<body> <body>
<h3><a name="REGEXP"></a><br> <h3><a name="REGEXP"></a><br>
REGEXP</h3> REGEXP</h3>
<p> REGEXP is a list of wildcard patterns that determines which packages listed <p> REGEXP is a list of wildcard patterns that determines which packages listed
in CORE_PKGS.gmk go into which summary-table on the main API index page. It in CORE_PKGS.gmk go into which summary-table on the main API index page. It
was motivated by the need to divide the world into &quot;core packages&quot; was motivated by the need to divide the world into &quot;core packages&quot;
(java.*) and &quot;extension packages&quot; (javax.*). In time, the distinction (java.*) and &quot;extension packages&quot; (javax.*). In time, the distinction
went away. The whole table is now called &quot;Platform Packages&quot;--which went away. The whole table is now called &quot;Platform Packages&quot;--which
eliminated the need for this list of regular expressions. But it lingered on, eliminated the need for this list of regular expressions. But it lingered on,
accreting all of the packages in the JVM, one by one. I pruned it back to &quot;*&quot;, accreting all of the packages in the JVM, one by one. I pruned it back to &quot;*&quot;,
so it now covers every package in the Java platform API docs. If some separation so it now covers every package in the Java platform API docs. If some separation
is needed in the future, it can grow back into a colon-separated list, starting is needed in the future, it can grow back into a colon-separated list, starting
with this, which is in all respects equivalent to &quot;*&quot; at this point with this, which is in all respects equivalent to &quot;*&quot; at this point
in time:</p> in time:</p>
<blockquote> <blockquote>
<pre>REGEXP = &quot;java.*:javax.*:org.ietf*:org.omg.</pre> <pre>REGEXP = &quot;java.*:javax.*:org.ietf*:org.omg.</pre>
</blockquote> </blockquote>
<h3><a name="releaseTargets"></a><br> <h3><a name="releaseTargets"></a><br>
Release Targets</h3> Release Targets</h3>
<p> (Thanks to Kelly O'Hair for this info.)</p> <p> (Thanks to Kelly O'Hair for this info.)</p>
<p> The <tt>rel-coredocs</tt> and <tt>rel-docs</tt> targets were added by Eric <p> The <tt>rel-coredocs</tt> and <tt>rel-docs</tt> targets were added by Eric
Armstrong. <tt>rel-coredocs</tt> assumes the kind of large, 32-bit machine used Armstrong. <tt>rel-coredocs</tt> assumes the kind of large, 32-bit machine used
in the javapubs group's docs-release process. It specifies memory settings accordingly in the javapubs group's docs-release process. It specifies memory settings accordingly
to maximize performance.</p> to maximize performance.</p>
<p> The performance settings, like the sanity check, are most important for the <p> The performance settings, like the sanity check, are most important for the
core docs--the platform APIs. Running javadoc on those APIs takes a significant core docs--the platform APIs. Running javadoc on those APIs takes a significant
amount of time and memory. Setting the initial heap size as large as possible amount of time and memory. Setting the initial heap size as large as possible
is important to prevent thrashing as the heap grows. Setting the maximum as is important to prevent thrashing as the heap grows. Setting the maximum as
large as necessary is also important to keep the job from failing.</p> large as necessary is also important to keep the job from failing.</p>
<blockquote> <blockquote>
<p> <tt>-J-Xmx512</tt> sets a maximum of 512, which became necessary in 6.0<br> <p> <tt>-J-Xmx512</tt> sets a maximum of 512, which became necessary in 6.0<br>
<tt>-J-Xms256</tt> sets starting size to 256 (default is 8)</p> <tt>-J-Xms256</tt> sets starting size to 256 (default is 8)</p>
</blockquote> </blockquote>
<p> <tt>rel-coredocs</tt> also includes a sanity check to help ensure that <tt>BUILD_NUMBER</tt> <p> <tt>rel-coredocs</tt> also includes a sanity check to help ensure that <tt>BUILD_NUMBER</tt>
and <tt>MILESTONE</tt> are specified properly when docs are built outside of and <tt>MILESTONE</tt> are specified properly when docs are built outside of
the normal release engineering process, with the intention of releasing them the normal release engineering process, with the intention of releasing them
on the web or in a downloaded docs bundle. (When invoked in release engineering's on the web or in a downloaded docs bundle. (When invoked in release engineering's
control build, the values are always set properly. But when the targets are control build, the values are always set properly. But when the targets are
run by themselves, they default to b00 and &quot;internal&quot;--which silently run by themselves, they default to b00 and &quot;internal&quot;--which silently
sabotage the result of a build that can take many hours to complete.</p> sabotage the result of a build that can take many hours to complete.</p>
</body> </body>
</html> </html>