8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
This commit is contained in:
parent
3cb6eedf9f
commit
952d9ce87c
@ -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.
|
||||
ifeq (,$(findstring 3.81,$(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.)
|
||||
endif
|
||||
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.)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
else
|
||||
makefile_path:=$(lastword $(MAKEFILE_LIST))
|
||||
makefile_path:=$(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
root_dir:=$(dir $(makefile_path))
|
||||
|
||||
@ -58,27 +58,27 @@ $(eval $(call ParseConfAndSpec))
|
||||
|
||||
# Now determine if we have zero, one or several configurations to build.
|
||||
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
|
||||
ifeq ($(words $(SPEC)),1)
|
||||
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
|
||||
include $(root_dir)/common/makefiles/Main.gmk
|
||||
else
|
||||
# We are building multiple configurations.
|
||||
# First, find out the valid targets
|
||||
# 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.
|
||||
all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
|
||||
$(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
ifeq ($(words $(SPEC)),1)
|
||||
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
|
||||
include $(root_dir)/common/makefiles/Main.gmk
|
||||
else
|
||||
# We are building multiple configurations.
|
||||
# First, find out the valid targets
|
||||
# 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.
|
||||
all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
|
||||
$(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
|
||||
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
|
||||
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
|
||||
|
||||
.PHONY: $(all_phony_targets)
|
||||
.PHONY: $(all_phony_targets)
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Include this after a potential spec file has been included so that the bundles target
|
||||
|
@ -62,7 +62,7 @@ if test -e $custom_hook; then
|
||||
# We have custom sources available; also generate configure script
|
||||
# with custom hooks compiled in.
|
||||
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
|
||||
else
|
||||
echo No custom hook found: $custom_hook
|
||||
|
@ -24,23 +24,23 @@
|
||||
#
|
||||
|
||||
# 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.
|
||||
AC_DEFUN([ADD_JVM_ARG_IF_OK],
|
||||
[
|
||||
$ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
|
||||
OUTPUT=`$3 $1 -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
$2="[$]$2 $1"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
$ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
|
||||
OUTPUT=`$3 $1 -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
$2="[$]$2 $1"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
])
|
||||
|
||||
# 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.])
|
||||
fi
|
||||
|
||||
$1="`cd "$path"; $THEPWDCMD -L`"
|
||||
$1="`cd "$path"; $THEPWDCMD -L`"
|
||||
fi
|
||||
])
|
||||
|
||||
@ -129,78 +129,78 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
|
||||
new_path="$path"
|
||||
fi
|
||||
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
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])
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
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
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
|
||||
if test "x$complete" != "x$new_complete"; then
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
READLINK_TESTED=yes
|
||||
READLINK=
|
||||
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
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
READLINK_TESTED=yes
|
||||
READLINK=
|
||||
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
|
||||
@ -214,12 +214,12 @@ AC_DEFUN([BASIC_DEPRECATED_ARG_WITH],
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
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.
|
||||
@ -227,15 +227,15 @@ AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
|
||||
# $2: executable name to print in warning (optional)
|
||||
AC_DEFUN([BASIC_CHECK_NONEMPTY],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
if test "x$2" = x; then
|
||||
PROG_NAME=translit($1,A-Z,a-z)
|
||||
else
|
||||
PROG_NAME=$2
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find $PROG_NAME!])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
if test "x[$]$1" = x; then
|
||||
if test "x$2" = x; then
|
||||
PROG_NAME=translit($1,A-Z,a-z)
|
||||
else
|
||||
PROG_NAME=$2
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find $PROG_NAME!])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
])
|
||||
|
||||
# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
|
||||
@ -244,8 +244,8 @@ AC_DEFUN([BASIC_CHECK_NONEMPTY],
|
||||
# $2: executable name to look for
|
||||
AC_DEFUN([BASIC_REQUIRE_PROG],
|
||||
[
|
||||
AC_PATH_PROGS($1, $2)
|
||||
BASIC_CHECK_NONEMPTY($1, $2)
|
||||
AC_PATH_PROGS($1, $2)
|
||||
BASIC_CHECK_NONEMPTY($1, $2)
|
||||
])
|
||||
|
||||
# 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],
|
||||
[
|
||||
|
||||
# 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
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
# 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
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
|
||||
# First are all the simple required tools.
|
||||
BASIC_REQUIRE_PROG(BASENAME, basename)
|
||||
BASIC_REQUIRE_PROG(BASH, bash)
|
||||
BASIC_REQUIRE_PROG(CAT, cat)
|
||||
BASIC_REQUIRE_PROG(CHMOD, chmod)
|
||||
BASIC_REQUIRE_PROG(CMP, cmp)
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
BASIC_REQUIRE_PROG(CP, cp)
|
||||
BASIC_REQUIRE_PROG(CPIO, cpio)
|
||||
BASIC_REQUIRE_PROG(CUT, cut)
|
||||
BASIC_REQUIRE_PROG(DATE, date)
|
||||
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
|
||||
BASIC_REQUIRE_PROG(DIRNAME, dirname)
|
||||
BASIC_REQUIRE_PROG(ECHO, echo)
|
||||
BASIC_REQUIRE_PROG(EXPR, expr)
|
||||
BASIC_REQUIRE_PROG(FILE, file)
|
||||
BASIC_REQUIRE_PROG(FIND, find)
|
||||
BASIC_REQUIRE_PROG(HEAD, head)
|
||||
BASIC_REQUIRE_PROG(LN, ln)
|
||||
BASIC_REQUIRE_PROG(LS, ls)
|
||||
BASIC_REQUIRE_PROG(MKDIR, mkdir)
|
||||
BASIC_REQUIRE_PROG(MKTEMP, mktemp)
|
||||
BASIC_REQUIRE_PROG(MV, mv)
|
||||
BASIC_REQUIRE_PROG(PRINTF, printf)
|
||||
BASIC_REQUIRE_PROG(RM, rm)
|
||||
BASIC_REQUIRE_PROG(SH, sh)
|
||||
BASIC_REQUIRE_PROG(SORT, sort)
|
||||
BASIC_REQUIRE_PROG(TAIL, tail)
|
||||
BASIC_REQUIRE_PROG(TAR, tar)
|
||||
BASIC_REQUIRE_PROG(TEE, tee)
|
||||
BASIC_REQUIRE_PROG(TOUCH, touch)
|
||||
BASIC_REQUIRE_PROG(TR, tr)
|
||||
BASIC_REQUIRE_PROG(UNAME, uname)
|
||||
BASIC_REQUIRE_PROG(UNIQ, uniq)
|
||||
BASIC_REQUIRE_PROG(WC, wc)
|
||||
BASIC_REQUIRE_PROG(WHICH, which)
|
||||
BASIC_REQUIRE_PROG(XARGS, xargs)
|
||||
# First are all the simple required tools.
|
||||
BASIC_REQUIRE_PROG(BASENAME, basename)
|
||||
BASIC_REQUIRE_PROG(BASH, bash)
|
||||
BASIC_REQUIRE_PROG(CAT, cat)
|
||||
BASIC_REQUIRE_PROG(CHMOD, chmod)
|
||||
BASIC_REQUIRE_PROG(CMP, cmp)
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
BASIC_REQUIRE_PROG(CP, cp)
|
||||
BASIC_REQUIRE_PROG(CPIO, cpio)
|
||||
BASIC_REQUIRE_PROG(CUT, cut)
|
||||
BASIC_REQUIRE_PROG(DATE, date)
|
||||
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
|
||||
BASIC_REQUIRE_PROG(DIRNAME, dirname)
|
||||
BASIC_REQUIRE_PROG(ECHO, echo)
|
||||
BASIC_REQUIRE_PROG(EXPR, expr)
|
||||
BASIC_REQUIRE_PROG(FILE, file)
|
||||
BASIC_REQUIRE_PROG(FIND, find)
|
||||
BASIC_REQUIRE_PROG(HEAD, head)
|
||||
BASIC_REQUIRE_PROG(LN, ln)
|
||||
BASIC_REQUIRE_PROG(LS, ls)
|
||||
BASIC_REQUIRE_PROG(MKDIR, mkdir)
|
||||
BASIC_REQUIRE_PROG(MKTEMP, mktemp)
|
||||
BASIC_REQUIRE_PROG(MV, mv)
|
||||
BASIC_REQUIRE_PROG(PRINTF, printf)
|
||||
BASIC_REQUIRE_PROG(RM, rm)
|
||||
BASIC_REQUIRE_PROG(SH, sh)
|
||||
BASIC_REQUIRE_PROG(SORT, sort)
|
||||
BASIC_REQUIRE_PROG(TAIL, tail)
|
||||
BASIC_REQUIRE_PROG(TAR, tar)
|
||||
BASIC_REQUIRE_PROG(TEE, tee)
|
||||
BASIC_REQUIRE_PROG(TOUCH, touch)
|
||||
BASIC_REQUIRE_PROG(TR, tr)
|
||||
BASIC_REQUIRE_PROG(UNAME, uname)
|
||||
BASIC_REQUIRE_PROG(UNIQ, uniq)
|
||||
BASIC_REQUIRE_PROG(WC, wc)
|
||||
BASIC_REQUIRE_PROG(WHICH, which)
|
||||
BASIC_REQUIRE_PROG(XARGS, xargs)
|
||||
|
||||
# Then required tools that require some special treatment.
|
||||
AC_PROG_AWK
|
||||
BASIC_CHECK_NONEMPTY(AWK)
|
||||
AC_PROG_GREP
|
||||
BASIC_CHECK_NONEMPTY(GREP)
|
||||
AC_PROG_EGREP
|
||||
BASIC_CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
BASIC_CHECK_NONEMPTY(FGREP)
|
||||
AC_PROG_SED
|
||||
BASIC_CHECK_NONEMPTY(SED)
|
||||
# Then required tools that require some special treatment.
|
||||
AC_PROG_AWK
|
||||
BASIC_CHECK_NONEMPTY(AWK)
|
||||
AC_PROG_GREP
|
||||
BASIC_CHECK_NONEMPTY(GREP)
|
||||
AC_PROG_EGREP
|
||||
BASIC_CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
BASIC_CHECK_NONEMPTY(FGREP)
|
||||
AC_PROG_SED
|
||||
BASIC_CHECK_NONEMPTY(SED)
|
||||
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
BASIC_CHECK_NONEMPTY(NAWK)
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
BASIC_CHECK_NONEMPTY(NAWK)
|
||||
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
|
||||
# pwd behaves differently on various platforms and some don't support the -L flag.
|
||||
# Always use the bash builtin pwd to get uniform behavior.
|
||||
THEPWDCMD=pwd
|
||||
# pwd behaves differently on various platforms and some don't support the -L flag.
|
||||
# Always use the bash builtin pwd to get uniform behavior.
|
||||
THEPWDCMD=pwd
|
||||
|
||||
# These are not required on all platforms
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
AC_PATH_PROG(DF, df)
|
||||
AC_PATH_PROG(SETFILE, SetFile)
|
||||
# These are not required on all platforms
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
AC_PATH_PROG(DF, df)
|
||||
AC_PATH_PROG(SETFILE, SetFile)
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
|
||||
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`$THEPWDCMD -L`"
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`$THEPWDCMD -L`"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
BASIC_CHECK_PATHS_WINDOWS
|
||||
else
|
||||
PATH_SEP=":"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
BASIC_CHECK_PATHS_WINDOWS
|
||||
else
|
||||
PATH_SEP=":"
|
||||
fi
|
||||
|
||||
AC_SUBST(SRC_ROOT)
|
||||
AC_SUBST(PATH_SEP)
|
||||
cd "$CURDIR"
|
||||
AC_SUBST(SRC_ROOT)
|
||||
AC_SUBST(PATH_SEP)
|
||||
cd "$CURDIR"
|
||||
|
||||
BASIC_FIXUP_PATH(SRC_ROOT)
|
||||
BASIC_FIXUP_PATH(CURDIR)
|
||||
BASIC_FIXUP_PATH(SRC_ROOT)
|
||||
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...
|
||||
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
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[pass this sys-root to the compilers and tools (for cross-compiling)])])
|
||||
# You can force the sys-root if the sys-root encoded into the cross compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[pass this sys-root to the compilers and tools (for cross-compiling)])])
|
||||
|
||||
if test "x$with_sys_root" != x; then
|
||||
SYS_ROOT=$with_sys_root
|
||||
else
|
||||
SYS_ROOT=/
|
||||
fi
|
||||
AC_SUBST(SYS_ROOT)
|
||||
if test "x$with_sys_root" != x; then
|
||||
SYS_ROOT=$with_sys_root
|
||||
else
|
||||
SYS_ROOT=/
|
||||
fi
|
||||
AC_SUBST(SYS_ROOT)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[search this directory for compilers and tools (for cross-compiling)])],
|
||||
[TOOLS_DIR=$with_tools_dir]
|
||||
)
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[search this directory for compilers and tools (for cross-compiling)])],
|
||||
[TOOLS_DIR=$with_tools_dir]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
|
||||
[
|
||||
if test "x$with_sys_root" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
|
||||
fi
|
||||
BASIC_FIXUP_PATH([with_devkit])
|
||||
BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
|
||||
if test -d "$with_devkit/$host_alias/libc"; then
|
||||
SYS_ROOT=$with_devkit/$host_alias/libc
|
||||
elif test -d "$with_devkit/$host/sys-root"; then
|
||||
SYS_ROOT=$with_devkit/$host/sys-root
|
||||
fi
|
||||
])
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
|
||||
[
|
||||
if test "x$with_sys_root" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
|
||||
fi
|
||||
BASIC_FIXUP_PATH([with_devkit])
|
||||
BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
|
||||
if test -d "$with_devkit/$host_alias/libc"; then
|
||||
SYS_ROOT=$with_devkit/$host_alias/libc
|
||||
elif test -d "$with_devkit/$host/sys-root"; then
|
||||
SYS_ROOT=$with_devkit/$host/sys-root
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
|
||||
[ CONF_NAME=${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@:>@])],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# 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" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# 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" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
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
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
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
|
||||
else
|
||||
else
|
||||
# We are running configure from outside of the src dir.
|
||||
# Then use the current directory as output dir!
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
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
|
||||
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
|
||||
# other files
|
||||
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.
|
||||
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
|
||||
AC_MSG_NOTICE([Current directory is $CURDIR.])
|
||||
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])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
fi
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
|
||||
BASIC_FIXUP_PATH(OUTPUT_ROOT)
|
||||
BASIC_FIXUP_PATH(OUTPUT_ROOT)
|
||||
|
||||
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
|
||||
AC_SUBST(CONF_NAME, $CONF_NAME)
|
||||
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
|
||||
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
|
||||
AC_SUBST(CONF_NAME, $CONF_NAME)
|
||||
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
|
||||
|
||||
# Most of the probed defines are put into config.h
|
||||
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# Spec.sh is currently used by compare-objects.sh
|
||||
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.
|
||||
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
# Most of the probed defines are put into config.h
|
||||
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# Spec.sh is currently used by compare-objects.sh
|
||||
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.
|
||||
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
|
||||
# Save the arguments given to us
|
||||
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
|
||||
# Save the arguments given to us
|
||||
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
|
||||
[
|
||||
# Setup default logging of stdout and stderr to build.log in the output root.
|
||||
BUILD_LOG='$(OUTPUT_ROOT)/build.log'
|
||||
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
|
||||
BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
AC_SUBST(BUILD_LOG)
|
||||
AC_SUBST(BUILD_LOG_PREVIOUS)
|
||||
AC_SUBST(BUILD_LOG_WRAPPER)
|
||||
# Setup default logging of stdout and stderr to build.log in the output root.
|
||||
BUILD_LOG='$(OUTPUT_ROOT)/build.log'
|
||||
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
|
||||
BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
AC_SUBST(BUILD_LOG)
|
||||
AC_SUBST(BUILD_LOG_PREVIOUS)
|
||||
AC_SUBST(BUILD_LOG_WRAPPER)
|
||||
])
|
||||
|
||||
|
||||
@ -581,85 +581,85 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
|
||||
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
[
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -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`
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
rm $DELETEDIR/TestIfFindSupportsDelete
|
||||
FIND_DELETE="-exec rm \{\} \+"
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rmdir $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
rm $DELETEDIR/TestIfFindSupportsDelete
|
||||
FIND_DELETE="-exec rm \{\} \+"
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rmdir $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
])
|
||||
|
||||
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,
|
||||
# need hint on how to install them.
|
||||
BASIC_REQUIRE_PROG(UNZIP, unzip)
|
||||
BASIC_REQUIRE_PROG(ZIP, zip)
|
||||
# These tools might not be installed by default,
|
||||
# need hint on how to install them.
|
||||
BASIC_REQUIRE_PROG(UNZIP, unzip)
|
||||
BASIC_REQUIRE_PROG(ZIP, zip)
|
||||
|
||||
# Non-required basic tools
|
||||
# Non-required basic tools
|
||||
|
||||
AC_PATH_PROG(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
AC_PATH_PROG(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
# List shared lib dependencies is used for
|
||||
# debug output and checking for forbidden dependencies.
|
||||
# We can build without it.
|
||||
LDD="true"
|
||||
fi
|
||||
AC_PATH_PROG(OTOOL, otool)
|
||||
if test "x$OTOOL" = "x"; then
|
||||
OTOOL="true"
|
||||
fi
|
||||
AC_PATH_PROGS(READELF, [readelf greadelf])
|
||||
AC_PATH_PROG(HG, hg)
|
||||
AC_PATH_PROG(STAT, stat)
|
||||
AC_PATH_PROG(TIME, time)
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
IS_GNU_TIME=no
|
||||
fi
|
||||
AC_SUBST(IS_GNU_TIME)
|
||||
fi
|
||||
AC_PATH_PROG(OTOOL, otool)
|
||||
if test "x$OTOOL" = "x"; then
|
||||
OTOOL="true"
|
||||
fi
|
||||
AC_PATH_PROGS(READELF, [readelf greadelf])
|
||||
AC_PATH_PROG(HG, hg)
|
||||
AC_PATH_PROG(STAT, stat)
|
||||
AC_PATH_PROG(TIME, time)
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
IS_GNU_TIME=no
|
||||
fi
|
||||
AC_SUBST(IS_GNU_TIME)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
BASIC_REQUIRE_PROG(XATTR, xattr)
|
||||
AC_PATH_PROG(CODESIGN, codesign)
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Verify that the openjdk_codesign certificate is present
|
||||
AC_MSG_CHECKING([if openjdk_codesign certificate is present])
|
||||
rm -f codesign-testfile
|
||||
touch codesign-testfile
|
||||
codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
rm -f codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
BASIC_REQUIRE_PROG(XATTR, xattr)
|
||||
AC_PATH_PROG(CODESIGN, codesign)
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Verify that the openjdk_codesign certificate is present
|
||||
AC_MSG_CHECKING([if openjdk_codesign certificate is present])
|
||||
rm -f codesign-testfile
|
||||
touch codesign-testfile
|
||||
codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
rm -f codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# 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)
|
||||
AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if test "x$DF" = x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# 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_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_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
|
||||
|
||||
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.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUT_ROOT/spec.gmk; then
|
||||
IS_RECONFIGURE=yes
|
||||
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
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUT_ROOT/spec.gmk; then
|
||||
IS_RECONFIGURE=yes
|
||||
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
|
||||
])
|
||||
|
@ -145,7 +145,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
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
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
fi
|
||||
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
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
fi
|
||||
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.
|
||||
# Try adding .exe or .cmd
|
||||
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
|
||||
input_to_shortpath="${new_path}.cmd"
|
||||
input_to_shortpath="${new_path}.cmd"
|
||||
else
|
||||
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])
|
||||
@ -254,7 +254,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# Oops. Which didn't find the executable.
|
||||
# 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"
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# 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.])
|
||||
@ -302,7 +302,7 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
[
|
||||
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
|
||||
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
|
||||
|
||||
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])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
|
||||
CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
|
||||
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_ERROR([Cannot continue])
|
||||
fi
|
||||
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
|
||||
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
|
||||
@ -329,13 +329,13 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
|
||||
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
|
||||
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
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
@ -367,12 +367,12 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
[
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if fixpath can be created])
|
||||
FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
|
||||
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
|
||||
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
|
||||
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
|
||||
|
||||
|
||||
FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
|
||||
fi
|
||||
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
|
||||
cd $CURDIR
|
||||
|
||||
if test ! -x $OUTPUT_ROOT/fixpath.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
|
||||
if test ! -x $OUTPUT_ROOT/fixpath.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
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
|
||||
if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(FIXPATH)
|
||||
AC_SUBST(FIXPATH)
|
||||
])
|
||||
|
@ -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([(This might be an JRE instead of an JDK)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
else
|
||||
# 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
|
||||
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?
|
||||
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_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Test: Is bootjdk available from 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?
|
||||
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
[
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
JAVA_HOME_PROCESSED="$JAVA_HOME"
|
||||
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
if test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
else
|
||||
# Aha, the user has set a JAVA_HOME
|
||||
# let us use that as the Boot JDK.
|
||||
BOOT_JDK="$JAVA_HOME_PROCESSED"
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
|
||||
fi
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
JAVA_HOME_PROCESSED="$JAVA_HOME"
|
||||
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
if test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
else
|
||||
# Aha, the user has set a JAVA_HOME
|
||||
# let us use that as the Boot JDK.
|
||||
BOOT_JDK="$JAVA_HOME_PROCESSED"
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# 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_PATH_PROG(JAVAC_CHECK, javac)
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname "$BINARY"`
|
||||
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
# Looks like we found ourselves an JDK
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
|
||||
fi
|
||||
AC_PATH_PROG(JAVAC_CHECK, javac)
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname "$BINARY"`
|
||||
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
# Looks like we found ourselves an JDK
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
|
||||
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
|
||||
[
|
||||
if test -x /usr/libexec/java_home; then
|
||||
BOOT_JDK=`/usr/libexec/java_home`
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
|
||||
fi
|
||||
if test -x /usr/libexec/java_home; then
|
||||
BOOT_JDK=`/usr/libexec/java_home`
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
|
||||
fi
|
||||
])
|
||||
|
||||
# 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])
|
||||
$1=$BOOT_JDK/bin/$2
|
||||
if test ! -x [$]$1; then
|
||||
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_ERROR([Could not find $2 in the Boot JDK])
|
||||
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_ERROR([Could not find $2 in the Boot JDK])
|
||||
fi
|
||||
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],
|
||||
[
|
||||
BOOT_JDK_FOUND=no
|
||||
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
|
||||
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
|
||||
BOOT_JDK_FOUND=no
|
||||
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
|
||||
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
# Test: Is bootjdk explicitely set by command line arguments?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
|
||||
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;
|
||||
# we should not go on looking
|
||||
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
|
||||
fi
|
||||
# Test: Is bootjdk explicitely set by command line arguments?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
|
||||
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;
|
||||
# we should not go on looking
|
||||
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
|
||||
fi
|
||||
|
||||
# Test: Is bootjdk available from builddeps?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
|
||||
# Test: Is bootjdk available from builddeps?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
|
||||
|
||||
# Test: Is $JAVA_HOME set?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
|
||||
# Test: Is $JAVA_HOME set?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
|
||||
|
||||
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
|
||||
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
|
||||
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?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
|
||||
# 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])
|
||||
|
||||
# Test: Is there a JDK installed in default, well-known locations?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
|
||||
# Test: Is there a JDK installed in default, 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 test "x$BOOT_JDK_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
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_ERROR([Cannot continue])
|
||||
fi
|
||||
# If we haven't found anything yet, we've truly lost. Give up.
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
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_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Setup proper paths for what we found
|
||||
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
|
||||
if test ! -f "$BOOT_RTJAR"; then
|
||||
# Setup proper paths for what we found
|
||||
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
|
||||
if test ! -f "$BOOT_RTJAR"; then
|
||||
# On MacOSX it is called classes.jar
|
||||
BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
|
||||
if test -f "$BOOT_RTJAR"; then
|
||||
# Remove the ..
|
||||
# Remove the ..
|
||||
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
|
||||
fi
|
||||
fi
|
||||
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
|
||||
BOOT_JDK="$BOOT_JDK"
|
||||
AC_SUBST(BOOT_RTJAR)
|
||||
AC_SUBST(BOOT_TOOLSJAR)
|
||||
AC_SUBST(BOOT_JDK)
|
||||
fi
|
||||
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
|
||||
BOOT_JDK="$BOOT_JDK"
|
||||
AC_SUBST(BOOT_RTJAR)
|
||||
AC_SUBST(BOOT_TOOLSJAR)
|
||||
AC_SUBST(BOOT_JDK)
|
||||
|
||||
# Setup tools from the Boot JDK.
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
|
||||
# Setup tools from the Boot JDK.
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
|
||||
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.
|
||||
BOOT_JDK_SOURCETARGET="-source 7 -target 7"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
|
||||
BOOT_JDK_SOURCETARGET="-source 7 -target 7"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
[
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
#
|
||||
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,
|
||||
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
#
|
||||
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,
|
||||
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.
|
||||
# OpenJDK specific increase in thread stack for JDK build,
|
||||
# well more specifically, when running javac.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
STACK_SIZE=768
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# 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
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
# 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
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# 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])
|
||||
# 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])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
||||
])
|
||||
|
@ -36,7 +36,7 @@ else
|
||||
JAVA_EXEC_POS=1
|
||||
endif
|
||||
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
|
||||
|
||||
|
||||
|
2
common/autoconf/build-aux/config.guess
vendored
2
common/autoconf/build-aux/config.guess
vendored
@ -58,6 +58,6 @@ if test $? = 0; then
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $OUT
|
||||
|
@ -25,78 +25,77 @@
|
||||
|
||||
AC_DEFUN([BPERF_CHECK_CORES],
|
||||
[
|
||||
AC_MSG_CHECKING([for number of cores])
|
||||
NUM_CORES=1
|
||||
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
|
||||
AC_MSG_CHECKING([for number of cores])
|
||||
NUM_CORES=1
|
||||
FOUND_CORES=no
|
||||
|
||||
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
|
||||
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
|
||||
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_MSG_CHECKING([for memory size])
|
||||
# Default to 1024 MB
|
||||
MEMORY_SIZE=1024
|
||||
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
|
||||
AC_MSG_CHECKING([for memory size])
|
||||
# Default to 1024 MB
|
||||
MEMORY_SIZE=1024
|
||||
FOUND_MEM=no
|
||||
|
||||
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
|
||||
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
|
||||
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],
|
||||
[
|
||||
# How many cores do we have on this build system?
|
||||
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
|
||||
# The number of cores were not specified, try to probe them.
|
||||
BPERF_CHECK_CORES
|
||||
@ -110,7 +109,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
|
||||
[
|
||||
# How much memory do we have on this build system?
|
||||
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
|
||||
# The memory size was not specified, try to probe it.
|
||||
BPERF_CHECK_MEMORY_SIZE
|
||||
@ -122,10 +121,10 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
|
||||
|
||||
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.
|
||||
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
|
||||
# Number of jobs was not specified, calculate.
|
||||
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_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--disable-ccache],
|
||||
[disable using ccache to speed up recompilations @<:@enabled@:>@])],
|
||||
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
|
||||
if test "x$ENABLE_CCACHE" = xyes; then
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLS_DIR" != x; then
|
||||
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"
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--disable-ccache],
|
||||
[disable using ccache to speed up recompilations @<:@enabled@:>@])],
|
||||
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
|
||||
if test "x$ENABLE_CCACHE" = xyes; then
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLS_DIR" != x; then
|
||||
PATH=$TOOLS_DIR:$PATH
|
||||
fi
|
||||
CCACHE_FOUND=""
|
||||
if test "x$CCACHE" != x; then
|
||||
BPERF_SETUP_CCACHE_USAGE
|
||||
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
|
||||
CCACHE_FOUND=""
|
||||
if test "x$CCACHE" != x; then
|
||||
BPERF_SETUP_CCACHE_USAGE
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
|
||||
[
|
||||
if test "x$CCACHE" != x; then
|
||||
CCACHE_FOUND="true"
|
||||
# Only use ccache if it is 3.1.4 or later, which 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`
|
||||
if test "x$HAS_GOOD_CCACHE" = x; then
|
||||
AC_MSG_RESULT([no, disabling ccache])
|
||||
CCACHE=
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
|
||||
PUSHED_FLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
||||
CXXFLAGS="$PUSHED_FLAGS"
|
||||
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
|
||||
CCACHE=
|
||||
fi
|
||||
fi
|
||||
if test "x$CCACHE" != x; then
|
||||
CCACHE_FOUND="true"
|
||||
# Only use ccache if it is 3.1.4 or later, which 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`
|
||||
if test "x$HAS_GOOD_CCACHE" = x; then
|
||||
AC_MSG_RESULT([no, disabling ccache])
|
||||
CCACHE=
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
|
||||
PUSHED_FLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
||||
CXXFLAGS="$PUSHED_FLAGS"
|
||||
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
|
||||
CCACHE=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$CCACHE" != x; then
|
||||
CCACHE_SLOPPINESS=time_macros
|
||||
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
|
||||
CCACHE_FLAGS=-fpch-preprocess
|
||||
if test "x$CCACHE" != x; then
|
||||
CCACHE_SLOPPINESS=time_macros
|
||||
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
|
||||
CCACHE_FLAGS=-fpch-preprocess
|
||||
|
||||
if test "x$SET_CCACHE_DIR" != x; then
|
||||
mkdir -p $CCACHE_DIR > /dev/null 2>&1
|
||||
chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
|
||||
fi
|
||||
if test "x$SET_CCACHE_DIR" != x; then
|
||||
mkdir -p $CCACHE_DIR > /dev/null 2>&1
|
||||
chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
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
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$GCC" = xyes; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$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
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rm -f conftest.h conftest.hpp.gch
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$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
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rm -f conftest.h conftest.hpp.gch
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_PRECOMPILED_HEADER)
|
||||
AC_SUBST(USE_PRECOMPILED_HEADER)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
[
|
||||
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@:>@])])
|
||||
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@:>@])])
|
||||
|
||||
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"
|
||||
FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
|
||||
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
|
||||
else
|
||||
else
|
||||
SJAVAC_SERVER_JAVA=""
|
||||
# Hotspot specific options.
|
||||
ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
|
||||
# JRockit specific options.
|
||||
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
|
||||
SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA)
|
||||
fi
|
||||
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])
|
||||
if test "$JVM_ARG_OK" = true; then
|
||||
JVM_64BIT=true
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
JVM_64BIT=true
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$JVM_64BIT" = true; then
|
||||
if test "$JVM_64BIT" = true; 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
|
||||
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
|
||||
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
|
||||
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
|
||||
if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
|
||||
fi
|
||||
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])
|
||||
fi
|
||||
if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
|
||||
fi
|
||||
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])
|
||||
fi
|
||||
if test "$JVM_ARG_OK" = false; then
|
||||
fi
|
||||
if test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
|
||||
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
|
||||
AC_MSG_RESULT([$ENABLE_SJAVAC])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
|
||||
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
|
||||
AC_MSG_RESULT([$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"
|
||||
else
|
||||
else
|
||||
SJAVAC_SERVER_DIR=
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_DIR)
|
||||
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_DIR)
|
||||
])
|
||||
|
@ -34,7 +34,7 @@
|
||||
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
|
||||
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
|
||||
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
|
||||
|
||||
|
||||
# The needed cups builddeps are platform independent header files.
|
||||
# I.e. they need not be part of the devkit.
|
||||
builddep_cups=lib/cups_1_3_9.zip
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
|
||||
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
|
||||
|
||||
|
||||
DEVTOOLS=/java/devtools
|
||||
|
||||
builddep_cups=${DEVTOOLS}/linux/cups/include
|
||||
|
@ -25,223 +25,223 @@
|
||||
|
||||
AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
|
||||
[
|
||||
define(LIST_OF_BUILD_DEPENDENCIES,)
|
||||
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
|
||||
if test "x$with_builddeps_conf" != x; then
|
||||
AC_MSG_CHECKING([for supplied builddeps configuration file])
|
||||
builddepsfile=$with_builddeps_conf
|
||||
if test -s $builddepsfile; then
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([loaded!])
|
||||
else
|
||||
AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING([for builddeps.conf files in sources...])
|
||||
builddepsfile=`mktemp`
|
||||
touch $builddepsfile
|
||||
# Put all found confs into a single file.
|
||||
find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
|
||||
# Source the file to acquire the variables
|
||||
if test -s $builddepsfile; then
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([found at least one!])
|
||||
else
|
||||
AC_MSG_ERROR([Could not find any builddeps.conf at all!])
|
||||
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 '.' '_'`
|
||||
define(LIST_OF_BUILD_DEPENDENCIES,)
|
||||
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
|
||||
if test "x$with_builddeps_conf" != x; then
|
||||
AC_MSG_CHECKING([for supplied builddeps configuration file])
|
||||
builddepsfile=$with_builddeps_conf
|
||||
if test -s $builddepsfile; then
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([loaded!])
|
||||
else
|
||||
AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING([for builddeps.conf files in sources...])
|
||||
builddepsfile=`mktemp`
|
||||
touch $builddepsfile
|
||||
# Put all found confs into a single file.
|
||||
find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
|
||||
# Source the file to acquire the variables
|
||||
if test -s $builddepsfile; then
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([found at least one!])
|
||||
else
|
||||
AC_MSG_ERROR([Could not find any builddeps.conf at all!])
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
|
||||
if test "x$BDEPS_UNZIP" = x7z; then
|
||||
BDEPS_UNZIP="7z x"
|
||||
# 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
|
||||
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],
|
||||
[
|
||||
# $1 is the ftp://abuilddeps.server.com/libs/cups.zip
|
||||
# $2 is the local file name for the downloaded file.
|
||||
VALID_TOOL=no
|
||||
if test "x$BDEPS_FTP" = xwget; then
|
||||
VALID_TOOL=yes
|
||||
wget -O $2 $1
|
||||
fi
|
||||
if test "x$BDEPS_FTP" = xlftp; then
|
||||
VALID_TOOL=yes
|
||||
lftp -c "get $1 -o $2"
|
||||
fi
|
||||
if test "x$BDEPS_FTP" = xftp; then
|
||||
VALID_TOOL=yes
|
||||
FTPSERVER=`echo $1 | cut -f 3 -d '/'`
|
||||
FTPPATH=`echo $1 | cut -f 4- -d '/'`
|
||||
FTPUSERPWD=${FTPSERVER%%@*}
|
||||
if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
|
||||
FTPUSER=${userpwd%%:*}
|
||||
FTPPWD=${userpwd#*@}
|
||||
FTPSERVER=${FTPSERVER#*@}
|
||||
else
|
||||
FTPUSER=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])
|
||||
# $1 is the ftp://abuilddeps.server.com/libs/cups.zip
|
||||
# $2 is the local file name for the downloaded file.
|
||||
VALID_TOOL=no
|
||||
if test "x$BDEPS_FTP" = xwget; then
|
||||
VALID_TOOL=yes
|
||||
wget -O $2 $1
|
||||
fi
|
||||
if test "x$BDEPS_FTP" = xlftp; then
|
||||
VALID_TOOL=yes
|
||||
lftp -c "get $1 -o $2"
|
||||
fi
|
||||
if test "x$BDEPS_FTP" = xftp; then
|
||||
VALID_TOOL=yes
|
||||
FTPSERVER=`echo $1 | cut -f 3 -d '/'`
|
||||
FTPPATH=`echo $1 | cut -f 4- -d '/'`
|
||||
FTPUSERPWD=${FTPSERVER%%@*}
|
||||
if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
|
||||
FTPUSER=${userpwd%%:*}
|
||||
FTPPWD=${userpwd#*@}
|
||||
FTPSERVER=${FTPSERVER#*@}
|
||||
else
|
||||
FTPUSER=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
|
||||
])
|
||||
|
||||
AC_DEFUN([BDEPS_CHECK_MODULE],
|
||||
[
|
||||
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
|
||||
# Source the builddeps file again, to make sure it uses the latest variables!
|
||||
. $builddepsfile
|
||||
# Look for a target and build machine specific resource!
|
||||
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
|
||||
if test "x$resource" = x; then
|
||||
# Ok, lets instead look for a target specific resource
|
||||
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])
|
||||
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
|
||||
# Source the builddeps file again, to make sure it uses the latest variables!
|
||||
. $builddepsfile
|
||||
# Look for a target and build machine specific resource!
|
||||
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
|
||||
if test "x$resource" = x; then
|
||||
# Ok, lets instead look for a target specific resource
|
||||
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
|
||||
])
|
||||
|
||||
AC_DEFUN([BDEPS_FETCH],
|
||||
[
|
||||
# $1 is for example mymodule
|
||||
# $2 is for example libs/general/libmymod_1_2_3.zip
|
||||
# $3 is for example ftp://mybuilddeps.myserver.com/builddeps
|
||||
# $4 is for example /localhome/builddeps
|
||||
# $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
|
||||
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
|
||||
filename=`basename $2`
|
||||
filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
|
||||
filebase=${filename%%.*}
|
||||
extension=${filename#*.}
|
||||
installdir=$4/$filebase
|
||||
if test ! -f $installdir/$filename.unpacked; then
|
||||
AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
|
||||
if test ! -d $installdir; then
|
||||
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
|
||||
# $1 is for example mymodule
|
||||
# $2 is for example libs/general/libmymod_1_2_3.zip
|
||||
# $3 is for example ftp://mybuilddeps.myserver.com/builddeps
|
||||
# $4 is for example /localhome/builddeps
|
||||
# $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
|
||||
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
|
||||
filename=`basename $2`
|
||||
filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
|
||||
filebase=${filename%%.*}
|
||||
extension=${filename#*.}
|
||||
installdir=$4/$filebase
|
||||
if test ! -f $installdir/$filename.unpacked; then
|
||||
AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
|
||||
if test ! -d $installdir; then
|
||||
mkdir -p $installdir
|
||||
fi
|
||||
if test -f $installdir/$filename.unpacked; then
|
||||
$5=$installdir
|
||||
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
|
||||
if test -f $installdir/$filename.unpacked; then
|
||||
$5=$installdir
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
|
||||
[
|
||||
AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
|
||||
[use this configuration file for the builddeps])])
|
||||
AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
|
||||
[use this configuration file for the builddeps])])
|
||||
|
||||
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
|
||||
[download and use build dependencies from this server url])])
|
||||
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
|
||||
[download and use build dependencies from this server url])])
|
||||
|
||||
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
|
||||
[store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
|
||||
[],
|
||||
[with_builddeps_dir=/localhome/builddeps])
|
||||
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
|
||||
[store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
|
||||
[],
|
||||
[with_builddeps_dir=/localhome/builddeps])
|
||||
|
||||
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
|
||||
[chgrp the downloaded build dependencies to this group])])
|
||||
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
|
||||
[chgrp the downloaded build dependencies to this group])])
|
||||
])
|
||||
|
@ -22,7 +22,7 @@
|
||||
# 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.
|
||||
|
||||
|
||||
@ -67,14 +67,14 @@ UNZIP="@UNZIP@"
|
||||
SRC_ROOT="@SRC_ROOT@"
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
PATH="@VS_PATH@"
|
||||
PATH="@VS_PATH@"
|
||||
fi
|
||||
|
||||
# Now locate the main script and run it.
|
||||
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
|
||||
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
|
||||
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
|
||||
exit 1
|
||||
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. "$REAL_COMPARE_SCRIPT" "$@"
|
||||
|
@ -46,4 +46,4 @@
|
||||
#define HAVE_LIBGIF
|
||||
#define HAVE_LIBZ
|
||||
#define HAVE_LIBM
|
||||
#define HAVE_ALTZONE
|
||||
#define HAVE_ALTZONE
|
||||
|
43
common/autoconf/configure
vendored
43
common/autoconf/configure
vendored
@ -88,7 +88,6 @@ check_hg_updates() {
|
||||
check_autoconf_timestamps
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
@ -106,7 +105,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Autoconf calls the configure script recursively sometimes.
|
||||
# Autoconf calls the configure script recursively sometimes.
|
||||
# Don't start logging twice in that case
|
||||
if test "x$conf_debug_configure" = xtrue; then
|
||||
conf_debug_configure=recursive
|
||||
@ -120,28 +119,28 @@ conf_openjdk_target=
|
||||
for conf_option
|
||||
do
|
||||
case $conf_option in
|
||||
--openjdk-target=*)
|
||||
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
--debug-configure)
|
||||
if test "x$conf_debug_configure" != xrecursive; then
|
||||
conf_debug_configure=true
|
||||
export conf_debug_configure
|
||||
fi
|
||||
continue ;;
|
||||
*)
|
||||
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
|
||||
--openjdk-target=*)
|
||||
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
--debug-configure)
|
||||
if test "x$conf_debug_configure" != xrecursive; then
|
||||
conf_debug_configure=true
|
||||
export conf_debug_configure
|
||||
fi
|
||||
continue ;;
|
||||
*)
|
||||
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
|
||||
esac
|
||||
|
||||
case $conf_option in
|
||||
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-help | --help | --hel | --he | -h)
|
||||
conf_print_help=true ;;
|
||||
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-help | --help | --hel | --he | -h)
|
||||
conf_print_help=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -179,7 +178,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
else
|
||||
echo Running generated-configure.sh
|
||||
conf_script_to_run=$conf_script_dir/generated-configure.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$conf_debug_configure" != x; then
|
||||
# Turn on shell debug output if requested (initial or recursive)
|
||||
|
@ -236,7 +236,7 @@ CONFIG_STATUS="$OUTPUT_ROOT/config.status"
|
||||
# Create the actual output files. Now the main work of configure is done.
|
||||
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
|
||||
$MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
|
||||
fi
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -25,194 +25,194 @@
|
||||
|
||||
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],
|
||||
[
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
# $1 is the help tag: freetyp2, cups, pulse, alsa etc
|
||||
MISSING_DEPENDENCY=$1
|
||||
PKGHANDLER_COMMAND=
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
# $1 is the help tag: freetyp2, cups, pulse, alsa etc
|
||||
MISSING_DEPENDENCY=$1
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
case $PKGHANDLER in
|
||||
apt-get)
|
||||
apt_help $MISSING_DEPENDENCY ;;
|
||||
case $PKGHANDLER in
|
||||
apt-get)
|
||||
apt_help $MISSING_DEPENDENCY ;;
|
||||
yum)
|
||||
yum_help $MISSING_DEPENDENCY ;;
|
||||
port)
|
||||
port_help $MISSING_DEPENDENCY ;;
|
||||
pkgutil)
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
yum_help $MISSING_DEPENDENCY ;;
|
||||
port)
|
||||
port_help $MISSING_DEPENDENCY ;;
|
||||
pkgutil)
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
esac
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
])
|
||||
|
||||
cygwin_help() {
|
||||
case $1 in
|
||||
case $1 in
|
||||
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)
|
||||
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)
|
||||
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 ;;
|
||||
esac
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
apt_help() {
|
||||
case $1 in
|
||||
case $1 in
|
||||
devkit)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
|
||||
openjdk)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
|
||||
alsa)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
|
||||
freetype2)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
|
||||
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)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
|
||||
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
yum_help() {
|
||||
case $1 in
|
||||
case $1 in
|
||||
devkit)
|
||||
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
|
||||
openjdk)
|
||||
PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
|
||||
alsa)
|
||||
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
|
||||
freetype2)
|
||||
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
|
||||
x11)
|
||||
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
|
||||
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
port_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
pkgutil_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
pkgadd_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
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$HAS_GOOD_CCACHE" = x; then
|
||||
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."
|
||||
else
|
||||
CCACHE_STATUS="installed and in use"
|
||||
fi
|
||||
else
|
||||
if test "x$GCC" = xyes; then
|
||||
CCACHE_STATUS="not installed (consider installing)"
|
||||
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
|
||||
else
|
||||
CCACHE_STATUS="not available for your system"
|
||||
fi
|
||||
fi
|
||||
if test "x$CCACHE_FOUND" != x; then
|
||||
if test "x$HAS_GOOD_CCACHE" = x; then
|
||||
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."
|
||||
else
|
||||
CCACHE_STATUS="installed and in use"
|
||||
fi
|
||||
else
|
||||
if test "x$GCC" = xyes; then
|
||||
CCACHE_STATUS="not installed (consider installing)"
|
||||
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
|
||||
else
|
||||
CCACHE_STATUS="not available for your system"
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
printf "A new configuration has been successfully created in\n"
|
||||
printf "$OUTPUT_ROOT\n"
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
else
|
||||
printf "using default settings.\n"
|
||||
fi
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
printf "A new configuration has been successfully created in\n"
|
||||
printf "$OUTPUT_ROOT\n"
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
else
|
||||
printf "using default settings.\n"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "Configuration summary:\n"
|
||||
printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* JDK variant: $JDK_VARIANT\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 "\n"
|
||||
printf "Configuration summary:\n"
|
||||
printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* JDK variant: $JDK_VARIANT\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 "\n"
|
||||
printf "Tools summary:\n"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
|
||||
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
|
||||
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Cores to use: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
printf "\n"
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Cores to use: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
printf "\n"
|
||||
|
||||
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 "$CCACHE_HELP_MSG\n"
|
||||
HELP_MSG_MISSING_DEPENDENCY([ccache])
|
||||
printf "$HELP_MSG\n"
|
||||
printf "\n"
|
||||
fi
|
||||
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 "$CCACHE_HELP_MSG\n"
|
||||
HELP_MSG_MISSING_DEPENDENCY([ccache])
|
||||
printf "$HELP_MSG\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
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 "will result in longer build times.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
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 "will result in longer build times.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$FOUND_ALT_VARIABLES" != "x"; then
|
||||
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 "that you clean your environment. The following variables are set:\n"
|
||||
printf "$FOUND_ALT_VARIABLES\n"
|
||||
printf "\n"
|
||||
fi
|
||||
if test "x$FOUND_ALT_VARIABLES" != "x"; then
|
||||
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 "that you clean your environment. The following variables are set:\n"
|
||||
printf "$FOUND_ALT_VARIABLES\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
|
||||
printf "WARNING: Your build output directory is not on a local disk.\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 "and run the configure script again from that directory.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
|
||||
printf "WARNING: Your build output directory is not on a local disk.\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 "and run the configure script again from that directory.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" = "xyes"; then
|
||||
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 "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
if test "x$IS_RECONFIGURE" = "xyes"; then
|
||||
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 "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
])
|
||||
|
@ -111,12 +111,12 @@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
|
||||
|
||||
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
|
||||
# creation.
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
# creation.
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
FULL_DEBUG_SYMBOLS=1
|
||||
# Ensure hotspot uses the objcopy that configure located
|
||||
ALT_OBJCOPY:=$(OBJCOPY)
|
||||
else
|
||||
# Ensure hotspot uses the objcopy that configure located
|
||||
ALT_OBJCOPY:=$(OBJCOPY)
|
||||
else
|
||||
FULL_DEBUG_SYMBOLS=0
|
||||
endif
|
||||
|
||||
|
@ -25,235 +25,234 @@
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Check which variant of the JDK that we want to build.
|
||||
# Currently we have:
|
||||
# normal: standard edition
|
||||
# but the custom make system may add other variants
|
||||
#
|
||||
# Effectively the JDK variant gives a name to a specific set of
|
||||
# modules to compile into the JDK. In the future, these modules
|
||||
# might even be Jigsaw modules.
|
||||
#
|
||||
AC_MSG_CHECKING([which variant of the JDK to build])
|
||||
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
|
||||
[JDK variant to build (normal) @<:@normal@:>@])])
|
||||
###############################################################################
|
||||
#
|
||||
# Check which variant of the JDK that we want to build.
|
||||
# Currently we have:
|
||||
# normal: standard edition
|
||||
# but the custom make system may add other variants
|
||||
#
|
||||
# Effectively the JDK variant gives a name to a specific set of
|
||||
# modules to compile into the JDK. In the future, these modules
|
||||
# might even be Jigsaw modules.
|
||||
#
|
||||
AC_MSG_CHECKING([which variant of the JDK to build])
|
||||
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
|
||||
[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"
|
||||
else
|
||||
else
|
||||
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],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check which variants of the JVM that we want to build.
|
||||
# Currently we have:
|
||||
# server: normal interpreter and a tiered C1/C2 compiler
|
||||
# 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
|
||||
# kernel: kernel footprint JVM that passes the TCK without major performance problems,
|
||||
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
|
||||
# zero: no machine code interpreter, no compiler
|
||||
# zeroshark: zero interpreter and shark/llvm compiler backend
|
||||
AC_MSG_CHECKING([which variants of the JVM to build])
|
||||
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@:>@])])
|
||||
###############################################################################
|
||||
#
|
||||
# Check which variants of the JVM that we want to build.
|
||||
# Currently we have:
|
||||
# server: normal interpreter and a tiered C1/C2 compiler
|
||||
# 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
|
||||
# kernel: kernel footprint JVM that passes the TCK without major performance problems,
|
||||
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
|
||||
# zero: no machine code interpreter, no compiler
|
||||
# zeroshark: zero interpreter and shark/llvm compiler backend
|
||||
AC_MSG_CHECKING([which variants of the JVM to build])
|
||||
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@:>@])])
|
||||
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
with_jvm_variants="server"
|
||||
fi
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
with_jvm_variants="server"
|
||||
fi
|
||||
|
||||
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,//'`
|
||||
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,//'`
|
||||
|
||||
if test "x$TEST_VARIANTS" != "x,"; then
|
||||
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
|
||||
fi
|
||||
AC_MSG_RESULT([$with_jvm_variants])
|
||||
if test "x$TEST_VARIANTS" != "x,"; then
|
||||
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
|
||||
fi
|
||||
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_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_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_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/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_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_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'`
|
||||
|
||||
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
|
||||
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
|
||||
if test "x$JVM_VARIANT_KERNEL" = xtrue; then
|
||||
fi
|
||||
if test "x$JVM_VARIANT_KERNEL" = xtrue; 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
|
||||
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
fi
|
||||
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; 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
|
||||
|
||||
# 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/'`
|
||||
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
|
||||
# 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/'`
|
||||
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
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=yes
|
||||
else
|
||||
else
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(JVM_VARIANTS)
|
||||
AC_SUBST(JVM_VARIANT_SERVER)
|
||||
AC_SUBST(JVM_VARIANT_CLIENT)
|
||||
AC_SUBST(JVM_VARIANT_MINIMAL1)
|
||||
AC_SUBST(JVM_VARIANT_KERNEL)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
AC_SUBST(JVM_VARIANTS)
|
||||
AC_SUBST(JVM_VARIANT_SERVER)
|
||||
AC_SUBST(JVM_VARIANT_CLIENT)
|
||||
AC_SUBST(JVM_VARIANT_MINIMAL1)
|
||||
AC_SUBST(JVM_VARIANT_KERNEL)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
|
||||
INCLUDE_SA=true
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
|
||||
INCLUDE_SA=true
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
|
||||
INCLUDE_SA=false
|
||||
fi
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
|
||||
fi
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
|
||||
INCLUDE_SA=false
|
||||
fi
|
||||
AC_SUBST(INCLUDE_SA)
|
||||
fi
|
||||
AC_SUBST(INCLUDE_SA)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
MACOSX_UNIVERSAL="true"
|
||||
fi
|
||||
|
||||
AC_SUBST(MACOSX_UNIVERSAL)
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
MACOSX_UNIVERSAL="true"
|
||||
fi
|
||||
|
||||
AC_SUBST(MACOSX_UNIVERSAL)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Set the debug level
|
||||
# release: no debug information, all optimizations, no asserts.
|
||||
# fastdebug: debug information (-g), all optimizations, all asserts
|
||||
# slowdebug: debug information (-g), no optimizations, all asserts
|
||||
#
|
||||
DEBUG_LEVEL="release"
|
||||
AC_MSG_CHECKING([which debug level to use])
|
||||
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
|
||||
# release: no debug information, all optimizations, no asserts.
|
||||
# fastdebug: debug information (-g), all optimizations, all asserts
|
||||
# slowdebug: debug information (-g), no optimizations, all asserts
|
||||
#
|
||||
DEBUG_LEVEL="release"
|
||||
AC_MSG_CHECKING([which debug level to use])
|
||||
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
|
||||
[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
|
||||
[
|
||||
ENABLE_DEBUG="${enableval}"
|
||||
DEBUG_LEVEL="fastdebug"
|
||||
], [ENABLE_DEBUG="no"])
|
||||
], [ENABLE_DEBUG="no"])
|
||||
|
||||
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
|
||||
[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
|
||||
[
|
||||
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
|
||||
[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
|
||||
[
|
||||
DEBUG_LEVEL="${withval}"
|
||||
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
|
||||
])
|
||||
AC_MSG_RESULT([$DEBUG_LEVEL])
|
||||
])
|
||||
AC_MSG_RESULT([$DEBUG_LEVEL])
|
||||
|
||||
if test "x$DEBUG_LEVEL" != xrelease && \
|
||||
test "x$DEBUG_LEVEL" != xfastdebug && \
|
||||
test "x$DEBUG_LEVEL" != xslowdebug; then
|
||||
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
|
||||
fi
|
||||
if test "x$DEBUG_LEVEL" != xrelease && \
|
||||
test "x$DEBUG_LEVEL" != xfastdebug && \
|
||||
test "x$DEBUG_LEVEL" != xslowdebug; then
|
||||
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
|
||||
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
|
||||
release )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
BUILD_VARIANT_RELEASE=""
|
||||
HOTSPOT_DEBUG_LEVEL="product"
|
||||
HOTSPOT_EXPORT="product"
|
||||
;;
|
||||
fastdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="true"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-fastdebug"
|
||||
HOTSPOT_DEBUG_LEVEL="fastdebug"
|
||||
HOTSPOT_EXPORT="fastdebug"
|
||||
;;
|
||||
slowdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-debug"
|
||||
HOTSPOT_DEBUG_LEVEL="jvmg"
|
||||
HOTSPOT_EXPORT="debug"
|
||||
;;
|
||||
esac
|
||||
case $DEBUG_LEVEL in
|
||||
release )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
BUILD_VARIANT_RELEASE=""
|
||||
HOTSPOT_DEBUG_LEVEL="product"
|
||||
HOTSPOT_EXPORT="product"
|
||||
;;
|
||||
fastdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="true"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-fastdebug"
|
||||
HOTSPOT_DEBUG_LEVEL="fastdebug"
|
||||
HOTSPOT_EXPORT="fastdebug"
|
||||
;;
|
||||
slowdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-debug"
|
||||
HOTSPOT_DEBUG_LEVEL="jvmg"
|
||||
HOTSPOT_EXPORT="debug"
|
||||
;;
|
||||
esac
|
||||
|
||||
#####
|
||||
# Generate the legacy makefile targets for hotspot.
|
||||
# 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
|
||||
# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
|
||||
# But until then ...
|
||||
HOTSPOT_TARGET=""
|
||||
#####
|
||||
# Generate the legacy makefile targets for hotspot.
|
||||
# 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
|
||||
# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
|
||||
# But until then ...
|
||||
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} "
|
||||
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 "
|
||||
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 "
|
||||
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 "
|
||||
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 "
|
||||
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 "
|
||||
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
|
||||
# 64 bit intel. This invalidates control of which jvms are built
|
||||
# from configure, but only server is valid anyway. Fix this
|
||||
# when hotspot makefiles are rewritten.
|
||||
if test "x$MACOSX_UNIVERSAL" = xtrue; then
|
||||
# On Macosx universal binaries are produced, but they only contain
|
||||
# 64 bit intel. This invalidates control of which jvms are built
|
||||
# from configure, but only server is valid anyway. Fix this
|
||||
# when hotspot makefiles are rewritten.
|
||||
if test "x$MACOSX_UNIVERSAL" = xtrue; then
|
||||
HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
|
||||
fi
|
||||
fi
|
||||
|
||||
#####
|
||||
#####
|
||||
|
||||
AC_SUBST(DEBUG_LEVEL)
|
||||
AC_SUBST(VARIANT)
|
||||
AC_SUBST(FASTDEBUG)
|
||||
AC_SUBST(DEBUG_CLASSFILES)
|
||||
AC_SUBST(BUILD_VARIANT_RELEASE)
|
||||
AC_SUBST(DEBUG_LEVEL)
|
||||
AC_SUBST(VARIANT)
|
||||
AC_SUBST(FASTDEBUG)
|
||||
AC_SUBST(DEBUG_CLASSFILES)
|
||||
AC_SUBST(BUILD_VARIANT_RELEASE)
|
||||
])
|
||||
|
||||
|
||||
@ -264,7 +263,7 @@ AC_SUBST(BUILD_VARIANT_RELEASE)
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
|
||||
[
|
||||
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])
|
||||
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],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we build a JDK/JVM with headful support (ie a graphical ui)?
|
||||
# We always build headless support.
|
||||
#
|
||||
AC_MSG_CHECKING([headful support])
|
||||
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
|
||||
[disable building headful support (graphical UI support) @<:@enabled@:>@])],
|
||||
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
|
||||
###############################################################################
|
||||
#
|
||||
# Should we build a JDK/JVM with headful support (ie a graphical ui)?
|
||||
# We always build headless support.
|
||||
#
|
||||
AC_MSG_CHECKING([headful support])
|
||||
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
|
||||
[disable building headful support (graphical UI support) @<:@enabled@:>@])],
|
||||
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
|
||||
|
||||
SUPPORT_HEADLESS=yes
|
||||
BUILD_HEADLESS="BUILD_HEADLESS:=true"
|
||||
SUPPORT_HEADLESS=yes
|
||||
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.
|
||||
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.
|
||||
BUILD_HEADLESS="BUILD_HEADLESS:=true"
|
||||
headful_msg="headless only"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$headful_msg])
|
||||
AC_MSG_RESULT([$headful_msg])
|
||||
|
||||
AC_SUBST(SUPPORT_HEADLESS)
|
||||
AC_SUBST(SUPPORT_HEADFUL)
|
||||
AC_SUBST(BUILD_HEADLESS)
|
||||
AC_SUBST(SUPPORT_HEADLESS)
|
||||
AC_SUBST(SUPPORT_HEADFUL)
|
||||
AC_SUBST(BUILD_HEADLESS)
|
||||
|
||||
# Control wether Hotspot runs Queens test after build.
|
||||
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
|
||||
[run the Queens test after Hotspot build @<:@disabled@:>@])],,
|
||||
[enable_hotspot_test_in_build=no])
|
||||
if test "x$enable_hotspot_test_in_build" = "xyes"; then
|
||||
# Control wether Hotspot runs Queens test after build.
|
||||
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
|
||||
[run the Queens test after Hotspot build @<:@disabled@:>@])],,
|
||||
[enable_hotspot_test_in_build=no])
|
||||
if test "x$enable_hotspot_test_in_build" = "xyes"; then
|
||||
TEST_IN_BUILD=true
|
||||
else
|
||||
else
|
||||
TEST_IN_BUILD=false
|
||||
fi
|
||||
AC_SUBST(TEST_IN_BUILD)
|
||||
fi
|
||||
AC_SUBST(TEST_IN_BUILD)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Choose cacerts source file
|
||||
#
|
||||
AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
|
||||
[specify alternative cacerts file])])
|
||||
if test "x$with_cacerts_file" != x; then
|
||||
###############################################################################
|
||||
#
|
||||
# Choose cacerts source file
|
||||
#
|
||||
AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
|
||||
[specify alternative cacerts file])])
|
||||
if test "x$with_cacerts_file" != x; then
|
||||
CACERTS_FILE=$with_cacerts_file
|
||||
else
|
||||
else
|
||||
CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
|
||||
fi
|
||||
AC_SUBST(CACERTS_FILE)
|
||||
fi
|
||||
AC_SUBST(CACERTS_FILE)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Enable or disable unlimited crypto
|
||||
#
|
||||
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
|
||||
[Enable unlimited crypto policy @<:@disabled@:>@])],,
|
||||
[enable_unlimited_crypto=no])
|
||||
if test "x$enable_unlimited_crypto" = "xyes"; then
|
||||
###############################################################################
|
||||
#
|
||||
# Enable or disable unlimited crypto
|
||||
#
|
||||
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
|
||||
[Enable unlimited crypto policy @<:@disabled@:>@])],,
|
||||
[enable_unlimited_crypto=no])
|
||||
if test "x$enable_unlimited_crypto" = "xyes"; then
|
||||
UNLIMITED_CRYPTO=true
|
||||
else
|
||||
else
|
||||
UNLIMITED_CRYPTO=false
|
||||
fi
|
||||
AC_SUBST(UNLIMITED_CRYPTO)
|
||||
fi
|
||||
AC_SUBST(UNLIMITED_CRYPTO)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Enable or disable the elliptic curve crypto implementation
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
|
||||
[
|
||||
AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
|
||||
###############################################################################
|
||||
#
|
||||
# Enable or disable the elliptic curve crypto implementation
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
|
||||
[
|
||||
AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
|
||||
|
||||
if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
|
||||
ENABLE_INTREE_EC=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
ENABLE_INTREE_EC=no
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
|
||||
ENABLE_INTREE_EC=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
ENABLE_INTREE_EC=no
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_INTREE_EC)
|
||||
])
|
||||
AC_SUBST(ENABLE_INTREE_EC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
#
|
||||
COMPRESS_JARS=false
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
#
|
||||
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],
|
||||
[
|
||||
# Source the version numbers
|
||||
. $AUTOCONF_DIR/version-numbers
|
||||
# Source the version numbers
|
||||
. $AUTOCONF_DIR/version-numbers
|
||||
|
||||
# Get the settings from parameters
|
||||
AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
|
||||
[Set milestone value for build @<:@internal@:>@])])
|
||||
if test "x$with_milestone" = xyes; then
|
||||
AC_MSG_ERROR([Milestone must have a value])
|
||||
elif test "x$with_milestone" != x; then
|
||||
# Get the settings from parameters
|
||||
AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
|
||||
[Set milestone value for build @<:@internal@:>@])])
|
||||
if test "x$with_milestone" = xyes; then
|
||||
AC_MSG_ERROR([Milestone must have a value])
|
||||
elif test "x$with_milestone" != x; then
|
||||
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
|
||||
if test "x$MILESTONE" = x; then
|
||||
MILESTONE=internal
|
||||
fi
|
||||
|
||||
# Now set the JDK version, milestone, build number etc.
|
||||
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)
|
||||
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
|
||||
|
||||
COPYRIGHT_YEAR=`date +'%Y'`
|
||||
AC_SUBST(COPYRIGHT_YEAR)
|
||||
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
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
|
||||
AC_SUBST(COOKED_BUILD_NUMBER)
|
||||
# Now set the JDK version, milestone, build number etc.
|
||||
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],
|
||||
[
|
||||
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
|
||||
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)
|
||||
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
|
||||
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)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
[
|
||||
#
|
||||
# ENABLE_DEBUG_SYMBOLS
|
||||
# This must be done after the toolchain is setup, since we're looking at objcopy.
|
||||
#
|
||||
AC_ARG_ENABLE([debug-symbols],
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
|
||||
#
|
||||
# ENABLE_DEBUG_SYMBOLS
|
||||
# This must be done after the toolchain is setup, since we're looking at objcopy.
|
||||
#
|
||||
AC_ARG_ENABLE([debug-symbols],
|
||||
[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
|
||||
# explicit enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
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
|
||||
if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
|
||||
# explicit enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
|
||||
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
|
||||
|
||||
#
|
||||
# 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}])
|
||||
AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
|
||||
|
||||
if test "x${enable_zip_debug_info}" = "xno"; then
|
||||
ZIP_DEBUGINFO_FILES=false
|
||||
else
|
||||
ZIP_DEBUGINFO_FILES=true
|
||||
fi
|
||||
#
|
||||
# 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}])
|
||||
|
||||
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
|
||||
AC_SUBST(ZIP_DEBUGINFO_FILES)
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
if test "x${enable_zip_debug_info}" = "xno"; then
|
||||
ZIP_DEBUGINFO_FILES=false
|
||||
else
|
||||
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
|
||||
@ -557,5 +555,5 @@ AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
# for a degree of customization of the build targets and the rules/recipes
|
||||
# to create them
|
||||
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)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -53,37 +53,37 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
;;
|
||||
powerpc64)
|
||||
VAR_CPU=ppc64
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
;;
|
||||
s390)
|
||||
VAR_CPU=s390
|
||||
VAR_CPU_ARCH=s390
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
;;
|
||||
s390x)
|
||||
VAR_CPU=s390x
|
||||
VAR_CPU_ARCH=s390
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
;;
|
||||
sparc)
|
||||
VAR_CPU=sparc
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
;;
|
||||
sparcv9)
|
||||
VAR_CPU=sparcv9
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported cpu $1])
|
||||
;;
|
||||
@ -140,56 +140,56 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
# OPENJDK_BUILD_OS, etc.
|
||||
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
[
|
||||
# Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_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,
|
||||
# but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
|
||||
OPENJDK_TARGET_AUTOCONF_NAME="$host"
|
||||
OPENJDK_BUILD_AUTOCONF_NAME="$build"
|
||||
AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
|
||||
AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
|
||||
# Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_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,
|
||||
# but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
|
||||
OPENJDK_TARGET_AUTOCONF_NAME="$host"
|
||||
OPENJDK_BUILD_AUTOCONF_NAME="$build"
|
||||
AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
|
||||
AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
|
||||
|
||||
# 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_CPU($build_cpu)
|
||||
# ..and setup our own variables. (Do this explicitely to facilitate searching)
|
||||
OPENJDK_BUILD_OS="$VAR_OS"
|
||||
OPENJDK_BUILD_OS_API="$VAR_OS_API"
|
||||
OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
|
||||
OPENJDK_BUILD_CPU="$VAR_CPU"
|
||||
OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
|
||||
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_BUILD_OS)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_API)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
|
||||
# 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_CPU($build_cpu)
|
||||
# ..and setup our own variables. (Do this explicitely to facilitate searching)
|
||||
OPENJDK_BUILD_OS="$VAR_OS"
|
||||
OPENJDK_BUILD_OS_API="$VAR_OS_API"
|
||||
OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
|
||||
OPENJDK_BUILD_CPU="$VAR_CPU"
|
||||
OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
|
||||
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_BUILD_OS)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_API)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
|
||||
|
||||
AC_MSG_CHECKING([openjdk-build os-cpu])
|
||||
AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
|
||||
AC_MSG_CHECKING([openjdk-build os-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.
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
|
||||
# ... and setup our own variables. (Do this explicitely to facilitate searching)
|
||||
OPENJDK_TARGET_OS="$VAR_OS"
|
||||
OPENJDK_TARGET_OS_API="$VAR_OS_API"
|
||||
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
|
||||
OPENJDK_TARGET_CPU="$VAR_CPU"
|
||||
OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
|
||||
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_TARGET_OS)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
|
||||
# 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_CPU($host_cpu)
|
||||
# ... and setup our own variables. (Do this explicitely to facilitate searching)
|
||||
OPENJDK_TARGET_OS="$VAR_OS"
|
||||
OPENJDK_TARGET_OS_API="$VAR_OS_API"
|
||||
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
|
||||
OPENJDK_TARGET_CPU="$VAR_CPU"
|
||||
OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
|
||||
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_TARGET_OS)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
|
||||
|
||||
AC_MSG_CHECKING([openjdk-target os-cpu])
|
||||
AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AC_MSG_CHECKING([openjdk-target os-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
|
||||
@ -198,7 +198,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_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:
|
||||
# native == normal compilation, target system == build system
|
||||
@ -227,7 +227,7 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
|
||||
OPENJDK_TARGET_CPU=sparc
|
||||
else
|
||||
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
|
||||
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
|
||||
@ -238,184 +238,183 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
|
||||
fi
|
||||
AC_SUBST(COMPILE_TYPE)
|
||||
|
||||
AC_MSG_CHECKING([compilation type])
|
||||
AC_MSG_RESULT([$COMPILE_TYPE])
|
||||
AC_MSG_CHECKING([compilation 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],
|
||||
[
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of x86 and x86_64
|
||||
OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY="i586"
|
||||
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.
|
||||
OPENJDK_TARGET_CPU_LEGACY="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of x86 and x86_64
|
||||
OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY="i586"
|
||||
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.
|
||||
OPENJDK_TARGET_CPU_LEGACY="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of x86 and x86_64.
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of x86 and x86_64.
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
|
||||
|
||||
# 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
|
||||
# locating libraries. On macosx, it's empty, though.
|
||||
OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_CPU_LIBDIR=""
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
|
||||
# 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
|
||||
# locating libraries. On macosx, it's empty, though.
|
||||
OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_CPU_LIBDIR=""
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
|
||||
|
||||
# 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:
|
||||
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
|
||||
OPENJDK_TARGET_CPU_ISADIR=""
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/amd64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
|
||||
fi
|
||||
# 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:
|
||||
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
|
||||
OPENJDK_TARGET_CPU_ISADIR=""
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/amd64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
|
||||
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
|
||||
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
# On linux only, we replace x86 with i386.
|
||||
OPENJDK_TARGET_CPU_OSARCH="i386"
|
||||
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.
|
||||
OPENJDK_TARGET_CPU_OSARCH="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
|
||||
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
|
||||
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
# On linux only, we replace x86 with i386.
|
||||
OPENJDK_TARGET_CPU_OSARCH="i386"
|
||||
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.
|
||||
OPENJDK_TARGET_CPU_OSARCH="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
|
||||
|
||||
OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_JLI="i386"
|
||||
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.
|
||||
OPENJDK_TARGET_CPU_JLI="amd64"
|
||||
OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_JLI="i386"
|
||||
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.
|
||||
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
|
||||
# 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
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
|
||||
|
||||
# Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
|
||||
if test "x$OPENJDK_TARGET_OS_API" = xposix; then
|
||||
OPENJDK_TARGET_OS_API_DIR="solaris"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
|
||||
OPENJDK_TARGET_OS_API_DIR="windows"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
|
||||
# Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
|
||||
if test "x$OPENJDK_TARGET_OS_API" = xposix; then
|
||||
OPENJDK_TARGET_OS_API_DIR="solaris"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
|
||||
OPENJDK_TARGET_OS_API_DIR="windows"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
A_LP64="LP64:="
|
||||
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
|
||||
# unpack200.exe
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
A_LP64="LP64:="
|
||||
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
|
||||
# unpack200.exe
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
fi
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# FIXME: ... or should this include reduced builds..?
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
|
||||
else
|
||||
DEFINE_CROSS_COMPILE_ARCH=""
|
||||
fi
|
||||
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)
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# FIXME: ... or should this include reduced builds..?
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
|
||||
else
|
||||
DEFINE_CROSS_COMPILE_ARCH=""
|
||||
fi
|
||||
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)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
REQUIRED_OS_VERSION=5.2
|
||||
else
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME=Darwin
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
REQUIRED_OS_VERSION=5.2
|
||||
else
|
||||
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
|
||||
|
||||
AC_SUBST(REQUIRED_OS_NAME)
|
||||
AC_SUBST(REQUIRED_OS_VERSION)
|
||||
AC_SUBST(REQUIRED_OS_NAME)
|
||||
AC_SUBST(REQUIRED_OS_VERSION)
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
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"
|
||||
# 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
|
||||
# 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.
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_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
|
||||
# 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
|
||||
# to use the configure naming style.
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD
|
||||
PLATFORM_SETUP_TARGET_CPU_BITS
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD
|
||||
PLATFORM_SETUP_TARGET_CPU_BITS
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
])
|
||||
|
||||
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_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
|
||||
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
|
||||
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
|
||||
AC_SUBST(OS_VERSION_MAJOR)
|
||||
AC_SUBST(OS_VERSION_MINOR)
|
||||
AC_SUBST(OS_VERSION_MICRO)
|
||||
OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
|
||||
OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
|
||||
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
|
||||
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
|
||||
AC_SUBST(OS_VERSION_MAJOR)
|
||||
AC_SUBST(OS_VERSION_MINOR)
|
||||
AC_SUBST(OS_VERSION_MICRO)
|
||||
])
|
||||
|
||||
# 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],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# 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
|
||||
# is made at runtime.)
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# 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
|
||||
# is made at runtime.)
|
||||
#
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# 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
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# 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
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make compilation sanity check
|
||||
AC_CHECK_HEADERS([stdio.h], , [
|
||||
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
|
||||
if test "x$COMPILE_TYPE" = xreduced; then
|
||||
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
|
||||
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.])
|
||||
# Make compilation sanity check
|
||||
AC_CHECK_HEADERS([stdio.h], , [
|
||||
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
|
||||
if test "x$COMPILE_TYPE" = xreduced; then
|
||||
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
|
||||
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.])
|
||||
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
|
||||
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
|
||||
|
||||
if test "x$SIZEOF_INT_P" = x; then
|
||||
if test "x$SIZEOF_INT_P" = x; then
|
||||
# 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.])
|
||||
else
|
||||
else
|
||||
TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
|
||||
|
||||
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
|
||||
|
||||
AC_MSG_CHECKING([for target address size])
|
||||
AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
|
||||
AC_MSG_CHECKING([for target address size])
|
||||
AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Is the target little of big endian?
|
||||
#
|
||||
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
|
||||
###############################################################################
|
||||
#
|
||||
# Is the target little of big endian?
|
||||
#
|
||||
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])
|
||||
fi
|
||||
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
|
||||
fi
|
||||
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)])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
@ -25,55 +25,54 @@
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
|
||||
[
|
||||
|
||||
# Where are the sources. Any of these can be overridden
|
||||
# using --with-override-corba and the likes.
|
||||
LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
|
||||
CORBA_TOPDIR="$SRC_ROOT/corba"
|
||||
JAXP_TOPDIR="$SRC_ROOT/jaxp"
|
||||
JAXWS_TOPDIR="$SRC_ROOT/jaxws"
|
||||
HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
|
||||
NASHORN_TOPDIR="$SRC_ROOT/nashorn"
|
||||
JDK_TOPDIR="$SRC_ROOT/jdk"
|
||||
AC_SUBST(LANGTOOLS_TOPDIR)
|
||||
AC_SUBST(CORBA_TOPDIR)
|
||||
AC_SUBST(JAXP_TOPDIR)
|
||||
AC_SUBST(JAXWS_TOPDIR)
|
||||
AC_SUBST(HOTSPOT_TOPDIR)
|
||||
AC_SUBST(NASHORN_TOPDIR)
|
||||
AC_SUBST(JDK_TOPDIR)
|
||||
# Where are the sources. Any of these can be overridden
|
||||
# using --with-override-corba and the likes.
|
||||
LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
|
||||
CORBA_TOPDIR="$SRC_ROOT/corba"
|
||||
JAXP_TOPDIR="$SRC_ROOT/jaxp"
|
||||
JAXWS_TOPDIR="$SRC_ROOT/jaxws"
|
||||
HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
|
||||
NASHORN_TOPDIR="$SRC_ROOT/nashorn"
|
||||
JDK_TOPDIR="$SRC_ROOT/jdk"
|
||||
AC_SUBST(LANGTOOLS_TOPDIR)
|
||||
AC_SUBST(CORBA_TOPDIR)
|
||||
AC_SUBST(JAXP_TOPDIR)
|
||||
AC_SUBST(JAXWS_TOPDIR)
|
||||
AC_SUBST(HOTSPOT_TOPDIR)
|
||||
AC_SUBST(NASHORN_TOPDIR)
|
||||
AC_SUBST(JDK_TOPDIR)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Pickup additional source for a component from outside of the source root
|
||||
# or override source for a component.
|
||||
#
|
||||
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
|
||||
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])])
|
||||
###############################################################################
|
||||
#
|
||||
# Pickup additional source for a component from outside of the source root
|
||||
# or override source for a component.
|
||||
#
|
||||
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
|
||||
the same directory; if it exists and have files in it, include it in the build])])
|
||||
|
||||
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])])
|
||||
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])])
|
||||
|
||||
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_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
|
||||
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
|
||||
CURDIR="$PWD"
|
||||
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.
|
||||
# If it does, then it is usually an error, prevent this.
|
||||
if test -f $with_add_source_root/langtools/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_add_source_root/corba/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jdk/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ADD_SRC_ROOT)
|
||||
fi
|
||||
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
|
||||
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
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_source_root"
|
||||
OVERRIDE_SRC_ROOT="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if test -f $with_override_source_root/langtools/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_override_source_root/corba/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jdk/makefiles/Makefile || \
|
||||
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.])
|
||||
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.])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OVERRIDE_SRC_ROOT)
|
||||
fi
|
||||
AC_SUBST(OVERRIDE_SRC_ROOT)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# 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
|
||||
# OpenJDK sources checked out on disk.
|
||||
#
|
||||
# Assuming that the 3 langtools sandboxes are located here:
|
||||
# /home/fredrik/sandbox1/langtools
|
||||
# /home/fredrik/sandbox2/langtools
|
||||
# /home/fredrik/sandbox3/langtools
|
||||
#
|
||||
# From the source root you create build subdirs manually:
|
||||
# mkdir -p build1 build2 build3
|
||||
# in each build directory run:
|
||||
# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
|
||||
# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
|
||||
# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# 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
|
||||
# OpenJDK sources checked out on disk.
|
||||
#
|
||||
# Assuming that the 3 langtools sandboxes are located here:
|
||||
# /home/fredrik/sandbox1/langtools
|
||||
# /home/fredrik/sandbox2/langtools
|
||||
# /home/fredrik/sandbox3/langtools
|
||||
#
|
||||
# From the source root you create build subdirs manually:
|
||||
# mkdir -p build1 build2 build3
|
||||
# in each build directory run:
|
||||
# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
|
||||
# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
|
||||
# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
|
||||
#
|
||||
|
||||
AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
|
||||
[use this langtools dir for the build])])
|
||||
AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
|
||||
[use this langtools dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
|
||||
[use this corba dir for the build])])
|
||||
AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
|
||||
[use this corba dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
|
||||
[use this jaxp dir for the build])])
|
||||
AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
|
||||
[use this jaxp dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
|
||||
[use this jaxws dir for the build])])
|
||||
AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
|
||||
[use this jaxws dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
|
||||
[use this hotspot dir for the build])])
|
||||
AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
|
||||
[use this hotspot dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
|
||||
[use this nashorn dir for the build])])
|
||||
AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
|
||||
[use this nashorn dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
|
||||
[use this jdk dir for the build])])
|
||||
AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
|
||||
[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"
|
||||
cd "$with_override_langtools"
|
||||
LANGTOOLS_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if langtools should be overridden])
|
||||
AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_corba" != x; then
|
||||
fi
|
||||
if test "x$with_override_corba" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_corba"
|
||||
CORBA_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if corba should be overridden])
|
||||
AC_MSG_RESULT([yes with $CORBA_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_jaxp" != x; then
|
||||
fi
|
||||
if test "x$with_override_jaxp" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_jaxp"
|
||||
JAXP_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if jaxp should be overridden])
|
||||
AC_MSG_RESULT([yes with $JAXP_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_jaxws" != x; then
|
||||
fi
|
||||
if test "x$with_override_jaxws" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_jaxws"
|
||||
JAXWS_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if jaxws should be overridden])
|
||||
AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_hotspot" != x; then
|
||||
fi
|
||||
if test "x$with_override_hotspot" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_hotspot"
|
||||
HOTSPOT_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
|
||||
! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
|
||||
! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if hotspot should be overridden])
|
||||
AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_nashorn" != x; then
|
||||
fi
|
||||
if test "x$with_override_nashorn" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_nashorn"
|
||||
NASHORN_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if nashorn should be overridden])
|
||||
AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_jdk" != x; then
|
||||
fi
|
||||
if test "x$with_override_jdk" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_jdk"
|
||||
JDK_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if JDK should be overridden])
|
||||
AC_MSG_RESULT([yes with $JDK_TOPDIR])
|
||||
fi
|
||||
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
|
||||
[
|
||||
BUILD_OUTPUT="$OUTPUT_ROOT"
|
||||
AC_SUBST(BUILD_OUTPUT)
|
||||
BUILD_OUTPUT="$OUTPUT_ROOT"
|
||||
AC_SUBST(BUILD_OUTPUT)
|
||||
|
||||
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
|
||||
BUILD_HOTSPOT=true
|
||||
AC_SUBST(HOTSPOT_DIST)
|
||||
AC_SUBST(BUILD_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])])
|
||||
if test "x$with_import_hotspot" != x; then
|
||||
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
|
||||
BUILD_HOTSPOT=true
|
||||
AC_SUBST(HOTSPOT_DIST)
|
||||
AC_SUBST(BUILD_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])])
|
||||
if test "x$with_import_hotspot" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_import_hotspot"
|
||||
HOTSPOT_DIST="`pwd`"
|
||||
cd "$CURDIR"
|
||||
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
|
||||
AC_MSG_CHECKING([if hotspot should be imported])
|
||||
AC_MSG_RESULT([yes from $HOTSPOT_DIST])
|
||||
BUILD_HOTSPOT=false
|
||||
fi
|
||||
fi
|
||||
|
||||
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
|
||||
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
|
||||
])
|
||||
|
@ -30,8 +30,8 @@
|
||||
# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
|
||||
# using 'configure @CONFIGURE_COMMAND_LINE@'
|
||||
|
||||
# When calling macros, the spaces between arguments are
|
||||
# often semantically important! Sometimes we need to subst
|
||||
# When calling macros, the spaces between arguments are
|
||||
# often semantically important! Sometimes we need to subst
|
||||
# spaces and commas, therefore we need the following macros.
|
||||
X:=
|
||||
SPACE:=$(X) $(X)
|
||||
@ -56,17 +56,17 @@ MAKE:=@MAKE@
|
||||
|
||||
# Pass along the verbosity and log level settings.
|
||||
ifeq (,$(findstring VERBOSE=,$(MAKE)))
|
||||
MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
|
||||
MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
|
||||
endif
|
||||
|
||||
# No implicit variables or rules!
|
||||
ifeq (,$(findstring -R,$(MAKE)))
|
||||
MAKE:=$(MAKE) -R
|
||||
MAKE:=$(MAKE) -R
|
||||
endif
|
||||
|
||||
# Specify where the common include directory for makefiles is.
|
||||
ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
|
||||
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
|
||||
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
|
||||
endif
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
@ -175,7 +175,7 @@ else
|
||||
RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
|
||||
endif
|
||||
|
||||
ifneq ($(USER_RELEASE_SUFFIX),)
|
||||
ifneq ($(USER_RELEASE_SUFFIX), )
|
||||
FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
|
||||
else
|
||||
FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
|
||||
@ -287,7 +287,7 @@ CACERTS_FILE=@CACERTS_FILE@
|
||||
# Enable unlimited crypto policy
|
||||
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
OPENWIN_HOME:=@OPENWIN_HOME@
|
||||
@ -388,7 +388,7 @@ LIPO:=@LIPO@
|
||||
# Command to create a shared library
|
||||
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)
|
||||
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
|
||||
# times.
|
||||
ifndef RC_FLAGS
|
||||
RC_FLAGS:=@RC_FLAGS@
|
||||
RC_FLAGS:=@RC_FLAGS@
|
||||
endif
|
||||
|
||||
# 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
|
||||
# for the background sjavac server process.
|
||||
ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
|
||||
BUILD_LOG_WRAPPER:=
|
||||
BUILD_LOG_WRAPPER:=
|
||||
else
|
||||
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
|
||||
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
|
||||
endif
|
||||
|
||||
# Build setup
|
||||
@ -563,12 +563,12 @@ MSVCR_DLL:=@MSVCR_DLL@
|
||||
# of the next macro to get rid of superfluous files.
|
||||
ADD_SRCS=$1
|
||||
ifneq (,$(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))
|
||||
# Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
|
||||
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
|
||||
endif
|
||||
ifneq (,$(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))
|
||||
# Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
|
||||
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
|
||||
endif
|
||||
|
||||
# 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 add overridden sources.
|
||||
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
|
||||
OVR_SRCS:=
|
||||
OVR_SRCS:=
|
||||
endif
|
||||
|
||||
####################################################
|
||||
@ -589,7 +589,7 @@ endif
|
||||
#
|
||||
|
||||
# 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@
|
||||
|
||||
# Directories containing architecture-dependent files should be relative to exec_prefix
|
||||
@ -619,7 +619,7 @@ INSTALL_INCLUDEDIR=@libdir@
|
||||
# Executables that other programs run.
|
||||
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@
|
||||
|
||||
# Modifiable single-machine data
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
VCVARSFILE="vc/bin/vcvars32.bat"
|
||||
else
|
||||
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
|
||||
fi
|
||||
fi
|
||||
|
||||
VS_ENV_CMD=""
|
||||
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([Please point to the VC/bin directory within the Visual Studio installation])
|
||||
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
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.
|
||||
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.
|
||||
AC_PATH_PROG(CYGWIN_LINK, link)
|
||||
if test "x$CYGWIN_LINK" != x; then
|
||||
@ -187,7 +187,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
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.
|
||||
AC_MSG_NOTICE([Setting extracted environment variables])
|
||||
. $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.
|
||||
AC_MSG_CHECKING([for Visual Studio variables])
|
||||
|
||||
|
||||
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
|
||||
if test "x$INCLUDE" = x || test "x$LIB" = x; then
|
||||
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_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
|
||||
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
|
||||
|
@ -36,7 +36,7 @@ include MakeBase.gmk
|
||||
default: all
|
||||
|
||||
# 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
|
||||
# not doing it breaks builds on msys.
|
||||
|
@ -23,52 +23,52 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
PREFIXES=-pkgPrefix CORBA org.omg \
|
||||
-pkgPrefix CosNaming org.omg \
|
||||
-pkgPrefix CosTransactions org.omg \
|
||||
-pkgPrefix CosTSInteroperation org.omg \
|
||||
-pkgPrefix DynamicAny org.omg \
|
||||
-pkgPrefix Dynamic org.omg \
|
||||
-pkgPrefix IOP org.omg \
|
||||
-pkgPrefix Messaging org.omg \
|
||||
-pkgPrefix PortableInterceptor org.omg \
|
||||
-pkgPrefix PortableServer org.omg \
|
||||
-pkgPrefix activation com.sun.corba.se.spi \
|
||||
-pkgPrefix GIOP com.sun.corba.se \
|
||||
-pkgPrefix PortableActivationIDL com.sun.corba.se \
|
||||
-pkgPrefix messages com.sun.corba.se
|
||||
PREFIXES=-pkgPrefix CORBA org.omg \
|
||||
-pkgPrefix CosNaming org.omg \
|
||||
-pkgPrefix CosTransactions org.omg \
|
||||
-pkgPrefix CosTSInteroperation org.omg \
|
||||
-pkgPrefix DynamicAny org.omg \
|
||||
-pkgPrefix Dynamic org.omg \
|
||||
-pkgPrefix IOP org.omg \
|
||||
-pkgPrefix Messaging org.omg \
|
||||
-pkgPrefix PortableInterceptor org.omg \
|
||||
-pkgPrefix PortableServer org.omg \
|
||||
-pkgPrefix activation com.sun.corba.se.spi \
|
||||
-pkgPrefix GIOP com.sun.corba.se \
|
||||
-pkgPrefix PortableActivationIDL com.sun.corba.se \
|
||||
-pkgPrefix messages com.sun.corba.se
|
||||
|
||||
define add_idl_package
|
||||
# param 1 = MYPACKAGE
|
||||
# param 2 = src root
|
||||
# param 3 = gensrc root
|
||||
# param 4 = source idl to compile
|
||||
# param 5 = target idl package
|
||||
# param 6 = delete these files that were output from the idlj
|
||||
# param 7 = idls that match these patterns should be compiled with -oldImplBase
|
||||
# param 8 = the idlj command
|
||||
# Save the generated java files to a temporary directory so
|
||||
# that we can find them and create proper dependencies.
|
||||
# After that, we move them to the real gensrc target dir.
|
||||
$4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
|
||||
ifneq ($$(filter $7,$4),)
|
||||
$4_OLDIMPLBASE:=-oldImplBase
|
||||
$4_OLDIMPLBASE_MSG:=with -oldImplBase
|
||||
endif
|
||||
$5 : $4
|
||||
# param 1 = MYPACKAGE
|
||||
# param 2 = src root
|
||||
# param 3 = gensrc root
|
||||
# param 4 = source idl to compile
|
||||
# param 5 = target idl package
|
||||
# param 6 = delete these files that were output from the idlj
|
||||
# param 7 = idls that match these patterns should be compiled with -oldImplBase
|
||||
# param 8 = the idlj command
|
||||
# Save the generated java files to a temporary directory so
|
||||
# that we can find them and create proper dependencies.
|
||||
# After that, we move them to the real gensrc target dir.
|
||||
$4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
|
||||
ifneq ($$(filter $7,$4),)
|
||||
$4_OLDIMPLBASE:=-oldImplBase
|
||||
$4_OLDIMPLBASE_MSG:=with -oldImplBase
|
||||
endif
|
||||
$5 : $4
|
||||
$(MKDIR) -p $3/$$($4_TMPDIR)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
$(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) \
|
||||
-i $2/org/omg/CORBA \
|
||||
-i $2/org/omg/PortableInterceptor \
|
||||
-i $2/org/omg/PortableServer \
|
||||
-D CORBA3 -corba 3.0 \
|
||||
-fall \
|
||||
$$($4_OLDIMPLBASE) \
|
||||
$(PREFIXES) \
|
||||
$4
|
||||
-i $2/org/omg/CORBA \
|
||||
-i $2/org/omg/PortableInterceptor \
|
||||
-i $2/org/omg/PortableServer \
|
||||
-D CORBA3 -corba 3.0 \
|
||||
-fall \
|
||||
$$($4_OLDIMPLBASE) \
|
||||
$(PREFIXES) \
|
||||
$4
|
||||
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
|
||||
$(CP) -r $3/$$($4_TMPDIR)/* $3
|
||||
($(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
|
||||
|
||||
define SetupIdlCompilation
|
||||
# param 1 is for example BUILD_IDLS
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# 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))
|
||||
$(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))
|
||||
# param 1 is for example BUILD_IDLS
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# 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))
|
||||
$(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))
|
||||
|
||||
# Find all existing java files and existing class files.
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
|
||||
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
|
||||
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
|
||||
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
|
||||
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
|
||||
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
|
||||
# Now remove unwanted java/class files.
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
|
||||
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
|
||||
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
|
||||
# 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))))
|
||||
# Find all existing java files and existing class files.
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
|
||||
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
|
||||
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
|
||||
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
|
||||
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
|
||||
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
|
||||
# Now remove unwanted java/class files.
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
|
||||
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
|
||||
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
|
||||
# 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))))
|
||||
endef
|
||||
|
||||
.SUFFIXES: .java .class .package
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@
|
||||
# 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.
|
||||
|
||||
# Utilities used in this Makefile. Most of this makefile executes without
|
||||
@ -36,7 +36,7 @@ MKDIR=mkdir
|
||||
PRINTF=printf
|
||||
PWD=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
|
||||
$(shell (cd "$1" && $(PWD)))
|
||||
endef
|
||||
@ -47,19 +47,19 @@ ifdef OPENJDK
|
||||
OPEN_BUILD=true
|
||||
else
|
||||
OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
|
||||
$(wildcard $(root_dir)/jdk/make/closed), \
|
||||
$(wildcard $(root_dir)/jdk/test/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/src/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/make/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/test/closed)), \
|
||||
false,true)
|
||||
$(wildcard $(root_dir)/jdk/make/closed), \
|
||||
$(wildcard $(root_dir)/jdk/test/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/src/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/make/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/test/closed)), \
|
||||
false,true)
|
||||
endif
|
||||
|
||||
HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
|
||||
|
||||
###########################################################################
|
||||
# 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
|
||||
# to parse the new spec file.
|
||||
@ -85,80 +85,80 @@ $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
|
||||
$(RM) $@.tmp
|
||||
$(MKDIR) -p $(BUILD_DIR_ROOT)
|
||||
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
|
||||
ifdef ARCH_DATA_MODEL
|
||||
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
|
||||
endif
|
||||
ifeq ($(ARCH_DATA_MODEL),32)
|
||||
@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_PARALLEL_COMPILE_JOBS
|
||||
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_BOOTDIR
|
||||
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CUPS_HEADERS_PATH
|
||||
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_FREETYPE_HEADERS_PATH
|
||||
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
|
||||
endif
|
||||
ifdef ENABLE_SJAVAC
|
||||
@$(ECHO) " --enable-sjavac" >> $@.tmp
|
||||
endif
|
||||
ifeq ($(HOTSPOT_AVAILABLE),false)
|
||||
ifdef ALT_JDK_IMPORT_PATH
|
||||
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OPEN_BUILD),true)
|
||||
@$(ECHO) " --enable-openjdk-only " >> $@.tmp
|
||||
else
|
||||
# Todo: move to closed?
|
||||
ifdef ALT_MOZILLA_HEADERS_PATH
|
||||
@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JUNIT_DIR
|
||||
@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ANT_HOME
|
||||
@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JAVAFX_ZIP_DIR
|
||||
@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JMC_ZIP_DIR
|
||||
@$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_WIXDIR
|
||||
@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_INSTALL_LZMA_PATH
|
||||
@$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_INSTALL_UPX_PATH
|
||||
@$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_INSTALL_UPX_FILENAME
|
||||
@$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CCSS_SIGNING_DIR
|
||||
@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_SLASH_JAVA
|
||||
@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_SPARKLE_FRAMEWORK_DIR
|
||||
@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
|
||||
endif
|
||||
endif
|
||||
ifdef ARCH_DATA_MODEL
|
||||
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
|
||||
endif
|
||||
ifeq ($(ARCH_DATA_MODEL),32)
|
||||
@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_PARALLEL_COMPILE_JOBS
|
||||
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_BOOTDIR
|
||||
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CUPS_HEADERS_PATH
|
||||
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_FREETYPE_HEADERS_PATH
|
||||
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
|
||||
endif
|
||||
ifdef ENABLE_SJAVAC
|
||||
@$(ECHO) " --enable-sjavac" >> $@.tmp
|
||||
endif
|
||||
ifeq ($(HOTSPOT_AVAILABLE),false)
|
||||
ifdef ALT_JDK_IMPORT_PATH
|
||||
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OPEN_BUILD),true)
|
||||
@$(ECHO) " --enable-openjdk-only " >> $@.tmp
|
||||
else
|
||||
# Todo: move to closed?
|
||||
ifdef ALT_MOZILLA_HEADERS_PATH
|
||||
@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JUNIT_DIR
|
||||
@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ANT_HOME
|
||||
@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JAVAFX_ZIP_DIR
|
||||
@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JMC_ZIP_DIR
|
||||
@$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_WIXDIR
|
||||
@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_INSTALL_LZMA_PATH
|
||||
@$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_INSTALL_UPX_PATH
|
||||
@$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_INSTALL_UPX_FILENAME
|
||||
@$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CCSS_SIGNING_DIR
|
||||
@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_SLASH_JAVA
|
||||
@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_SPARKLE_FRAMEWORK_DIR
|
||||
@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
|
||||
endif
|
||||
endif
|
||||
@if [ -f $@ ] ; then \
|
||||
if ! $(CMP) $@ $@.tmp > /dev/null ; then \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi
|
||||
if ! $(CMP) $@ $@.tmp > /dev/null ; then \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi
|
||||
$(RM) $@.tmp
|
||||
|
||||
PHONY_LIST += bridge2configure bridgeBuild
|
||||
@ -170,7 +170,7 @@ ifndef JPRT_ARCHIVE_BUNDLE
|
||||
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
|
||||
endif
|
||||
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
|
||||
|
||||
# These targets execute in a SPEC free context, before calling bridgeBuild
|
||||
@ -212,9 +212,9 @@ bundles-only: start-make
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/bundles
|
||||
$(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 .
|
||||
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
|
||||
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
|
||||
fi
|
||||
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
|
||||
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
|
||||
fi
|
||||
@$(call TargetExit)
|
||||
|
||||
# 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)
|
||||
$(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)/
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_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_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
|
||||
endif
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_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_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
|
||||
endif
|
||||
@$(call TargetExit)
|
||||
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
|
||||
jprt_build_generic bundles jprt_bundle \
|
||||
final-images final-images-only
|
||||
jprt_build_generic bundles jprt_bundle \
|
||||
final-images final-images-only
|
||||
|
||||
###########################################################################
|
||||
# Phony targets
|
||||
|
@ -28,7 +28,7 @@
|
||||
# Now load the 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 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
|
||||
ifneq (,$(BUILD_LOG))
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
endif
|
||||
$(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
endif
|
||||
$(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
|
||||
endif
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
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
|
||||
|
||||
# Reset the build timers.
|
||||
@ -103,8 +103,8 @@ jaxws-only: start-make
|
||||
@$(call TargetExit)
|
||||
|
||||
ifeq ($(BUILD_HOTSPOT),true)
|
||||
hotspot: hotspot-only
|
||||
hotspot-only: start-make
|
||||
hotspot: hotspot-only
|
||||
hotspot-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
||||
@$(call TargetExit)
|
||||
@ -149,9 +149,9 @@ profiles-only: start-make
|
||||
@$(call TargetExit)
|
||||
|
||||
profiles-oscheck:
|
||||
ifneq ($(OPENJDK_TARGET_OS), linux)
|
||||
@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
|
||||
endif
|
||||
ifneq ($(OPENJDK_TARGET_OS), linux)
|
||||
@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
|
||||
endif
|
||||
|
||||
install: images install-only
|
||||
install-only: start-make
|
||||
@ -202,12 +202,12 @@ clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jd
|
||||
dist-clean: clean
|
||||
@($(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 test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
|
||||
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
|
||||
else \
|
||||
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
|
||||
fi \
|
||||
)
|
||||
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
|
||||
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
|
||||
else \
|
||||
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
|
||||
fi \
|
||||
)
|
||||
@$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
|
||||
clean-langtools:
|
||||
|
@ -48,314 +48,314 @@ $(subst $(SPACE),\n,$(strip $1)))))\
|
||||
$(compress_post)
|
||||
|
||||
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|X00|X|g' | tr '\n' '$2'
|
||||
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
|
||||
-e 's|X00|X|g' | tr '\n' '$2'
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
# Receipt example:
|
||||
# rm -f thepaths
|
||||
# $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
|
||||
# The \n argument means translate spaces into \n
|
||||
# if instead , , (a space) is supplied, then spaces remain spaces.
|
||||
# rm -f thepaths
|
||||
# $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
|
||||
# The \n argument means translate spaces into \n
|
||||
# if instead , , (a space) is supplied, then spaces remain spaces.
|
||||
define ListPathsSafely
|
||||
$(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,251,500)
|
||||
$(call ListPathsSafely_If,$1,$2,501,750)
|
||||
$(call ListPathsSafely_If,$1,$2,751,1000)
|
||||
$(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,251,500)
|
||||
$(call ListPathsSafely_If,$1,$2,501,750)
|
||||
$(call ListPathsSafely_If,$1,$2,751,1000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,1001,1250)
|
||||
$(call ListPathsSafely_If,$1,$2,1251,1500)
|
||||
$(call ListPathsSafely_If,$1,$2,1501,1750)
|
||||
$(call ListPathsSafely_If,$1,$2,1751,2000)
|
||||
$(call ListPathsSafely_If,$1,$2,1001,1250)
|
||||
$(call ListPathsSafely_If,$1,$2,1251,1500)
|
||||
$(call ListPathsSafely_If,$1,$2,1501,1750)
|
||||
$(call ListPathsSafely_If,$1,$2,1751,2000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,2001,2250)
|
||||
$(call ListPathsSafely_If,$1,$2,2251,2500)
|
||||
$(call ListPathsSafely_If,$1,$2,2501,2750)
|
||||
$(call ListPathsSafely_If,$1,$2,2751,3000)
|
||||
$(call ListPathsSafely_If,$1,$2,2001,2250)
|
||||
$(call ListPathsSafely_If,$1,$2,2251,2500)
|
||||
$(call ListPathsSafely_If,$1,$2,2501,2750)
|
||||
$(call ListPathsSafely_If,$1,$2,2751,3000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,3001,3250)
|
||||
$(call ListPathsSafely_If,$1,$2,3251,3500)
|
||||
$(call ListPathsSafely_If,$1,$2,3501,3750)
|
||||
$(call ListPathsSafely_If,$1,$2,3751,4000)
|
||||
$(call ListPathsSafely_If,$1,$2,3001,3250)
|
||||
$(call ListPathsSafely_If,$1,$2,3251,3500)
|
||||
$(call ListPathsSafely_If,$1,$2,3501,3750)
|
||||
$(call ListPathsSafely_If,$1,$2,3751,4000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,4001,4250)
|
||||
$(call ListPathsSafely_If,$1,$2,4251,4500)
|
||||
$(call ListPathsSafely_If,$1,$2,4501,4750)
|
||||
$(call ListPathsSafely_If,$1,$2,4751,5000)
|
||||
$(call ListPathsSafely_If,$1,$2,4001,4250)
|
||||
$(call ListPathsSafely_If,$1,$2,4251,4500)
|
||||
$(call ListPathsSafely_If,$1,$2,4501,4750)
|
||||
$(call ListPathsSafely_If,$1,$2,4751,5000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,5001,5250)
|
||||
$(call ListPathsSafely_If,$1,$2,5251,5500)
|
||||
$(call ListPathsSafely_If,$1,$2,5501,5750)
|
||||
$(call ListPathsSafely_If,$1,$2,5751,6000)
|
||||
$(call ListPathsSafely_If,$1,$2,5001,5250)
|
||||
$(call ListPathsSafely_If,$1,$2,5251,5500)
|
||||
$(call ListPathsSafely_If,$1,$2,5501,5750)
|
||||
$(call ListPathsSafely_If,$1,$2,5751,6000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,6001,6250)
|
||||
$(call ListPathsSafely_If,$1,$2,6251,6500)
|
||||
$(call ListPathsSafely_If,$1,$2,6501,6750)
|
||||
$(call ListPathsSafely_If,$1,$2,6751,7000)
|
||||
$(call ListPathsSafely_If,$1,$2,6001,6250)
|
||||
$(call ListPathsSafely_If,$1,$2,6251,6500)
|
||||
$(call ListPathsSafely_If,$1,$2,6501,6750)
|
||||
$(call ListPathsSafely_If,$1,$2,6751,7000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,7001,7250)
|
||||
$(call ListPathsSafely_If,$1,$2,7251,7500)
|
||||
$(call ListPathsSafely_If,$1,$2,7501,7750)
|
||||
$(call ListPathsSafely_If,$1,$2,7751,8000)
|
||||
$(call ListPathsSafely_If,$1,$2,7001,7250)
|
||||
$(call ListPathsSafely_If,$1,$2,7251,7500)
|
||||
$(call ListPathsSafely_If,$1,$2,7501,7750)
|
||||
$(call ListPathsSafely_If,$1,$2,7751,8000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,8001,8250)
|
||||
$(call ListPathsSafely_If,$1,$2,8251,8500)
|
||||
$(call ListPathsSafely_If,$1,$2,8501,8750)
|
||||
$(call ListPathsSafely_If,$1,$2,8751,9000)
|
||||
$(call ListPathsSafely_If,$1,$2,8001,8250)
|
||||
$(call ListPathsSafely_If,$1,$2,8251,8500)
|
||||
$(call ListPathsSafely_If,$1,$2,8501,8750)
|
||||
$(call ListPathsSafely_If,$1,$2,8751,9000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,9001,9250)
|
||||
$(call ListPathsSafely_If,$1,$2,9251,9500)
|
||||
$(call ListPathsSafely_If,$1,$2,9501,9750)
|
||||
$(call ListPathsSafely_If,$1,$2,9751,10000)
|
||||
$(call ListPathsSafely_If,$1,$2,9001,9250)
|
||||
$(call ListPathsSafely_If,$1,$2,9251,9500)
|
||||
$(call ListPathsSafely_If,$1,$2,9501,9750)
|
||||
$(call ListPathsSafely_If,$1,$2,9751,10000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,10001,10250)
|
||||
$(call ListPathsSafely_If,$1,$2,10251,10500)
|
||||
$(call ListPathsSafely_If,$1,$2,10501,10750)
|
||||
$(call ListPathsSafely_If,$1,$2,10751,11000)
|
||||
$(call ListPathsSafely_If,$1,$2,10001,10250)
|
||||
$(call ListPathsSafely_If,$1,$2,10251,10500)
|
||||
$(call ListPathsSafely_If,$1,$2,10501,10750)
|
||||
$(call ListPathsSafely_If,$1,$2,10751,11000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,11001,11250)
|
||||
$(call ListPathsSafely_If,$1,$2,11251,11500)
|
||||
$(call ListPathsSafely_If,$1,$2,11501,11750)
|
||||
$(call ListPathsSafely_If,$1,$2,11751,12000)
|
||||
$(call ListPathsSafely_If,$1,$2,11001,11250)
|
||||
$(call ListPathsSafely_If,$1,$2,11251,11500)
|
||||
$(call ListPathsSafely_If,$1,$2,11501,11750)
|
||||
$(call ListPathsSafely_If,$1,$2,11751,12000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,12001,12250)
|
||||
$(call ListPathsSafely_If,$1,$2,12251,12500)
|
||||
$(call ListPathsSafely_If,$1,$2,12501,12750)
|
||||
$(call ListPathsSafely_If,$1,$2,12751,13000)
|
||||
$(call ListPathsSafely_If,$1,$2,12001,12250)
|
||||
$(call ListPathsSafely_If,$1,$2,12251,12500)
|
||||
$(call ListPathsSafely_If,$1,$2,12501,12750)
|
||||
$(call ListPathsSafely_If,$1,$2,12751,13000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,13001,13250)
|
||||
$(call ListPathsSafely_If,$1,$2,13251,13500)
|
||||
$(call ListPathsSafely_If,$1,$2,13501,13750)
|
||||
$(call ListPathsSafely_If,$1,$2,13751,14000)
|
||||
$(call ListPathsSafely_If,$1,$2,13001,13250)
|
||||
$(call ListPathsSafely_If,$1,$2,13251,13500)
|
||||
$(call ListPathsSafely_If,$1,$2,13501,13750)
|
||||
$(call ListPathsSafely_If,$1,$2,13751,14000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,14001,14250)
|
||||
$(call ListPathsSafely_If,$1,$2,14251,14500)
|
||||
$(call ListPathsSafely_If,$1,$2,14501,14750)
|
||||
$(call ListPathsSafely_If,$1,$2,14751,15000)
|
||||
$(call ListPathsSafely_If,$1,$2,14001,14250)
|
||||
$(call ListPathsSafely_If,$1,$2,14251,14500)
|
||||
$(call ListPathsSafely_If,$1,$2,14501,14750)
|
||||
$(call ListPathsSafely_If,$1,$2,14751,15000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,15001,15250)
|
||||
$(call ListPathsSafely_If,$1,$2,15251,15500)
|
||||
$(call ListPathsSafely_If,$1,$2,15501,15750)
|
||||
$(call ListPathsSafely_If,$1,$2,15751,16000)
|
||||
$(call ListPathsSafely_If,$1,$2,15001,15250)
|
||||
$(call ListPathsSafely_If,$1,$2,15251,15500)
|
||||
$(call ListPathsSafely_If,$1,$2,15501,15750)
|
||||
$(call ListPathsSafely_If,$1,$2,15751,16000)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,10751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,11751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,12751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,13751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,14751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15751)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,15751)
|
||||
endef
|
||||
|
||||
define ListPathsSafelyNow_IfPrintf
|
||||
ifneq (,$$(word $4,$$($1)))
|
||||
$$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
|
||||
$$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
|
||||
endif
|
||||
ifneq (,$$(word $4,$$($1)))
|
||||
$$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
|
||||
$$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
|
||||
endif
|
||||
endef
|
||||
|
||||
# And an non-receipt version:
|
||||
define ListPathsSafelyNow
|
||||
ifneq (,$$(word 10001,$$($1)))
|
||||
$$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
|
||||
endif
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
|
||||
ifneq (,$$(word 10001,$$($1)))
|
||||
$$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
|
||||
endif
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
|
||||
|
||||
endef
|
||||
|
||||
# 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
|
||||
# directory as the original $(HGDIR) directory.
|
||||
# These should not be := assignments, only used from the root Makefile.
|
||||
# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
|
||||
# directory as the original $(HGDIR) directory.
|
||||
# These should not be := assignments, only used from the root Makefile.
|
||||
HG_VERSION = $(shell $(HG) version 2> /dev/null)
|
||||
HG_DIRECTORY=.hg
|
||||
HGTIP_FILENAME=.hgtip
|
||||
HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
|
||||
REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
|
||||
$(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
|
||||
$(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
|
||||
2> /dev/null)))))
|
||||
$(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
|
||||
2> /dev/null)))))
|
||||
|
||||
# Emit the repo:tip pairs to $@
|
||||
define GetSourceTips
|
||||
$(CD) $(SRC_ROOT) ; \
|
||||
for i in $(REPO_LIST) IGNORE ; do \
|
||||
if [ "$${i}" = "IGNORE" ] ; then \
|
||||
continue; \
|
||||
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
|
||||
elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
|
||||
fi; \
|
||||
done >> $@
|
||||
$(PRINTF) "\n" >> $@
|
||||
$(CD) $(SRC_ROOT) ; \
|
||||
for i in $(REPO_LIST) IGNORE ; do \
|
||||
if [ "$${i}" = "IGNORE" ] ; then \
|
||||
continue; \
|
||||
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
|
||||
elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
|
||||
fi; \
|
||||
done >> $@
|
||||
$(PRINTF) "\n" >> $@
|
||||
endef
|
||||
|
||||
# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
|
||||
define CreateHgTip
|
||||
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\
|
||||
$(ECHO) $1/$(HGTIP_FILENAME)
|
||||
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME); \
|
||||
$(ECHO) $1/$(HGTIP_FILENAME)
|
||||
endef
|
||||
|
||||
define SetupLogging
|
||||
ifeq ($$(LOG_LEVEL),trace)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
# For each target executed, will print
|
||||
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
|
||||
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
|
||||
# (and causing a crash on Cygwin).
|
||||
# Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
|
||||
# Only use time if it's GNU time which supports format and output file.
|
||||
WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
|
||||
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
|
||||
endif
|
||||
# Never remove warning messages; this is just for completeness
|
||||
LOG_WARN=
|
||||
ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
|
||||
LOG_INFO=
|
||||
else
|
||||
LOG_INFO=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
|
||||
LOG_DEBUG=
|
||||
else
|
||||
LOG_DEBUG=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG_LEVEL),trace),)
|
||||
LOG_TRACE=
|
||||
else
|
||||
LOG_TRACE=> /dev/null
|
||||
endif
|
||||
ifeq ($$(LOG_LEVEL),trace)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
# For each target executed, will print
|
||||
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
|
||||
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
|
||||
# (and causing a crash on Cygwin).
|
||||
# Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
|
||||
# Only use time if it's GNU time which supports format and output file.
|
||||
WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
|
||||
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
|
||||
endif
|
||||
# Never remove warning messages; this is just for completeness
|
||||
LOG_WARN=
|
||||
ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
|
||||
LOG_INFO=
|
||||
else
|
||||
LOG_INFO=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
|
||||
LOG_DEBUG=
|
||||
else
|
||||
LOG_DEBUG=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG_LEVEL),trace),)
|
||||
LOG_TRACE=
|
||||
else
|
||||
LOG_TRACE=> /dev/null
|
||||
endif
|
||||
endef
|
||||
|
||||
# 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
|
||||
define LogSetupMacroEntry
|
||||
$(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 $(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))))))
|
||||
endef
|
||||
|
||||
# Make directory without forking mkdir if not needed
|
||||
define MakeDir
|
||||
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)
|
||||
endif
|
||||
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)
|
||||
endif
|
||||
endef
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
# 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
|
||||
# name of the target file differs from the source file, rename after copy.
|
||||
define install-file
|
||||
# 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
|
||||
# name of the target file differs from the source file, rename after copy.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) '$@'
|
||||
$(CP) -f -r -P '$<' '$(@D)'
|
||||
if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
|
||||
endef
|
||||
endef
|
||||
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
# 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
|
||||
# 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
|
||||
# attributes when they are present, failing on this is avoided.
|
||||
define install-file
|
||||
# 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
|
||||
# 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
|
||||
# attributes when they are present, failing on this is avoided.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -fRP '$<' '$@'
|
||||
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
|
||||
endef
|
||||
endef
|
||||
else
|
||||
define install-file
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -fP '$<' '$@'
|
||||
endef
|
||||
endef
|
||||
endif
|
||||
|
||||
# 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
|
||||
# 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
|
||||
# of simple find commands for reuse.
|
||||
#
|
||||
#
|
||||
# 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
|
||||
# with no filters.
|
||||
#
|
||||
# Needs to be called with $(eval )
|
||||
#
|
||||
#
|
||||
# Param 1 - Dir to find in
|
||||
ifeq ($(OPENJDK_BUILD_OS),windows)
|
||||
define FillCacheFind
|
||||
define FillCacheFind
|
||||
FIND_CACHE_DIR += $1
|
||||
FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
|
||||
endef
|
||||
endef
|
||||
else
|
||||
define FillCacheFind
|
||||
endef
|
||||
define FillCacheFind
|
||||
endef
|
||||
endif
|
||||
|
||||
# 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.
|
||||
# Param 1 - Dirs to find in
|
||||
define CacheFind
|
||||
$(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1),\
|
||||
$(shell $(FIND) $1 -type f -o -type l),\
|
||||
$(filter $(addsuffix %,$1),$(FIND_CACHE)))
|
||||
$(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
|
||||
$(shell $(FIND) $1 -type f -o -type l), \
|
||||
$(filter $(addsuffix %,$1),$(FIND_CACHE)))
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
|
@ -26,7 +26,7 @@
|
||||
################################################################
|
||||
#
|
||||
# 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.)
|
||||
#
|
||||
################################################################
|
||||
@ -49,7 +49,7 @@ list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_
|
||||
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# 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
|
||||
|
||||
##############################
|
||||
@ -57,55 +57,55 @@ global_targets=help jprt% bridgeBuild
|
||||
##############################
|
||||
|
||||
define CheckEnvironment
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\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"
|
||||
)
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\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"
|
||||
)
|
||||
endef
|
||||
|
||||
### Functions for timers
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(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' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
$(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' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# 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
|
||||
$(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
|
||||
$(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); \
|
||||
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
|
||||
$(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
|
||||
$(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); \
|
||||
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
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(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_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
$(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_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
endef
|
||||
|
||||
define ResetAllTimers
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
endef
|
||||
|
||||
define StartGlobalTimer
|
||||
$(call RecordStartTime,TOTAL)
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
|
||||
define StopGlobalTimer
|
||||
$(call RecordEndTime,TOTAL)
|
||||
$(call RecordEndTime,TOTAL)
|
||||
endef
|
||||
|
||||
### 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
|
||||
# the user on the command line. If so, call AtRootMakeEnd.
|
||||
define CheckIfMakeAtEnd
|
||||
# Check if the current target is the last goal
|
||||
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If the target is 'foo-only', check if our goal was stated as 'foo'
|
||||
$(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
|
||||
# Check if the current target is the last goal
|
||||
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If the target is 'foo-only', check if our goal was stated as 'foo'
|
||||
$(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
|
||||
endef
|
||||
|
||||
# Hook to be called when starting to execute a top-level target
|
||||
define TargetEnter
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
|
||||
$(call RecordStartTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
|
||||
$(call RecordStartTime,$(patsubst %-only,%,$@))
|
||||
endef
|
||||
|
||||
# Hook to be called when finish executing a top-level target
|
||||
define TargetExit
|
||||
$(call RecordEndTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
|
||||
$(call CheckIfMakeAtEnd)
|
||||
$(call RecordEndTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
|
||||
$(call CheckIfMakeAtEnd)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtMakeStart
|
||||
$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
|
||||
$(call CheckEnvironment)
|
||||
@$(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"
|
||||
$(call StartGlobalTimer)
|
||||
$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
|
||||
$(call CheckEnvironment)
|
||||
@$(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"
|
||||
$(call StartGlobalTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtMakeEnd
|
||||
[ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
|
||||
$(call StopGlobalTimer)
|
||||
$(call ReportBuildTimes)
|
||||
@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
|
||||
$(call CheckEnvironment)
|
||||
[ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
|
||||
$(call StopGlobalTimer)
|
||||
$(call ReportBuildTimes)
|
||||
@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
|
||||
$(call CheckEnvironment)
|
||||
endef
|
||||
|
||||
### Functions for parsing and setting up make options from command-line
|
||||
|
||||
define FatalError
|
||||
# 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 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))
|
||||
endef
|
||||
|
||||
define ParseLogLevel
|
||||
ifeq ($$(origin VERBOSE),undefined)
|
||||
# Setup logging according to LOG (but only if VERBOSE is not given)
|
||||
ifeq ($$(origin VERBOSE),undefined)
|
||||
# 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
|
||||
ifneq ($$(findstring nofile,$$(LOG)),)
|
||||
# Reset the build log wrapper, regardless of other values
|
||||
override BUILD_LOG_WRAPPER=
|
||||
# COMMA is defined in spec.gmk, but that is not included yet
|
||||
COMMA=,
|
||||
# First try to remove ",nofile" if it exists
|
||||
LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
|
||||
# Otherwise just remove "nofile"
|
||||
LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
|
||||
# We might have ended up with a leading comma. Remove it
|
||||
LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
|
||||
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
|
||||
# If the "nofile" argument is given, act on it and strip it away
|
||||
ifneq ($$(findstring nofile,$$(LOG)),)
|
||||
# Reset the build log wrapper, regardless of other values
|
||||
override BUILD_LOG_WRAPPER=
|
||||
# COMMA is defined in spec.gmk, but that is not included yet
|
||||
COMMA=,
|
||||
# First try to remove ",nofile" if it exists
|
||||
LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
|
||||
# Otherwise just remove "nofile"
|
||||
LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
|
||||
# We might have ended up with a leading comma. Remove it
|
||||
LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
|
||||
LOG_LEVEL:=$$(LOG_STRIPPED3)
|
||||
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
|
||||
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
|
||||
# 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
|
||||
|
||||
define ParseConfAndSpec
|
||||
ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
|
||||
# If we only have global targets, no need to bother with SPEC or CONF
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# 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.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(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
|
||||
ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
|
||||
# If we only have global targets, no need to bother with SPEC or CONF
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# 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.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(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
|
||||
endef
|
||||
|
||||
### Convenience functions from Main.gmk
|
||||
|
||||
# Cleans the component given as $1
|
||||
define CleanComponent
|
||||
@$(PRINTF) "Cleaning $1 build artifacts ..."
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(PRINTF) "Cleaning $1 build artifacts ..."
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
endif # _MAKEHELPERS_GMK
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,74 +24,74 @@
|
||||
#
|
||||
|
||||
define SetupRMICompilation
|
||||
# param 1 is a name for a variable to depend on.
|
||||
# param 2 and up are named args.
|
||||
# CLASSES:=List of classes to generate stubs for
|
||||
# CLASSES_DIR:=Directory where to look for classes
|
||||
# STUB_CLASSES_DIR:=Directory in where to put stub classes
|
||||
# RUN_V11:=Set to run rmic with -v1.1
|
||||
# RUN_V12:=Set to run rmic with -v1.2
|
||||
# RUN_IIOP:=Set to run rmic with -iiop
|
||||
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
|
||||
# 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))
|
||||
$(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))
|
||||
# param 1 is a name for a variable to depend on.
|
||||
# param 2 and up are named args.
|
||||
# CLASSES:=List of classes to generate stubs for
|
||||
# CLASSES_DIR:=Directory where to look for classes
|
||||
# STUB_CLASSES_DIR:=Directory in where to put stub classes
|
||||
# RUN_V11:=Set to run rmic with -v1.1
|
||||
# RUN_V12:=Set to run rmic with -v1.2
|
||||
# RUN_IIOP:=Set to run rmic with -iiop
|
||||
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
|
||||
# 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))
|
||||
$(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))
|
||||
|
||||
$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_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_TARGETS := $$($1_STUB_FILES)
|
||||
$1_ARGS :=
|
||||
ifneq (,$$($1_RUN_V11))
|
||||
$1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
|
||||
$1_TARGETS += $$($1_SKEL_FILES)
|
||||
$1_ARGS += -v1.1
|
||||
endif
|
||||
ifneq (,$$($1_RUN_V12))
|
||||
$1_ARGS += -v1.2
|
||||
endif
|
||||
$1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
|
||||
$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_TARGETS := $$($1_STUB_FILES)
|
||||
$1_ARGS :=
|
||||
ifneq (,$$($1_RUN_V11))
|
||||
$1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
|
||||
$1_TARGETS += $$($1_SKEL_FILES)
|
||||
$1_ARGS += -v1.1
|
||||
endif
|
||||
ifneq (,$$($1_RUN_V12))
|
||||
$1_ARGS += -v1.2
|
||||
endif
|
||||
|
||||
$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_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
$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_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
|
||||
ifneq (,$$($1_RUN_IIOP))
|
||||
$1_TARGETS += $$($1_TIE_FILES)
|
||||
$1_ARGS += -iiop
|
||||
endif
|
||||
ifneq (,$$($1_RUN_IIOP_STDPKG))
|
||||
$1_TARGETS += $$($1_TIE_STDPKG_FILES)
|
||||
$1_ARGS2 := -iiop -standardPackage
|
||||
endif
|
||||
ifneq (,$$($1_RUN_IIOP))
|
||||
$1_TARGETS += $$($1_TIE_FILES)
|
||||
$1_ARGS += -iiop
|
||||
endif
|
||||
ifneq (,$$($1_RUN_IIOP_STDPKG))
|
||||
$1_TARGETS += $$($1_TIE_STDPKG_FILES)
|
||||
$1_ARGS2 := -iiop -standardPackage
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_KEEP_GENERATED))
|
||||
$1_ARGS += -keepgenerated
|
||||
$1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
|
||||
endif
|
||||
ifneq (,$$($1_KEEP_GENERATED))
|
||||
$1_ARGS += -keepgenerated
|
||||
$1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
|
||||
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)
|
||||
if [ "x$$($1_ARGS)" != "x" ]; then \
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
fi;
|
||||
if [ "x$$($1_ARGS2)" != "x" ]; then \
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
fi;
|
||||
|
||||
|
||||
$1 := $$($1_TARGETS)
|
||||
$1 := $$($1_TARGETS)
|
||||
|
||||
# By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
|
||||
.SECONDARY: $$($1_DEP_FILE)
|
||||
# By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
|
||||
.SECONDARY: $$($1_DEP_FILE)
|
||||
endef
|
||||
|
@ -25,12 +25,12 @@
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
# This Makefile, together with Tools.gmk, can be used to compile a set of
|
||||
# gcc based cross compilation, portable, self contained packages, capable
|
||||
# This Makefile, together with Tools.gmk, can be used to compile a set of
|
||||
# gcc based cross compilation, portable, self contained packages, capable
|
||||
# of building OpenJDK.
|
||||
#
|
||||
# In addition to the makefiles, access to Oracle Linux installation
|
||||
# media is required. This has been tested against Oracle Enterprise Linux
|
||||
#
|
||||
# In addition to the makefiles, access to Oracle Linux installation
|
||||
# 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
|
||||
# to directory containing the RPMs.
|
||||
#
|
||||
@ -43,9 +43,9 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
os := $(shell uname -o)
|
||||
cpu := x86_64
|
||||
os := $(shell uname -o)
|
||||
cpu := x86_64
|
||||
#$(shell uname -p)
|
||||
|
||||
#
|
||||
# This wrapper script can handle exactly these platforms
|
||||
#
|
||||
platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
|
||||
#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
|
||||
platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
|
||||
#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
|
||||
|
||||
# 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))
|
||||
|
||||
all compile : $(platforms)
|
||||
all compile : $(platforms)
|
||||
|
||||
ifeq (,$(SKIP_ME))
|
||||
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
|
||||
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
|
||||
endif
|
||||
|
||||
OUTPUT_ROOT = $(abspath ../../../build/devkit)
|
||||
RESULT = $(OUTPUT_ROOT)/result
|
||||
OUTPUT_ROOT = $(abspath ../../../build/devkit)
|
||||
RESULT = $(OUTPUT_ROOT)/result
|
||||
|
||||
submakevars = HOST=$@ BUILD=$(me) \
|
||||
RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
|
||||
OUTPUT_ROOT=$(OUTPUT_ROOT)
|
||||
$(platforms) :
|
||||
@echo 'Building compilers for $@'
|
||||
@echo 'Targets: $(platforms)'
|
||||
for p in $@ $(filter-out $@,$(platforms)); do \
|
||||
$(MAKE) -f Tools.gmk all $(submakevars) \
|
||||
TARGET=$$p || exit 1 ; \
|
||||
done
|
||||
@echo 'Building ccache program for $@'
|
||||
$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
|
||||
@echo 'All done"'
|
||||
submakevars = HOST=$@ BUILD=$(me) \
|
||||
RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
|
||||
OUTPUT_ROOT=$(OUTPUT_ROOT)
|
||||
$(platforms) :
|
||||
@echo 'Building compilers for $@'
|
||||
@echo 'Targets: $(platforms)'
|
||||
for p in $@ $(filter-out $@,$(platforms)); do \
|
||||
$(MAKE) -f Tools.gmk all $(submakevars) \
|
||||
TARGET=$$p || exit 1 ; \
|
||||
done
|
||||
@echo 'Building ccache program for $@'
|
||||
$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
|
||||
@echo 'All done"'
|
||||
|
||||
$(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
|
||||
|
||||
ia32 : i686
|
||||
today := $(shell date +%Y%m%d)
|
||||
ia32 : i686
|
||||
today := $(shell date +%Y%m%d)
|
||||
|
||||
|
||||
define Mktar
|
||||
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
|
||||
$$($(1)_tar) : PLATFORM = $(1)
|
||||
TARFILES += $$($(1)_tar)
|
||||
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
|
||||
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
|
||||
$$($(1)_tar) : PLATFORM = $(1)
|
||||
TARFILES += $$($(1)_tar)
|
||||
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
|
||||
endef
|
||||
|
||||
$(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
|
||||
|
||||
tars : all $(TARFILES)
|
||||
onlytars : $(TARFILES)
|
||||
%.tar.gz :
|
||||
@echo 'Creating compiler package $@'
|
||||
cd $(RESULT)/$(PLATFORM) && tar -czf $@ *
|
||||
touch $@
|
||||
tars : all $(TARFILES)
|
||||
onlytars : $(TARFILES)
|
||||
%.tar.gz :
|
||||
@echo 'Creating compiler package $@'
|
||||
cd $(RESULT)/$(PLATFORM) && tar -czf $@ *
|
||||
touch $@
|
||||
|
||||
clean :
|
||||
clean :
|
||||
rm -rf build result
|
||||
|
||||
FORCE :
|
||||
.PHONY : $(configs) $(platforms)
|
||||
|
||||
|
||||
FORCE :
|
||||
.PHONY : $(configs) $(platforms)
|
||||
|
@ -26,15 +26,15 @@
|
||||
##########################################################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# NOTE: There is a bug here. We don't limit the
|
||||
# PATH when building BUILD -> BUILD, which means that
|
||||
# NOTE: There is a bug here. We don't limit the
|
||||
# PATH when building BUILD -> BUILD, which means that
|
||||
# if you configure after you've once build the BUILD->BUILD
|
||||
# compiler THAT one will be picked up as the compiler for itself.
|
||||
# This is not so great, especially if you did a partial delete
|
||||
# of the target tree.
|
||||
# of the target tree.
|
||||
#
|
||||
# Fix this...
|
||||
#
|
||||
@ -43,45 +43,45 @@ $(info TARGET=$(TARGET))
|
||||
$(info HOST=$(HOST))
|
||||
$(info BUILD=$(BUILD))
|
||||
|
||||
ARCH := $(word 1,$(subst -, ,$(TARGET)))
|
||||
ARCH := $(word 1,$(subst -, ,$(TARGET)))
|
||||
|
||||
##########################################################################################
|
||||
# Define external dependencies
|
||||
|
||||
# Latest that could be made to work.
|
||||
gcc_ver := gcc-4.7.3
|
||||
binutils_ver := binutils-2.22
|
||||
ccache_ver := ccache-3.1.9
|
||||
mpfr_ver := mpfr-3.0.1
|
||||
gmp_ver := gmp-4.3.2
|
||||
mpc_ver := mpc-1.0.1
|
||||
gcc_ver := gcc-4.7.3
|
||||
binutils_ver := binutils-2.22
|
||||
ccache_ver := ccache-3.1.9
|
||||
mpfr_ver := mpfr-3.0.1
|
||||
gmp_ver := gmp-4.3.2
|
||||
mpc_ver := mpc-1.0.1
|
||||
|
||||
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
|
||||
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
|
||||
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_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
|
||||
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
|
||||
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
|
||||
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_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
|
||||
|
||||
# RPMs in OEL5.5
|
||||
RPM_LIST := \
|
||||
kernel-headers \
|
||||
glibc-2 glibc-headers glibc-devel \
|
||||
cups-libs cups-devel \
|
||||
libX11 libX11-devel \
|
||||
xorg-x11-proto-devel \
|
||||
alsa-lib alsa-lib-devel \
|
||||
libXext libXext-devel \
|
||||
libXtst libXtst-devel \
|
||||
libXrender libXrender-devel \
|
||||
freetype freetype-devel \
|
||||
libXt libXt-devel \
|
||||
libSM libSM-devel \
|
||||
libICE libICE-devel \
|
||||
libXi libXi-devel \
|
||||
libXdmcp libXdmcp-devel \
|
||||
libXau libXau-devel \
|
||||
libgcc
|
||||
RPM_LIST := \
|
||||
kernel-headers \
|
||||
glibc-2 glibc-headers glibc-devel \
|
||||
cups-libs cups-devel \
|
||||
libX11 libX11-devel \
|
||||
xorg-x11-proto-devel \
|
||||
alsa-lib alsa-lib-devel \
|
||||
libXext libXext-devel \
|
||||
libXtst libXtst-devel \
|
||||
libXrender libXrender-devel \
|
||||
freetype freetype-devel \
|
||||
libXt libXt-devel \
|
||||
libSM libSM-devel \
|
||||
libICE libICE-devel \
|
||||
libXi libXi-devel \
|
||||
libXdmcp libXdmcp-devel \
|
||||
libXau libXau-devel \
|
||||
libgcc
|
||||
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
@ -90,7 +90,7 @@ ifeq ($(ARCH),x86_64)
|
||||
ifeq ($(BUILD),$(HOST))
|
||||
ifeq ($(TARGET),$(HOST))
|
||||
# When building the native compiler for x86_64, enable mixed mode.
|
||||
RPM_ARCHS += i386 i686
|
||||
RPM_ARCHS += i386 i686
|
||||
endif
|
||||
endif
|
||||
else
|
||||
@ -110,47 +110,47 @@ endif
|
||||
|
||||
# Ensure we have 32-bit libs also for x64. We enable mixed-mode.
|
||||
ifeq (x86_64,$(ARCH))
|
||||
LIBDIRS := lib64 lib
|
||||
CFLAGS_lib := -m32
|
||||
LIBDIRS := lib64 lib
|
||||
CFLAGS_lib := -m32
|
||||
else
|
||||
LIBDIRS := lib
|
||||
LIBDIRS := lib
|
||||
endif
|
||||
|
||||
# Define directories
|
||||
RESULT := $(OUTPUT_ROOT)/result
|
||||
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
|
||||
PREFIX := $(RESULT)/$(HOST)
|
||||
TARGETDIR := $(PREFIX)/$(TARGET)
|
||||
SYSROOT := $(TARGETDIR)/sys-root
|
||||
DOWNLOAD := $(OUTPUT_ROOT)/download
|
||||
SRCDIR := $(OUTPUT_ROOT)/src
|
||||
RESULT := $(OUTPUT_ROOT)/result
|
||||
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
|
||||
PREFIX := $(RESULT)/$(HOST)
|
||||
TARGETDIR := $(PREFIX)/$(TARGET)
|
||||
SYSROOT := $(TARGETDIR)/sys-root
|
||||
DOWNLOAD := $(OUTPUT_ROOT)/download
|
||||
SRCDIR := $(OUTPUT_ROOT)/src
|
||||
|
||||
# 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
|
||||
libs := $(SYSROOT)/libs_patched
|
||||
# Need to patch libs that are linker scripts to use non-absolute paths
|
||||
libs := $(SYSROOT)/libs_patched
|
||||
|
||||
##########################################################################################
|
||||
# Unpack source packages
|
||||
|
||||
# Generate downloading + unpacking of sources.
|
||||
# Generate downloading + unpacking of sources.
|
||||
define Download
|
||||
$(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
|
||||
$(1)_CFG = $$($(1)_DIR)/configure
|
||||
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
|
||||
$(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
|
||||
$(1)_CFG = $$($(1)_DIR)/configure
|
||||
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
|
||||
|
||||
$$($(1)_CFG) : $$($(1)_FILE)
|
||||
mkdir -p $$(SRCDIR)
|
||||
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
|
||||
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
|
||||
echo PATCHING $$(p) ; \
|
||||
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
|
||||
)
|
||||
touch $$@
|
||||
$$($(1)_CFG) : $$($(1)_FILE)
|
||||
mkdir -p $$(SRCDIR)
|
||||
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
|
||||
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
|
||||
echo PATCHING $$(p) ; \
|
||||
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
|
||||
)
|
||||
touch $$@
|
||||
|
||||
$$($(1)_FILE) :
|
||||
wget -P $(DOWNLOAD) $$($(1))
|
||||
$$($(1)_FILE) :
|
||||
wget -P $(DOWNLOAD) $$($(1))
|
||||
endef
|
||||
|
||||
# Download and unpack all source packages
|
||||
@ -159,48 +159,48 @@ $(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
|
||||
##########################################################################################
|
||||
# Unpack RPMS
|
||||
|
||||
# Note. For building linux you should install rpm2cpio.
|
||||
# Note. For building linux you should install rpm2cpio.
|
||||
define unrpm
|
||||
$(SYSROOT)/$(notdir $(1)).unpacked \
|
||||
: $(1)
|
||||
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
|
||||
$(SYSROOT)/$(notdir $(1)).unpacked \
|
||||
: $(1)
|
||||
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
|
||||
endef
|
||||
|
||||
%.unpacked :
|
||||
$(info Unpacking target rpms and libraries from $<)
|
||||
@(mkdir -p $(@D); \
|
||||
cd $(@D); \
|
||||
rpm2cpio $< | \
|
||||
cpio --extract --make-directories \
|
||||
-f \
|
||||
"./usr/share/doc/*" \
|
||||
"./usr/share/man/*" \
|
||||
"./usr/X11R6/man/*" \
|
||||
"*/X11/locale/*" \
|
||||
|| die ; )
|
||||
touch $@
|
||||
%.unpacked :
|
||||
$(info Unpacking target rpms and libraries from $<)
|
||||
@(mkdir -p $(@D); \
|
||||
cd $(@D); \
|
||||
rpm2cpio $< | \
|
||||
cpio --extract --make-directories \
|
||||
-f \
|
||||
"./usr/share/doc/*" \
|
||||
"./usr/share/man/*" \
|
||||
"./usr/X11R6/man/*" \
|
||||
"*/X11/locale/*" \
|
||||
|| die ; )
|
||||
touch $@
|
||||
|
||||
$(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# 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).
|
||||
# we're creating multi-lib compiler with 32bit libc as well, so we should
|
||||
# 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).
|
||||
# we're creating multi-lib compiler with 32bit libc as well, so we should
|
||||
# have it anyway, but just to make sure...
|
||||
# Patch libc.so and libpthread.so to force linking against libraries in sysroot
|
||||
# and not the ones installed on the build machine.
|
||||
$(libs) : $(rpms)
|
||||
@echo Patching libc and pthreads
|
||||
@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
|
||||
(cat $$f | sed -e 's|/usr/lib64/||g' \
|
||||
-e 's|/usr/lib/||g' \
|
||||
-e 's|/lib64/||g' \
|
||||
-e 's|/lib/||g' ) > $$f.tmp ; \
|
||||
mv $$f.tmp $$f ; \
|
||||
done)
|
||||
@mkdir -p $(SYSROOT)/usr/lib
|
||||
@touch $@
|
||||
$(libs) : $(rpms)
|
||||
@echo Patching libc and pthreads
|
||||
@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
|
||||
(cat $$f | sed -e 's|/usr/lib64/||g' \
|
||||
-e 's|/usr/lib/||g' \
|
||||
-e 's|/lib64/||g' \
|
||||
-e 's|/lib/||g' ) > $$f.tmp ; \
|
||||
mv $$f.tmp $$f ; \
|
||||
done)
|
||||
@mkdir -p $(SYSROOT)/usr/lib
|
||||
@touch $@
|
||||
|
||||
##########################################################################################
|
||||
|
||||
@ -210,264 +210,264 @@ $(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_v
|
||||
##########################################################################################
|
||||
|
||||
# Default base config
|
||||
CONFIG = --target=$(TARGET) \
|
||||
--host=$(HOST) --build=$(BUILD) \
|
||||
--prefix=$(PREFIX)
|
||||
CONFIG = --target=$(TARGET) \
|
||||
--host=$(HOST) --build=$(BUILD) \
|
||||
--prefix=$(PREFIX)
|
||||
|
||||
PATHEXT = $(RESULT)/$(BUILD)/bin:
|
||||
PATHEXT = $(RESULT)/$(BUILD)/bin:
|
||||
|
||||
PATHPRE = PATH=$(PATHEXT)$(PATH)
|
||||
BUILDPAR = -j16
|
||||
PATHPRE = PATH=$(PATHEXT)$(PATH)
|
||||
BUILDPAR = -j16
|
||||
|
||||
# Default commands to when making
|
||||
MAKECMD =
|
||||
INSTALLCMD = install
|
||||
MAKECMD =
|
||||
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),$(TARGET))
|
||||
TOOLS = $(call declare_tools,_FOR_TARGET,)
|
||||
endif
|
||||
ifeq ($(HOST),$(TARGET))
|
||||
TOOLS = $(call declare_tools,_FOR_TARGET,)
|
||||
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.
|
||||
# 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.
|
||||
define mk_bfd
|
||||
$$(info Libs for $(1))
|
||||
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
|
||||
: CFLAGS += $$(CFLAGS_$(1))
|
||||
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
|
||||
: LIBDIRS = --libdir=$(TARGETDIR)/$(1)
|
||||
$$(info Libs for $(1))
|
||||
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
|
||||
: CFLAGS += $$(CFLAGS_$(1))
|
||||
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
|
||||
: LIBDIRS = --libdir=$(TARGETDIR)/$(1)
|
||||
|
||||
bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
|
||||
bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
|
||||
bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
|
||||
bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
|
||||
endef
|
||||
|
||||
# Create one set of bfds etc for each multilib arch
|
||||
$(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l))))
|
||||
|
||||
# Only build these two libs.
|
||||
$(bfdlib) : MAKECMD = all-libiberty all-bfd
|
||||
$(bfdlib) : INSTALLCMD = install-libiberty install-bfd
|
||||
$(bfdlib) : MAKECMD = all-libiberty all-bfd
|
||||
$(bfdlib) : INSTALLCMD = install-libiberty install-bfd
|
||||
|
||||
# Building targets libbfd + libiberty. HOST==TARGET, i.e not
|
||||
# for a cross env.
|
||||
$(bfdmakes) : CONFIG = --target=$(TARGET) \
|
||||
--host=$(TARGET) --build=$(BUILD) \
|
||||
--prefix=$(TARGETDIR) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
$(LIBDIRS)
|
||||
# Building targets libbfd + libiberty. HOST==TARGET, i.e not
|
||||
# for a cross env.
|
||||
$(bfdmakes) : CONFIG = --target=$(TARGET) \
|
||||
--host=$(TARGET) --build=$(BUILD) \
|
||||
--prefix=$(TARGETDIR) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
$(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) \
|
||||
$(binutils) \
|
||||
$(gmp) \
|
||||
$(mpfr) \
|
||||
$(mpc) \
|
||||
$(bfdmakes) \
|
||||
$(ccache) : ENVS += $(TOOLS)
|
||||
$(gcc) \
|
||||
$(binutils) \
|
||||
$(gmp) \
|
||||
$(mpfr) \
|
||||
$(mpc) \
|
||||
$(bfdmakes) \
|
||||
$(ccache) : ENVS += $(TOOLS)
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
$(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
|
||||
|
||||
# Makefile creation. Simply run configure in build dir.
|
||||
$(bfdmakes) \
|
||||
$(BUILDDIR)/$(binutils_ver)/Makefile \
|
||||
: $(BINUTILS_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(BINUTILS_CFG) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--disable-nls \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-multilib \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
$(bfdmakes) \
|
||||
$(BUILDDIR)/$(binutils_ver)/Makefile \
|
||||
: $(BINUTILS_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(BINUTILS_CFG) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--disable-nls \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-multilib \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
$(BUILDDIR)/$(mpfr_ver)/Makefile \
|
||||
: $(MPFR_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(MPFR_CFG) \
|
||||
$(CONFIG) \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-shared=no \
|
||||
--with-gmp=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
$(BUILDDIR)/$(mpfr_ver)/Makefile \
|
||||
: $(MPFR_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(MPFR_CFG) \
|
||||
$(CONFIG) \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-shared=no \
|
||||
--with-gmp=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
$(BUILDDIR)/$(gmp_ver)/Makefile \
|
||||
: $(GMP_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(GMP_CFG) \
|
||||
--host=$(HOST) --build=$(BUILD) \
|
||||
--prefix=$(PREFIX) \
|
||||
--disable-nls \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-shared=no \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
$(BUILDDIR)/$(gmp_ver)/Makefile \
|
||||
: $(GMP_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(GMP_CFG) \
|
||||
--host=$(HOST) --build=$(BUILD) \
|
||||
--prefix=$(PREFIX) \
|
||||
--disable-nls \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-shared=no \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
$(BUILDDIR)/$(mpc_ver)/Makefile \
|
||||
: $(MPC_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(MPC_CFG) \
|
||||
$(CONFIG) \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-shared=no \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
--with-gmp=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
$(BUILDDIR)/$(mpc_ver)/Makefile \
|
||||
: $(MPC_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
|
||||
$(MPC_CFG) \
|
||||
$(CONFIG) \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-shared=no \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
--with-gmp=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
# Only valid if glibc target -> linux
|
||||
# proper destructor handling for c++
|
||||
ifneq (,$(findstring linux,$(TARGET)))
|
||||
$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
|
||||
$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
|
||||
endif
|
||||
|
||||
# Want:
|
||||
# c,c++
|
||||
# shared libs
|
||||
# multilib (-m32/-m64 on x64)
|
||||
# skip native language.
|
||||
# and link and assemble with the binutils we created
|
||||
# earlier, so --with-gnu*
|
||||
$(BUILDDIR)/$(gcc_ver)/Makefile \
|
||||
: $(GCC_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-shared \
|
||||
--enable-multilib \
|
||||
--disable-nls \
|
||||
--with-gnu-as \
|
||||
--with-gnu-ld \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
--with-gmp=$(PREFIX) \
|
||||
--with-mpc=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
# c,c++
|
||||
# shared libs
|
||||
# multilib (-m32/-m64 on x64)
|
||||
# skip native language.
|
||||
# and link and assemble with the binutils we created
|
||||
# earlier, so --with-gnu*
|
||||
$(BUILDDIR)/$(gcc_ver)/Makefile \
|
||||
: $(GCC_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-shared \
|
||||
--enable-multilib \
|
||||
--disable-nls \
|
||||
--with-gnu-as \
|
||||
--with-gnu-ld \
|
||||
--with-mpfr=$(PREFIX) \
|
||||
--with-gmp=$(PREFIX) \
|
||||
--with-mpc=$(PREFIX) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
# need binutils for gcc
|
||||
$(gcc) : $(binutils)
|
||||
$(gcc) : $(binutils)
|
||||
|
||||
# as of 4.3 or so need these for doing config
|
||||
$(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
|
||||
$(mpfr) : $(gmp)
|
||||
$(mpc) : $(gmp) $(mpfr)
|
||||
$(mpfr) : $(gmp)
|
||||
$(mpc) : $(gmp) $(mpfr)
|
||||
|
||||
##########################################################################################
|
||||
# very straightforward. just build a ccache. it is only for host.
|
||||
$(BUILDDIR)/$(ccache_ver)/Makefile \
|
||||
: $(CCACHE_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
@( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) $(CCACHE_CFG) \
|
||||
$(CONFIG) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
# very straightforward. just build a ccache. it is only for host.
|
||||
$(BUILDDIR)/$(ccache_ver)/Makefile \
|
||||
: $(CCACHE_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
@mkdir -p $(@D)
|
||||
@( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) $(CCACHE_CFG) \
|
||||
$(CONFIG) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@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))
|
||||
$(gccpatch) : $(gcc) link_libs
|
||||
@echo -n 'Creating compiler symlinks...'
|
||||
@for f in cpp; do \
|
||||
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ];\
|
||||
then \
|
||||
cd $(PREFIX)/bin && \
|
||||
ln -s $$f $(TARGET)-$$f ; \
|
||||
fi \
|
||||
done
|
||||
@touch $@
|
||||
@echo 'done'
|
||||
$(gccpatch) : $(gcc) link_libs
|
||||
@echo -n 'Creating compiler symlinks...'
|
||||
@for f in cpp; do \
|
||||
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
|
||||
then \
|
||||
cd $(PREFIX)/bin && \
|
||||
ln -s $$f $(TARGET)-$$f ; \
|
||||
fi \
|
||||
done
|
||||
@touch $@
|
||||
@echo 'done'
|
||||
|
||||
##########################################################################################
|
||||
# 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.
|
||||
# "Solve" this by create links from the target libdirs to where they are.
|
||||
link_libs:
|
||||
@echo -n 'Creating library symlinks...'
|
||||
@$(foreach l,$(LIBDIRS), \
|
||||
for f in `cd $(PREFIX)/$(l) && ls`; do \
|
||||
if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
|
||||
mkdir -p $(TARGETDIR)/$(l) && \
|
||||
cd $(TARGETDIR)/$(l)/ && \
|
||||
ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
|
||||
fi \
|
||||
done;)
|
||||
@echo 'done'
|
||||
##########################################################################################
|
||||
# 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.
|
||||
# "Solve" this by create links from the target libdirs to where they are.
|
||||
link_libs:
|
||||
@echo -n 'Creating library symlinks...'
|
||||
@$(foreach l,$(LIBDIRS), \
|
||||
for f in `cd $(PREFIX)/$(l) && ls`; do \
|
||||
if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
|
||||
mkdir -p $(TARGETDIR)/$(l) && \
|
||||
cd $(TARGETDIR)/$(l)/ && \
|
||||
ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
|
||||
fi \
|
||||
done;)
|
||||
@echo 'done'
|
||||
else
|
||||
$(gccpatch) :
|
||||
@echo 'done'
|
||||
$(gccpatch) :
|
||||
@echo 'done'
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
# Build in two steps.
|
||||
# Build in two steps.
|
||||
# make <default>
|
||||
# make install.
|
||||
# make install.
|
||||
# Use path to our build hosts cross tools
|
||||
# Always need to build cross tools for build host self.
|
||||
$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
|
||||
$(info Building $(basename $@). Log in $(<D)/log.build)
|
||||
$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
|
||||
@echo -n 'installing...'
|
||||
$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
|
||||
@touch $@
|
||||
@echo 'done'
|
||||
# Always need to build cross tools for build host self.
|
||||
$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
|
||||
$(info Building $(basename $@). Log in $(<D)/log.build)
|
||||
$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
|
||||
@echo -n 'installing...'
|
||||
$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
|
||||
@touch $@
|
||||
@echo 'done'
|
||||
|
||||
##########################################################################################
|
||||
|
||||
bfdlib : $(bfdlib)
|
||||
binutils : $(binutils)
|
||||
rpms : $(rpms)
|
||||
libs : $(libs)
|
||||
sysroot : rpms libs
|
||||
gcc : sysroot $(gcc) $(gccpatch)
|
||||
all : binutils gcc bfdlib
|
||||
bfdlib : $(bfdlib)
|
||||
binutils : $(binutils)
|
||||
rpms : $(rpms)
|
||||
libs : $(libs)
|
||||
sysroot : rpms libs
|
||||
gcc : sysroot $(gcc) $(gccpatch)
|
||||
all : binutils gcc bfdlib
|
||||
|
||||
# this is only built for host. so separate.
|
||||
ccache : $(ccache)
|
||||
# this is only built for host. so separate.
|
||||
ccache : $(ccache)
|
||||
|
||||
.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot
|
||||
.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot
|
||||
|
@ -24,49 +24,49 @@
|
||||
#
|
||||
|
||||
# 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
|
||||
# should make up the list of all packages under the
|
||||
# src/shared/classes directory of the JDK source tree.
|
||||
#
|
||||
EXCLUDE_PKGS = \
|
||||
java.awt.peer \
|
||||
java.awt.dnd.peer \
|
||||
sun.* \
|
||||
com.sun.* \
|
||||
org.apache.* \
|
||||
org.jcp.* \
|
||||
org.w3c.dom.css \
|
||||
org.w3c.dom.html \
|
||||
org.w3c.dom.stylesheets \
|
||||
org.w3c.dom.traversal \
|
||||
org.w3c.dom.ranges \
|
||||
org.w3c.dom.views \
|
||||
org.omg.stub.javax.management.remote.rmi
|
||||
EXCLUDE_PKGS = \
|
||||
java.awt.peer \
|
||||
java.awt.dnd.peer \
|
||||
sun.* \
|
||||
com.sun.* \
|
||||
org.apache.* \
|
||||
org.jcp.* \
|
||||
org.w3c.dom.css \
|
||||
org.w3c.dom.html \
|
||||
org.w3c.dom.stylesheets \
|
||||
org.w3c.dom.traversal \
|
||||
org.w3c.dom.ranges \
|
||||
org.w3c.dom.views \
|
||||
org.omg.stub.javax.management.remote.rmi
|
||||
|
||||
#
|
||||
# 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
|
||||
# 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:
|
||||
# This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
|
||||
#
|
||||
ACTIVE_JSR_PKGS= \
|
||||
java.lang.invoke \
|
||||
java.sql \
|
||||
javax.activation \
|
||||
javax.annotation.* \
|
||||
javax.jws.* \
|
||||
javax.lang.* \
|
||||
javax.management.* \
|
||||
javax.script \
|
||||
javax.sql.* \
|
||||
javax.tools.* \
|
||||
javax.xml.* \
|
||||
org.w3c.* \
|
||||
org.xml.sax
|
||||
java.lang.invoke \
|
||||
java.sql \
|
||||
javax.activation \
|
||||
javax.annotation.* \
|
||||
javax.jws.* \
|
||||
javax.lang.* \
|
||||
javax.management.* \
|
||||
javax.script \
|
||||
javax.sql.* \
|
||||
javax.tools.* \
|
||||
javax.xml.* \
|
||||
org.w3c.* \
|
||||
org.xml.sax
|
||||
|
||||
#
|
||||
# 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.
|
||||
### Currently, there is only table ("Platform Packages") and
|
||||
### 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.
|
||||
###
|
||||
CORE_PKGS = \
|
||||
java.applet \
|
||||
java.awt \
|
||||
java.awt.color \
|
||||
java.awt.datatransfer \
|
||||
java.awt.dnd \
|
||||
java.awt.event \
|
||||
java.awt.font \
|
||||
java.awt.geom \
|
||||
java.awt.im \
|
||||
java.awt.im.spi \
|
||||
java.awt.image \
|
||||
java.awt.image.renderable \
|
||||
java.awt.print \
|
||||
java.beans \
|
||||
java.beans.beancontext \
|
||||
java.io \
|
||||
java.lang \
|
||||
java.lang.annotation \
|
||||
java.lang.instrument \
|
||||
java.lang.invoke \
|
||||
java.lang.management \
|
||||
java.lang.ref \
|
||||
java.lang.reflect \
|
||||
java.math \
|
||||
java.net \
|
||||
java.nio \
|
||||
java.nio.channels \
|
||||
java.nio.channels.spi \
|
||||
java.nio.charset \
|
||||
java.nio.charset.spi \
|
||||
java.nio.file \
|
||||
java.nio.file.attribute \
|
||||
java.nio.file.spi \
|
||||
java.rmi \
|
||||
java.rmi.activation \
|
||||
java.rmi.dgc \
|
||||
java.rmi.registry \
|
||||
java.rmi.server \
|
||||
java.security \
|
||||
java.security.acl \
|
||||
java.security.cert \
|
||||
java.security.interfaces \
|
||||
java.security.spec \
|
||||
java.sql \
|
||||
java.text \
|
||||
java.text.spi \
|
||||
java.time \
|
||||
java.time.chrono \
|
||||
java.time.format \
|
||||
java.time.temporal \
|
||||
java.time.zone \
|
||||
java.util \
|
||||
java.util.concurrent \
|
||||
java.util.concurrent.atomic \
|
||||
java.util.concurrent.locks \
|
||||
java.util.function \
|
||||
java.util.jar \
|
||||
java.util.logging \
|
||||
java.util.prefs \
|
||||
java.util.regex \
|
||||
java.util.spi \
|
||||
java.util.stream \
|
||||
java.util.zip \
|
||||
javax.accessibility \
|
||||
javax.activation \
|
||||
javax.activity \
|
||||
javax.annotation \
|
||||
javax.annotation.processing \
|
||||
javax.crypto \
|
||||
javax.crypto.interfaces \
|
||||
javax.crypto.spec \
|
||||
javax.imageio \
|
||||
javax.imageio.event \
|
||||
javax.imageio.metadata \
|
||||
javax.imageio.plugins.jpeg \
|
||||
javax.imageio.plugins.bmp \
|
||||
javax.imageio.spi \
|
||||
javax.imageio.stream \
|
||||
javax.jws \
|
||||
javax.jws.soap \
|
||||
javax.lang.model \
|
||||
javax.lang.model.element \
|
||||
javax.lang.model.type \
|
||||
javax.lang.model.util \
|
||||
javax.management \
|
||||
javax.management.loading \
|
||||
javax.management.monitor \
|
||||
javax.management.relation \
|
||||
javax.management.openmbean \
|
||||
javax.management.timer \
|
||||
javax.management.modelmbean \
|
||||
javax.management.remote \
|
||||
javax.management.remote.rmi \
|
||||
javax.naming \
|
||||
javax.naming.directory \
|
||||
javax.naming.event \
|
||||
javax.naming.ldap \
|
||||
javax.naming.spi \
|
||||
javax.net \
|
||||
javax.net.ssl \
|
||||
javax.print \
|
||||
javax.print.attribute \
|
||||
javax.print.attribute.standard \
|
||||
javax.print.event \
|
||||
javax.rmi \
|
||||
javax.rmi.CORBA \
|
||||
javax.rmi.ssl \
|
||||
javax.script \
|
||||
javax.security.auth \
|
||||
javax.security.auth.callback \
|
||||
javax.security.auth.kerberos \
|
||||
javax.security.auth.login \
|
||||
javax.security.auth.spi \
|
||||
javax.security.auth.x500 \
|
||||
javax.security.cert \
|
||||
javax.security.sasl \
|
||||
javax.sound.sampled \
|
||||
javax.sound.sampled.spi \
|
||||
javax.sound.midi \
|
||||
javax.sound.midi.spi \
|
||||
javax.sql \
|
||||
javax.sql.rowset \
|
||||
javax.sql.rowset.serial \
|
||||
javax.sql.rowset.spi \
|
||||
javax.swing \
|
||||
javax.swing.border \
|
||||
javax.swing.colorchooser \
|
||||
javax.swing.filechooser \
|
||||
javax.swing.event \
|
||||
javax.swing.table \
|
||||
javax.swing.text \
|
||||
javax.swing.text.html \
|
||||
javax.swing.text.html.parser \
|
||||
javax.swing.text.rtf \
|
||||
javax.swing.tree \
|
||||
javax.swing.undo \
|
||||
javax.swing.plaf \
|
||||
javax.swing.plaf.basic \
|
||||
javax.swing.plaf.metal \
|
||||
javax.swing.plaf.multi \
|
||||
javax.swing.plaf.nimbus \
|
||||
javax.swing.plaf.synth \
|
||||
javax.tools \
|
||||
javax.tools.annotation \
|
||||
javax.transaction \
|
||||
javax.transaction.xa \
|
||||
javax.xml.parsers \
|
||||
javax.xml.bind \
|
||||
javax.xml.bind.annotation \
|
||||
javax.xml.bind.annotation.adapters \
|
||||
javax.xml.bind.attachment \
|
||||
javax.xml.bind.helpers \
|
||||
javax.xml.bind.util \
|
||||
javax.xml.soap \
|
||||
javax.xml.ws \
|
||||
javax.xml.ws.handler \
|
||||
javax.xml.ws.handler.soap \
|
||||
javax.xml.ws.http \
|
||||
javax.xml.ws.soap \
|
||||
javax.xml.ws.spi \
|
||||
javax.xml.ws.spi.http \
|
||||
javax.xml.ws.wsaddressing \
|
||||
javax.xml.transform \
|
||||
javax.xml.transform.sax \
|
||||
javax.xml.transform.dom \
|
||||
javax.xml.transform.stax \
|
||||
javax.xml.transform.stream \
|
||||
javax.xml \
|
||||
javax.xml.crypto \
|
||||
javax.xml.crypto.dom \
|
||||
javax.xml.crypto.dsig \
|
||||
javax.xml.crypto.dsig.dom \
|
||||
javax.xml.crypto.dsig.keyinfo \
|
||||
javax.xml.crypto.dsig.spec \
|
||||
javax.xml.datatype \
|
||||
javax.xml.validation \
|
||||
javax.xml.namespace \
|
||||
javax.xml.xpath \
|
||||
javax.xml.stream \
|
||||
javax.xml.stream.events \
|
||||
javax.xml.stream.util \
|
||||
org.ietf.jgss \
|
||||
org.omg.CORBA \
|
||||
org.omg.CORBA.DynAnyPackage \
|
||||
org.omg.CORBA.ORBPackage \
|
||||
org.omg.CORBA.TypeCodePackage \
|
||||
org.omg.stub.java.rmi \
|
||||
org.omg.CORBA.portable \
|
||||
org.omg.CORBA_2_3 \
|
||||
org.omg.CORBA_2_3.portable \
|
||||
org.omg.CosNaming \
|
||||
org.omg.CosNaming.NamingContextExtPackage \
|
||||
org.omg.CosNaming.NamingContextPackage \
|
||||
org.omg.SendingContext \
|
||||
org.omg.PortableServer \
|
||||
org.omg.PortableServer.CurrentPackage \
|
||||
org.omg.PortableServer.POAPackage \
|
||||
org.omg.PortableServer.POAManagerPackage \
|
||||
org.omg.PortableServer.ServantLocatorPackage \
|
||||
org.omg.PortableServer.portable \
|
||||
org.omg.PortableInterceptor \
|
||||
org.omg.PortableInterceptor.ORBInitInfoPackage \
|
||||
org.omg.Messaging \
|
||||
org.omg.IOP \
|
||||
org.omg.IOP.CodecFactoryPackage \
|
||||
org.omg.IOP.CodecPackage \
|
||||
org.omg.Dynamic \
|
||||
org.omg.DynamicAny \
|
||||
org.omg.DynamicAny.DynAnyPackage \
|
||||
org.omg.DynamicAny.DynAnyFactoryPackage \
|
||||
org.w3c.dom \
|
||||
org.w3c.dom.events \
|
||||
org.w3c.dom.bootstrap \
|
||||
org.w3c.dom.ls \
|
||||
org.xml.sax \
|
||||
org.xml.sax.ext \
|
||||
org.xml.sax.helpers
|
||||
CORE_PKGS = \
|
||||
java.applet \
|
||||
java.awt \
|
||||
java.awt.color \
|
||||
java.awt.datatransfer \
|
||||
java.awt.dnd \
|
||||
java.awt.event \
|
||||
java.awt.font \
|
||||
java.awt.geom \
|
||||
java.awt.im \
|
||||
java.awt.im.spi \
|
||||
java.awt.image \
|
||||
java.awt.image.renderable \
|
||||
java.awt.print \
|
||||
java.beans \
|
||||
java.beans.beancontext \
|
||||
java.io \
|
||||
java.lang \
|
||||
java.lang.annotation \
|
||||
java.lang.instrument \
|
||||
java.lang.invoke \
|
||||
java.lang.management \
|
||||
java.lang.ref \
|
||||
java.lang.reflect \
|
||||
java.math \
|
||||
java.net \
|
||||
java.nio \
|
||||
java.nio.channels \
|
||||
java.nio.channels.spi \
|
||||
java.nio.charset \
|
||||
java.nio.charset.spi \
|
||||
java.nio.file \
|
||||
java.nio.file.attribute \
|
||||
java.nio.file.spi \
|
||||
java.rmi \
|
||||
java.rmi.activation \
|
||||
java.rmi.dgc \
|
||||
java.rmi.registry \
|
||||
java.rmi.server \
|
||||
java.security \
|
||||
java.security.acl \
|
||||
java.security.cert \
|
||||
java.security.interfaces \
|
||||
java.security.spec \
|
||||
java.sql \
|
||||
java.text \
|
||||
java.text.spi \
|
||||
java.time \
|
||||
java.time.chrono \
|
||||
java.time.format \
|
||||
java.time.temporal \
|
||||
java.time.zone \
|
||||
java.util \
|
||||
java.util.concurrent \
|
||||
java.util.concurrent.atomic \
|
||||
java.util.concurrent.locks \
|
||||
java.util.function \
|
||||
java.util.jar \
|
||||
java.util.logging \
|
||||
java.util.prefs \
|
||||
java.util.regex \
|
||||
java.util.spi \
|
||||
java.util.stream \
|
||||
java.util.zip \
|
||||
javax.accessibility \
|
||||
javax.activation \
|
||||
javax.activity \
|
||||
javax.annotation \
|
||||
javax.annotation.processing \
|
||||
javax.crypto \
|
||||
javax.crypto.interfaces \
|
||||
javax.crypto.spec \
|
||||
javax.imageio \
|
||||
javax.imageio.event \
|
||||
javax.imageio.metadata \
|
||||
javax.imageio.plugins.jpeg \
|
||||
javax.imageio.plugins.bmp \
|
||||
javax.imageio.spi \
|
||||
javax.imageio.stream \
|
||||
javax.jws \
|
||||
javax.jws.soap \
|
||||
javax.lang.model \
|
||||
javax.lang.model.element \
|
||||
javax.lang.model.type \
|
||||
javax.lang.model.util \
|
||||
javax.management \
|
||||
javax.management.loading \
|
||||
javax.management.monitor \
|
||||
javax.management.relation \
|
||||
javax.management.openmbean \
|
||||
javax.management.timer \
|
||||
javax.management.modelmbean \
|
||||
javax.management.remote \
|
||||
javax.management.remote.rmi \
|
||||
javax.naming \
|
||||
javax.naming.directory \
|
||||
javax.naming.event \
|
||||
javax.naming.ldap \
|
||||
javax.naming.spi \
|
||||
javax.net \
|
||||
javax.net.ssl \
|
||||
javax.print \
|
||||
javax.print.attribute \
|
||||
javax.print.attribute.standard \
|
||||
javax.print.event \
|
||||
javax.rmi \
|
||||
javax.rmi.CORBA \
|
||||
javax.rmi.ssl \
|
||||
javax.script \
|
||||
javax.security.auth \
|
||||
javax.security.auth.callback \
|
||||
javax.security.auth.kerberos \
|
||||
javax.security.auth.login \
|
||||
javax.security.auth.spi \
|
||||
javax.security.auth.x500 \
|
||||
javax.security.cert \
|
||||
javax.security.sasl \
|
||||
javax.sound.sampled \
|
||||
javax.sound.sampled.spi \
|
||||
javax.sound.midi \
|
||||
javax.sound.midi.spi \
|
||||
javax.sql \
|
||||
javax.sql.rowset \
|
||||
javax.sql.rowset.serial \
|
||||
javax.sql.rowset.spi \
|
||||
javax.swing \
|
||||
javax.swing.border \
|
||||
javax.swing.colorchooser \
|
||||
javax.swing.filechooser \
|
||||
javax.swing.event \
|
||||
javax.swing.table \
|
||||
javax.swing.text \
|
||||
javax.swing.text.html \
|
||||
javax.swing.text.html.parser \
|
||||
javax.swing.text.rtf \
|
||||
javax.swing.tree \
|
||||
javax.swing.undo \
|
||||
javax.swing.plaf \
|
||||
javax.swing.plaf.basic \
|
||||
javax.swing.plaf.metal \
|
||||
javax.swing.plaf.multi \
|
||||
javax.swing.plaf.nimbus \
|
||||
javax.swing.plaf.synth \
|
||||
javax.tools \
|
||||
javax.tools.annotation \
|
||||
javax.transaction \
|
||||
javax.transaction.xa \
|
||||
javax.xml.parsers \
|
||||
javax.xml.bind \
|
||||
javax.xml.bind.annotation \
|
||||
javax.xml.bind.annotation.adapters \
|
||||
javax.xml.bind.attachment \
|
||||
javax.xml.bind.helpers \
|
||||
javax.xml.bind.util \
|
||||
javax.xml.soap \
|
||||
javax.xml.ws \
|
||||
javax.xml.ws.handler \
|
||||
javax.xml.ws.handler.soap \
|
||||
javax.xml.ws.http \
|
||||
javax.xml.ws.soap \
|
||||
javax.xml.ws.spi \
|
||||
javax.xml.ws.spi.http \
|
||||
javax.xml.ws.wsaddressing \
|
||||
javax.xml.transform \
|
||||
javax.xml.transform.sax \
|
||||
javax.xml.transform.dom \
|
||||
javax.xml.transform.stax \
|
||||
javax.xml.transform.stream \
|
||||
javax.xml \
|
||||
javax.xml.crypto \
|
||||
javax.xml.crypto.dom \
|
||||
javax.xml.crypto.dsig \
|
||||
javax.xml.crypto.dsig.dom \
|
||||
javax.xml.crypto.dsig.keyinfo \
|
||||
javax.xml.crypto.dsig.spec \
|
||||
javax.xml.datatype \
|
||||
javax.xml.validation \
|
||||
javax.xml.namespace \
|
||||
javax.xml.xpath \
|
||||
javax.xml.stream \
|
||||
javax.xml.stream.events \
|
||||
javax.xml.stream.util \
|
||||
org.ietf.jgss \
|
||||
org.omg.CORBA \
|
||||
org.omg.CORBA.DynAnyPackage \
|
||||
org.omg.CORBA.ORBPackage \
|
||||
org.omg.CORBA.TypeCodePackage \
|
||||
org.omg.stub.java.rmi \
|
||||
org.omg.CORBA.portable \
|
||||
org.omg.CORBA_2_3 \
|
||||
org.omg.CORBA_2_3.portable \
|
||||
org.omg.CosNaming \
|
||||
org.omg.CosNaming.NamingContextExtPackage \
|
||||
org.omg.CosNaming.NamingContextPackage \
|
||||
org.omg.SendingContext \
|
||||
org.omg.PortableServer \
|
||||
org.omg.PortableServer.CurrentPackage \
|
||||
org.omg.PortableServer.POAPackage \
|
||||
org.omg.PortableServer.POAManagerPackage \
|
||||
org.omg.PortableServer.ServantLocatorPackage \
|
||||
org.omg.PortableServer.portable \
|
||||
org.omg.PortableInterceptor \
|
||||
org.omg.PortableInterceptor.ORBInitInfoPackage \
|
||||
org.omg.Messaging \
|
||||
org.omg.IOP \
|
||||
org.omg.IOP.CodecFactoryPackage \
|
||||
org.omg.IOP.CodecPackage \
|
||||
org.omg.Dynamic \
|
||||
org.omg.DynamicAny \
|
||||
org.omg.DynamicAny.DynAnyPackage \
|
||||
org.omg.DynamicAny.DynAnyFactoryPackage \
|
||||
org.w3c.dom \
|
||||
org.w3c.dom.events \
|
||||
org.w3c.dom.bootstrap \
|
||||
org.w3c.dom.ls \
|
||||
org.xml.sax \
|
||||
org.xml.sax.ext \
|
||||
org.xml.sax.helpers
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,87 +24,87 @@
|
||||
#
|
||||
|
||||
#
|
||||
# This file contains the package names of all the "non-core"
|
||||
# API published in the Java 2 SDK documentation. "Non-core" means
|
||||
# This file contains the package names of all the "non-core"
|
||||
# API published in the Java 2 SDK documentation. "Non-core" means
|
||||
# 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
|
||||
# team when determining which APIs to extract javadoc
|
||||
# comments from.
|
||||
|
||||
DOMAPI_PKGS = com.sun.java.browser.dom \
|
||||
org.w3c.dom \
|
||||
org.w3c.dom.bootstrap \
|
||||
org.w3c.dom.ls \
|
||||
org.w3c.dom.ranges \
|
||||
org.w3c.dom.traversal \
|
||||
org.w3c.dom.html \
|
||||
org.w3c.dom.stylesheets \
|
||||
org.w3c.dom.css \
|
||||
org.w3c.dom.events \
|
||||
org.w3c.dom.views
|
||||
DOMAPI_PKGS = com.sun.java.browser.dom \
|
||||
org.w3c.dom \
|
||||
org.w3c.dom.bootstrap \
|
||||
org.w3c.dom.ls \
|
||||
org.w3c.dom.ranges \
|
||||
org.w3c.dom.traversal \
|
||||
org.w3c.dom.html \
|
||||
org.w3c.dom.stylesheets \
|
||||
org.w3c.dom.css \
|
||||
org.w3c.dom.events \
|
||||
org.w3c.dom.views
|
||||
|
||||
JDI_PKGS = com.sun.jdi \
|
||||
com.sun.jdi.event \
|
||||
com.sun.jdi.request \
|
||||
com.sun.jdi.connect \
|
||||
com.sun.jdi.connect.spi
|
||||
JDI_PKGS = com.sun.jdi \
|
||||
com.sun.jdi.event \
|
||||
com.sun.jdi.request \
|
||||
com.sun.jdi.connect \
|
||||
com.sun.jdi.connect.spi
|
||||
|
||||
MGMT_PKGS = com.sun.management
|
||||
MGMT_PKGS = com.sun.management
|
||||
|
||||
JAAS_PKGS = com.sun.security.auth \
|
||||
com.sun.security.auth.callback \
|
||||
com.sun.security.auth.login \
|
||||
com.sun.security.auth.module
|
||||
JAAS_PKGS = com.sun.security.auth \
|
||||
com.sun.security.auth.callback \
|
||||
com.sun.security.auth.login \
|
||||
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 \
|
||||
com.sun.net.httpserver.spi
|
||||
HTTPSERVER_PKGS = com.sun.net.httpserver \
|
||||
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 \
|
||||
com.sun.tools.attach.spi
|
||||
ATTACH_PKGS = com.sun.tools.attach \
|
||||
com.sun.tools.attach.spi
|
||||
|
||||
JCONSOLE_PKGS = com.sun.tools.jconsole
|
||||
JCONSOLE_PKGS = com.sun.tools.jconsole
|
||||
|
||||
TREEAPI_PKGS = com.sun.source.doctree \
|
||||
com.sun.source.tree \
|
||||
com.sun.source.util \
|
||||
jdk
|
||||
TREEAPI_PKGS = com.sun.source.doctree \
|
||||
com.sun.source.tree \
|
||||
com.sun.source.util \
|
||||
jdk
|
||||
|
||||
SMARTCARDIO_PKGS = javax.smartcardio
|
||||
|
||||
SCTPAPI_PKGS = com.sun.nio.sctp
|
||||
SCTPAPI_PKGS = com.sun.nio.sctp
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
APPLE_EXT_PKGS = com.apple.concurrent \
|
||||
com.apple.eawt \
|
||||
com.apple.eawt.event \
|
||||
com.apple.eio
|
||||
APPLE_EXT_PKGS = com.apple.concurrent \
|
||||
com.apple.eawt \
|
||||
com.apple.eawt.event \
|
||||
com.apple.eio
|
||||
endif
|
||||
|
||||
JDK_PKGS = jdk
|
||||
JDK_PKGS = jdk
|
||||
|
||||
# non-core packages in rt.jar
|
||||
NON_CORE_PKGS = $(DOMAPI_PKGS) \
|
||||
$(MGMT_PKGS) \
|
||||
$(JAAS_PKGS) \
|
||||
$(JGSS_PKGS) \
|
||||
$(NIO_PKGS) \
|
||||
$(OLD_JSSE_PKGS) \
|
||||
$(HTTPSERVER_PKGS) \
|
||||
$(SMARTCARDIO_PKGS) \
|
||||
$(SCTPAPI_PKGS) \
|
||||
$(APPLE_EXT_PKGS) \
|
||||
$(JDK_PKGS)
|
||||
NON_CORE_PKGS = $(DOMAPI_PKGS) \
|
||||
$(MGMT_PKGS) \
|
||||
$(JAAS_PKGS) \
|
||||
$(JGSS_PKGS) \
|
||||
$(NIO_PKGS) \
|
||||
$(OLD_JSSE_PKGS) \
|
||||
$(HTTPSERVER_PKGS) \
|
||||
$(SMARTCARDIO_PKGS) \
|
||||
$(SCTPAPI_PKGS) \
|
||||
$(APPLE_EXT_PKGS) \
|
||||
$(JDK_PKGS)
|
||||
|
@ -8,42 +8,42 @@
|
||||
<body>
|
||||
<h3><a name="REGEXP"></a><br>
|
||||
REGEXP</h3>
|
||||
<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
|
||||
was motivated by the need to divide the world into "core packages"
|
||||
(java.*) and "extension packages" (javax.*). In time, the distinction
|
||||
went away. The whole table is now called "Platform Packages"--which
|
||||
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 "*",
|
||||
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
|
||||
with this, which is in all respects equivalent to "*" at this point
|
||||
<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
|
||||
was motivated by the need to divide the world into "core packages"
|
||||
(java.*) and "extension packages" (javax.*). In time, the distinction
|
||||
went away. The whole table is now called "Platform Packages"--which
|
||||
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 "*",
|
||||
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
|
||||
with this, which is in all respects equivalent to "*" at this point
|
||||
in time:</p>
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<pre>REGEXP = "java.*:javax.*:org.ietf*:org.omg.</pre>
|
||||
</blockquote>
|
||||
<h3><a name="releaseTargets"></a><br>
|
||||
Release Targets</h3>
|
||||
<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
|
||||
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
|
||||
<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
|
||||
in the javapubs group's docs-release process. It specifies memory settings accordingly
|
||||
to maximize performance.</p>
|
||||
<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
|
||||
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
|
||||
<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
|
||||
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
|
||||
large as necessary is also important to keep the job from failing.</p>
|
||||
<blockquote>
|
||||
<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>
|
||||
</blockquote>
|
||||
<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
|
||||
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
|
||||
control build, the values are always set properly. But when the targets are
|
||||
run by themselves, they default to b00 and "internal"--which silently
|
||||
<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
|
||||
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
|
||||
control build, the values are always set properly. But when the targets are
|
||||
run by themselves, they default to b00 and "internal"--which silently
|
||||
sabotage the result of a build that can take many hours to complete.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user