提交 7b98c075 编写于 作者: K katleman

Merge

......@@ -31,8 +31,9 @@ CMP=cmp
CP=cp
ECHO=echo
MKDIR=mkdir
PRINTF=printf
PWD=pwd
SH=sh
TAR=tar
ifeq ($(PLATFORM),windows)
ZIP=zip
else
......@@ -63,10 +64,48 @@ all images clean: checks
$(ECHO) "ERROR: No configurations to build"; exit 1; \
fi
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
$(ECHO) "$(CD) $${bdir} && $(MAKE) $(EXTRA_MAKE_ARGS) $@" ; \
$(CD) $${bdir} && $(MAKE) $(EXTRA_MAKE_ARGS) $@ ; \
$(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
$(CD) $${bdir} && $(MAKE) $@ ; \
done
# TBD: Deploy input
$(BUILD_DIR_ROOT)/.deploy_input:
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
$(ECHO) "ERROR: No configurations to build"; exit 1; \
fi
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
if [ deploy/make/Makefile ] ; then \
echo "Attempting deploy build." ; \
( \
$(RM) -r $${bdir}/deploy_input ; \
$(MKDIR) -p $${bdir}/deploy_input ; \
( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
| ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
) ; \
fi; \
done
touch $@
# TBD: Deploy images
deploy: $(BUILD_DIR_ROOT)/.deploy_input
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
$(ECHO) "ERROR: No configurations to build"; exit 1; \
fi
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
if [ deploy/make/Makefile ] ; then \
echo "Attempting deploy build." ; \
( \
$(CD) deploy/make && \
$(MAKE) \
ABS_OUTPUTDIR=$${bdir}/deploy_input \
OUTPUTDIR=$${bdir}/deploy_input \
) ; \
fi; \
done
# TBD: Install bundles
install:
# Bundle creation
bundles:
@if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
......@@ -91,8 +130,8 @@ clobber::
checks:
@$(ECHO) "No checks yet"
# Keep track of phony targets
PHONY_LIST += all images clean clobber checks
# Keep track of user targets
USER_TARGETS += all deploy install images clean clobber checks
###########################################################################
# To help in adoption of the new configure&&make build process, a bridge
......@@ -102,32 +141,18 @@ PHONY_LIST += all images clean clobber checks
bridgeBuild: bridge2configure images
# Bridge from old Makefile ALT settings to configure options
bridge2configure: .bridge2configureOpts
$(CD) common/makefiles && sh ../autoconf/configure $(strip $(shell $(CAT) $<))
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
bash ./configure $(strip $(shell $(CAT) $<))
# Create a file with configure options created from old Makefile mechanisms.
.bridge2configureOpts: .bridge2configureOptsLatest
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
$(RM) $@
$(CP) $< $@
# In case make was invoked from a specific path
_MAKE_COMMAND_PATH:=$(firstword $(MAKE))
ifneq ($(dir $(_MAKE_COMMAND_PATH)),./)
# This could be removed someday if JPRT was fixed and we could assume that
# the path to make was always in PATH.
MAKE_BINDIR:=$(call UnixPath,$(dir $(_MAKE_COMMAND_PATH)))
NEWPATH:=$(MAKE_BINDIR):${PATH}
PATH:=$(NEWPATH)
export PATH
MAKE_COMMAND=$(MAKE_BINDIR)/$(notdir $(_MAKE_COMMAND_PATH))
else
MAKE_COMMAND=$(_MAKE_COMMAND_PATH)
endif
# Use this file to only change when obvious things have changed
.bridge2configureOptsLatest: FRC
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
$(RM) $@.tmp
@$(ECHO) " MAKE=$(MAKE_COMMAND) " >> $@.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
......@@ -156,11 +181,21 @@ endif
# Clobber all the built files
clobber:: bridge2clobber
bridge2clobber::
$(RM) .bridge2*
$(RM) $(BUILD_DIR_ROOT)/.bridge2*
$(RM) $(BUILD_DIR_ROOT)/.deploy_input
# Keep track of phony targets
PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
###########################################################################
# Sanity checks (history target)
#
sanity: checks
# Keep track of user targets
USER_TARGETS += sanity
###########################################################################
# Javadocs
#
......@@ -168,8 +203,8 @@ PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
javadocs:
cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
# Keep track of phony targets
PHONY_LIST += javadocs
# Keep track of user targets
USER_TARGETS += javadocs
###########################################################################
# JPRT targets
......@@ -190,7 +225,6 @@ jprt_build_debug: DEBUG_LEVEL=slowdebug
jprt_build_debug: BUILD_DIRNAME=*-debug
jprt_build_debug: jprt_build_generic
jprt_build_generic: EXTRA_MAKE_ARGS=LOG=nofile,info
jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
......@@ -202,10 +236,60 @@ $(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
jprt_build_generic
###########################################################################
# Help target
HELP_FORMAT=%12s%s\n
help:
@$(PRINTF) "# JDK Makefile\n"
@$(PRINTF) "#\n"
@$(PRINTF) "# Usage: make [Target]\n"
@$(PRINTF) "#\n"
@$(PRINTF) "# $(HELP_FORMAT)" "Target " "Description"
@$(PRINTF) "# $(HELP_FORMAT)" "------ " "-----------"
@for i in $(USER_TARGETS) ; do \
$(MAKE) help_$${i} ; \
done
@$(PRINTF) "#\n"
help_all:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Build the entire jdk but not the images"
help_images:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Create the jdk images for the builds"
help_deploy:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Create the jdk deploy images from the jdk images"
help_install:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Create the jdk install bundles from the deploy images"
help_clean:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Clean and prepare for a fresh build from scratch"
help_clobber:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Clean and also purge any hidden derived data"
help_checks:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Perform various checks to make sure we can build"
help_sanity:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Same as 'make checks'"
help_javadocs:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Build the javadocs"
help_help:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Print out the help messages"
# Keep track of user targets
USER_TARGETS += help
###########################################################################
# Phony targets
.PHONY: $(PHONY_LIST)
.PHONY: $(PHONY_LIST) $(USER_TARGETS)
# Force target
FRC:
......@@ -21,6 +21,7 @@
# questions.
#
# Generated Makefile @DATE_WHEN_CONFIGURED@
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
# GENERATED FILE, DO NOT EDIT
SPEC:=@OUTPUT_ROOT@/spec.gmk
include @SRC_ROOT@/common/makefiles/Makefile
#!/bin/sh
#!/bin/bash
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
......@@ -29,14 +29,11 @@ if test "x`uname -s`" = "xSunOS"; then
# date +%s is not available on Solaris, use this workaround
# from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
# On Solaris /bin/sh doesn't support test -e but /usr/bin/test does.
TEST=`which test`
else
TIMESTAMP=`date +%s`
TEST="test"
fi
if $TEST "$CUSTOM_CONFIG_DIR" = ""; then
if test "x$CUSTOM_CONFIG_DIR" = "x"; then
custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
else
custom_script_dir=$CUSTOM_CONFIG_DIR
......@@ -44,16 +41,22 @@ fi
custom_hook=$custom_script_dir/custom-hook.m4
if test "x`which autoconf 2> /dev/null`" = x; then
echo You need autoconf installed to be able to regenerate the configure script
echo Error: Cannot find autoconf 1>&2
exit 1
fi
echo Generating generated-configure.sh
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
rm -rf autom4te.cache
if $TEST -e $custom_hook; then
if test -e $custom_hook; then
echo Generating custom generated-configure.sh
# 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|AC_DEFUN_ONCE(\[CUSTOM_HOOK\])|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
......
此差异已折叠。
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
[
windows_path="[$]$1"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
$1="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
$1="$unix_path"
fi
])
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
[
unix_path="[$]$1"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
windows_path=`$CYGPATH -m "$unix_path"`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
windows_path=`cmd //c echo $unix_path`
$1="$windows_path"
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-stile (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
])
# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
# and could probably be heavily simplified. However, all changes in this
# area tend to need lot of testing in different scenarios, and in lack of
# proper unit testing, cleaning this up has not been deemed worth the effort
# at the moment.
AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
[
# Input might be given as Windows format, start by converting to
# unix format.
path="[$]$1"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
])
AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
[
path="[$]$1"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
])
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# 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,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$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.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# 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"
elif test -f "${new_path}.cmd"; then
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])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
])
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
# 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,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
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.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
# Output is in $new_path
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
fi
])
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
[
SRC_ROOT_LENGTH=`$THEPWDCMD|$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])
fi
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
AC_MSG_CHECKING([cygwin release])
CYGWIN_VERSION=`$UNAME -r`
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])
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
cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
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.])
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"
AC_MSG_CHECKING([msys root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
AC_MSG_RESULT([$MSYS_ROOT_PATH])
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
else
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.])
fi
# Test if windows or unix (cygwin/msys) find is first in path.
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
FIND_BINARY_OUTPUT=`find --version 2>&1`
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
AC_MSG_RESULT([unix style])
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
AC_MSG_RESULT([Windows])
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
AC_MSG_ERROR([Cannot continue])
else
AC_MSG_RESULT([unknown])
AC_MSG_WARN([It seems that your find utility is non-standard.])
fi
])
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
AC_MSG_CHECKING([if fixpath can be created])
FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
# @ 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*
cd $OUTPUT_ROOT
$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])
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
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!])
fi
AC_MSG_RESULT([yes])
rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
fi
AC_SUBST(FIXPATH)
])
......@@ -62,9 +62,12 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
else
# We're done! :-)
BOOT_JDK_FOUND=yes
SPACESAFE(BOOT_JDK,[the path to the Boot JDK])
BASIC_FIXUP_PATH(BOOT_JDK)
AC_MSG_CHECKING([for Boot JDK])
AC_MSG_RESULT([$BOOT_JDK ($BOOT_JDK_VERSION)])
AC_MSG_RESULT([$BOOT_JDK])
AC_MSG_CHECKING([Boot JDK version])
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
AC_MSG_RESULT([$BOOT_JDK_VERSION])
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
......@@ -93,12 +96,8 @@ AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
[
if test "x$JAVA_HOME" != x; then
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, JAVA_HOME is likely in DOS-style
JAVA_HOME_PROCESSED="`$CYGPATH -u "$JAVA_HOME"`"
else
JAVA_HOME_PROCESSED="$JAVA_HOME"
fi
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
......@@ -125,8 +124,7 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
# 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.
SET_FULL_PATH_SPACESAFE(BINARY)
REMOVE_SYMBOLIC_LINKS(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
......@@ -155,13 +153,17 @@ AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY],
[
BOOT_JDK_PREFIX="$1"
BOOT_JDK_SUFFIX="$2"
BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
if test "x$BEST_JDK_FOUND" != x; then
BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
if test -d "$BOOT_JDK"; then
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)])
fi
ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
if test "x$ALL_JDKS_FOUND" != x; then
for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
BOOTJDK_DO_CHECK([
BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
if test -d "$BOOT_JDK"; then
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)])
fi
])
done
fi
])
......@@ -171,7 +173,9 @@ AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY],
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
[
if test "x[$]$1" != x; then
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([`$CYGPATH -u "[$]$1"`/Java])
VIRTUAL_DIR="[$]$1/Java"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
fi
])
......@@ -187,6 +191,8 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])])
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])])
elif test "x$OPENJDK_TARGET_OS" = xlinux; then
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/usr/lib/jvm])])
fi
])
......
......@@ -48,6 +48,9 @@ fi
# Test and fix cygwin on x86_64
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
if test $? != 0; then
echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
fi
if test $? = 0; then
case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
......
......@@ -41,6 +41,10 @@ AC_DEFUN([BPERF_CHECK_CORES],
# 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
# For c/c++ code we run twice as many concurrent build
......@@ -50,7 +54,8 @@ AC_DEFUN([BPERF_CHECK_CORES],
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_RESULT([could not detect number of cores, defaulting to 1])
AC_MSG_WARN([This will disable all parallelism from build!])
fi
])
......@@ -76,16 +81,18 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
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$build_os" = xwindows; then
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
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_RESULT([could not detect memory size, defaulting to 1024 MB])
AC_MSG_WARN([This might seriously impact build performance!])
fi
])
......@@ -123,7 +130,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
[
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache],
[use ccache to speed up recompilations @<:@enabled@:>@])],
[disable using ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then
AC_PATH_PROG(CCACHE, ccache)
......@@ -196,7 +203,7 @@ 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],
[use precompiled headers when compiling C++ @<:@enabled@:>@])],
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1
......@@ -228,8 +235,7 @@ 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 and other long running java tasks in the build process,
e.g. ---with-sjavac-server-java="/opt/jrockit/bin/java -server"])])
[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
if test "x$with_sjavac_server_java" != x; then
SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
......
......@@ -235,26 +235,13 @@ 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, e.g. --with-builddeps-server=ftp://example.com/dir])])
[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 @<:@d/localhome/builddeps@:>@])],
[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_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
[list all build dependencies known to the configure script])],
[LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
if test "x$LIST_BUILDDEPS" = xyes; then
echo
echo List of build dependencies known to the configure script,
echo that can be used in builddeps.conf files:
cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODUL[E]\( | cut -f 2 -d ',' | tr -d ' ' | sort
echo
exit 1
fi
])
......@@ -26,3 +26,7 @@ PRODUCT_NAME="Java(TM)"
PRODUCT_SUFFIX="SE Runtime Environment"
JDK_RC_PLATFORM_NAME="Platform SE"
COMPANY_NAME="Oracle Corporation"
# Might need better names for these
MACOSX_BUNDLE_NAME_BASE="Java SE"
MACOSX_BUNDLE_ID_BASE="com.oracle.java"
此差异已折叠。
#!/bin/sh
#!/bin/bash
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
if test "x$BASH_VERSION" = x; then
echo This script needs bash to run.
echo It is recommended to use the configure script in the source tree root instead.
exit 1
fi
CONFIGURE_COMMAND_LINE="$@"
conf_script_dir=`dirname $0`
......@@ -13,58 +41,81 @@ fi
### Test that the generated configure is up-to-date
###
# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does.
TEST=`which test`
print_error_not_up_to_date() {
echo "Error: The configure source files is newer than the generated files."
echo "Please run 'sh autogen.sh' to update the generated files."
echo "Note that this test might trigger incorrectly sometimes due to hg timestamps".
}
# NOTE: This test can occasionally go wrong due to the way mercurial handles
# timestamps. It it supposed to aid during development of build-infra, but should
# go away before making this the default build system.
for file in configure.ac *.m4 ; do
if $TEST $file -nt generated-configure.sh; then
print_error_not_up_to_date
run_autogen_or_fail() {
if test "x`which autoconf 2> /dev/null`" = x; then
echo "Cannot locate autoconf, unable to correct situation."
echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
echo "Error: Cannot continue" 1>&2
exit 1
else
echo "Running autogen.sh to correct the situation"
bash $conf_script_dir/autogen.sh
fi
done
}
if $TEST -e $conf_custom_script_dir/generated-configure.sh; then
# If custom source configure is available, make sure it is up-to-date as well.
for file in configure.ac *.m4 $conf_custom_script_dir/*.m4; do
if $TEST $file -nt $conf_custom_script_dir/generated-configure.sh; then
print_error_not_up_to_date
exit 1
check_autoconf_timestamps() {
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 ; do
if test $file -nt $conf_script_dir/generated-configure.sh; then
echo "Warning: The configure source files is newer than the generated files."
run_autogen_or_fail
fi
done
if test -e $conf_custom_script_dir/generated-configure.sh; then
# If custom source configure is available, make sure it is up-to-date as well.
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $conf_custom_script_dir/*.m4; do
if test $file -nt $conf_custom_script_dir/generated-configure.sh; then
echo "Warning: The configure source files is newer than the custom generated files."
run_autogen_or_fail
fi
done
fi
}
check_hg_updates() {
if test "x`which hg 2> /dev/null`" != x; then
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_updated_autoconf_files" != x; then
echo "Configure source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
if test -e $conf_custom_script_dir; then
# If custom source configure is available, make sure it is up-to-date as well.
conf_custom_updated_autoconf_files=`cd $conf_custom_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_custom_updated_autoconf_files" != x; then
echo "Configure custom source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
fi
fi
}
# Check for local changes
check_hg_updates
if test -e $conf_custom_script_dir/generated-configure.sh; then
# Test if open configure is newer than custom configure, if so, custom needs to
# be regenerated. This test is required to ensure consistency with custom source.
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh | cut -d" " -f 3`
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_custom_script_dir/generated-configure.sh | cut -d" " -f 3`
if $TEST $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
echo "Error: The generated configure file contains changes not present in the custom generated file."
echo "Please run 'sh autogen.sh' to update the generated files."
exit 1
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_custom_script_dir/generated-configure.sh | cut -d"=" -f 2`
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
echo "Warning: The generated configure file contains changes not present in the custom generated file."
run_autogen_or_fail
fi
fi
# Autoconf calls the configure script recursively sometimes.
# Don't start logging twice in that case
if $TEST "x$conf_debug_configure" = xtrue; then
if test "x$conf_debug_configure" = xtrue; then
conf_debug_configure=recursive
fi
###
### Process command-line arguments
###
conf_processed_arguments=
conf_processed_arguments=()
conf_openjdk_target=
conf_extra_cflags=
conf_extra_cxxflags=
for conf_option
do
......@@ -72,20 +123,14 @@ do
--openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;;
--with-extra-cflags=*)
conf_extra_cflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;;
--with-extra-cxxflags=*)
conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;;
--debug-configure)
if $TEST "x$conf_debug_configure" != xrecursive; then
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" ;;
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
esac
case $conf_option in
......@@ -95,11 +140,13 @@ do
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
if $TEST "x$conf_legacy_crosscompile" != "x"; then
if $TEST "x$conf_openjdk_target" != "x"; then
if test "x$conf_legacy_crosscompile" != "x"; then
if test "x$conf_openjdk_target" != "x"; then
echo "Error: Specifying --openjdk-target together with autoconf"
echo "legacy cross-compilation flags is not supported."
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
......@@ -112,20 +159,20 @@ if $TEST "x$conf_legacy_crosscompile" != "x"; then
fi
fi
if $TEST "x$conf_openjdk_target" != "x"; then
if test "x$conf_openjdk_target" != "x"; then
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
conf_processed_arguments="--build=$conf_build_platform --host=$conf_openjdk_target --target=$conf_openjdk_target $conf_processed_arguments"
conf_processed_arguments=("--build=$conf_build_platform" "--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
fi
# Make configure exit with error on invalid options as default.
# Can be overridden by --disable-option-checking, since we prepend our argument
# and later options override earlier.
conf_processed_arguments="--enable-option-checking=fatal $conf_processed_arguments"
conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
###
### Call the configure script
###
if $TEST -e $conf_custom_script_dir/generated-configure.sh; then
if test -e $conf_custom_script_dir/generated-configure.sh; then
# Custom source configure available; run that instead
echo Running custom generated-configure.sh
conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
......@@ -134,17 +181,17 @@ else
conf_script_to_run=$conf_script_dir/generated-configure.sh
fi
if $TEST "x$conf_debug_configure" != x; then
if test "x$conf_debug_configure" != x; then
# Turn on shell debug output if requested (initial or recursive)
set -x
fi
if $TEST "x$conf_debug_configure" = xtrue; then
if test "x$conf_debug_configure" = xtrue; then
# Turn on logging, but don't turn on twice when called recursive
conf_debug_logfile=./debug-configure.log
(exec 3>&1 ; (. $conf_script_to_run $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile
(exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile
else
. $conf_script_to_run $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
( . $conf_script_to_run "${conf_processed_arguments[@]}" )
fi
conf_result_code=$?
......@@ -152,8 +199,28 @@ conf_result_code=$?
### Post-processing
###
if test $conf_result_code -eq 0; then
if test "x$conf_print_help" = xtrue; then
cat <<EOT
Additional (non-autoconf) OpenJDK Options:
--openjdk-target=TARGET cross-compile with TARGET as target platform
(i.e. the one you will run the resulting binary on).
Equivalent to --host=TARGET --target=TARGET
--build=<current platform>
--debug-configure Run the configure script with additional debug
logging enabled.
Please be aware that, when cross-compiling, the OpenJDK configure script will
generally use 'target' where autoconf traditionally uses 'host'.
EOT
fi
else
echo configure exiting with result code $conf_result_code
fi
# Move the log file to the output root, if this was successfully created
if $TEST -d "$OUTPUT_ROOT"; then
if test -d "$OUTPUT_ROOT"; then
mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
fi
......
......@@ -31,16 +31,14 @@
AC_PREREQ([2.61])
AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net)
# Do not change or remove the following line, it is needed for consistency checks:
# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
AC_CONFIG_AUX_DIR([build-aux])
m4_include([build-aux/pkg.m4])
# Include these first...
m4_include([basics.m4])
m4_include([basics_windows.m4])
m4_include([builddeps.m4])
# ... then the rest
m4_include([boot-jdk.m4])
......@@ -51,35 +49,57 @@ m4_include([libraries.m4])
m4_include([platform.m4])
m4_include([source-dirs.m4])
m4_include([toolchain.m4])
m4_include([toolchain_windows.m4])
# This line needs to be here, verbatim, after all includes.
# It is replaced with custom functionality when building
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
# This line needs to be here, verbatim, after all includes and the dummy hook
# definitions. It is replaced with custom functionality when building
# custom sources.
AC_DEFUN_ONCE([CUSTOM_HOOK])
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
###############################################################################
#
# Initialization
# Initialization / Boot-strapping
#
# The bootstrapping process needs to solve the "chicken or the egg" problem,
# thus it jumps back and forth, each time gaining something needed later on.
#
###############################################################################
# Basic initialization that must happen first of all
BASIC_INIT
BASIC_SETUP_FUNDAMENTAL_TOOLS
# Now we can determine OpenJDK build and target platforms. This is required to
# have early on.
PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
# Continue setting up basic stuff.
# Continue setting up basic stuff. Most remaining code require fundamental tools.
BASIC_SETUP_PATHS
BASIC_SETUP_LOGGING
# These are needed to be able to create a configuration name (and thus the output directory)
JDKOPT_SETUP_JDK_VARIANT
JDKOPT_SETUP_JVM_VARIANTS
JDKOPT_SETUP_DEBUG_LEVEL
# With basic setup done, call the custom early hook.
CUSTOM_EARLY_HOOK
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
HELP_SETUP_DEPENDENCY_HELP
# Setup simple tools, that do not need have cross compilation support.
# Without these, we can't properly run the rest of the configure script.
BASIC_SETUP_TOOLS
# Setup tools that requires more complex handling, or that is not needed by the configure script.
BASIC_SETUP_COMPLEX_TOOLS
# Check if pkg-config is available.
PKG_PROG_PKG_CONFIG
......@@ -100,16 +120,9 @@ BDEPS_SCAN_FOR_BUILDDEPS
###############################################################################
# We need build & target for this.
JDKOPT_SETUP_JDK_VARIANT
JDKOPT_SETUP_JVM_VARIANTS
JDKOPT_SETUP_DEBUG_LEVEL
JDKOPT_SETUP_JDK_OPTIONS
JDKOPT_SETUP_JDK_VERSION_NUMBERS
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
###############################################################################
#
# Setup BootJDK, used to bootstrap the build.
......@@ -137,7 +150,6 @@ SRCDIRS_SETUP_OUTPUT_DIRS
###############################################################################
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
# Locate the actual tools
TOOLCHAIN_SETUP_PATHS
......@@ -152,10 +164,6 @@ TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
# After we have toolchain, we can compile the uncygdrive helper
BASIC_COMPILE_UNCYGDRIVE
# Setup debug symbols (need objcopy from the toolchain for that)
JDKOPT_SETUP_DEBUG_SYMBOLS
......@@ -173,6 +181,9 @@ LIB_SETUP_ALSA
LIB_SETUP_MISC_LIBS
LIB_SETUP_STATIC_LINK_LIBSTDCPP
# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
BASIC_COMPILE_FIXPATH
###############################################################################
#
# We need to do some final tweaking, when everything else is done.
......@@ -210,7 +221,7 @@ BPERF_SETUP_CCACHE
BASIC_TEST_USABILITY_ISSUES
# At the end, call the custom hook. (Dummy macro if no custom sources available)
CUSTOM_HOOK
CUSTOM_LATE_HOOK
# We're messing a bit with internal autoconf variables to put the config.status
# in the output directory instead of the current directory.
......
......@@ -55,6 +55,19 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
fi
])
cygwin_help() {
case $1 in
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" ;;
make)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
* )
break ;;
esac
}
apt_help() {
case $1 in
devkit)
......@@ -149,7 +162,15 @@ 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 "* Boot JDK: $BOOT_JDK\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"
......
......@@ -48,8 +48,8 @@ ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
# compiler that produces code that can be run on the build platform.
HOSTCC:=@UNCYGDRIVE@ @BUILD_CC@
HOSTCXX:=@UNCYGDRIVE@ @BUILD_CXX@
HOSTCC:=@FIXPATH@ @BUILD_CC@
HOSTCXX:=@FIXPATH@ @BUILD_CXX@
####################################################
#
......@@ -78,13 +78,23 @@ ARCH=$(OPENJDK_TARGET_CPU_LEGACY)
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
ALT_EXPORT_PATH=$(HOTSPOT_DIST)
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@
# This is used from the libjvm build for C/C++ code.
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
# Control wether Hotspot runs Queens test after building
TEST_IN_BUILD=@TEST_IN_BUILD@
# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
# Hotspot has its own handling on the Windows path situation.
CXX:=@CCACHE@ @HOTSPOT_CXX@
LD:=@HOTSPOT_LD@
MT:=@HOTSPOT_MT@
RC:=@HOTSPOT_RC@
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
# This is needed to get the LOG setting to work properly.
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
......@@ -64,7 +64,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
# 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 that should be built])
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, kernel, zero, zeroshark) @<:@server@:>@])])
......@@ -241,40 +241,39 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
# Should we build only OpenJDK even if closed sources are present?
#
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
[build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
[supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
if test "x$enable_openjdk_only" = "xyes"; then
OPENJDK=true
elif test "x$enable_openjdk_only" = "xno"; then
OPENJDK=false
elif test -d "$SRC_ROOT/jdk/src/closed"; then
OPENJDK=false
AC_MSG_CHECKING([for presence of closed sources])
if test -d "$SRC_ROOT/jdk/src/closed"; then
CLOSED_SOURCE_PRESENT=yes
else
CLOSED_SOURCE_PRESENT=no
fi
AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
if test "x$CLOSED_SOURCE_PRESENT" = xno; then
OPENJDK=true
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
fi
else
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
OPENJDK=true
else
OPENJDK=false
fi
fi
if test "x$OPENJDK" = "xtrue"; then
SET_OPENJDK=OPENJDK=true
SET_OPENJDK="OPENJDK=true"
fi
AC_SUBST(SET_OPENJDK)
###############################################################################
#
# JIGSAW or not. The JIGSAW variable is used during the intermediate
# stage when we are building both the old style JDK and the new style modularized JDK.
# When the modularized JDK is finalized, this option will go away.
#
AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
[build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
if test "x$enable_jigsaw" = "xyes"; then
JIGSAW=true
else
JIGSAW=false
fi
AC_SUBST(JIGSAW)
###############################################################################
#
# Should we build a JDK/JVM with headful support (ie a graphical ui)?
......@@ -282,7 +281,7 @@ AC_SUBST(JIGSAW)
#
AC_MSG_CHECKING([headful support])
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
[build headful support (graphical UI support) @<:@enabled@:>@])],
[disable building headful support (graphical UI support) @<:@enabled@:>@])],
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
SUPPORT_HEADLESS=yes
......@@ -305,25 +304,9 @@ AC_SUBST(SUPPORT_HEADLESS)
AC_SUBST(SUPPORT_HEADFUL)
AC_SUBST(BUILD_HEADLESS)
###############################################################################
#
# Should we compile nimbus swing L&F? We can probably remove this option
# since nimbus is officially part of javax now.
#
AC_MSG_CHECKING([whether to build nimbus L&F])
AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
[disable Nimbus L&F @<:@enabled@:>@])],
[ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
AC_MSG_RESULT([$ENABLE_NIMBUS])
DISABLE_NIMBUS=
if test "x$ENABLE_NIMBUS" = xno; then
DISABLE_NIMBUS=true
fi
AC_SUBST(DISABLE_NIMBUS)
# Control wether Hotspot runs Queens test after build.
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
[enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
[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
......@@ -351,43 +334,25 @@ AC_SUBST(CACERTS_FILE)
###############################################################################
#
# Compress jars
# Enable or disable unlimited crypto
#
COMPRESS_JARS=false
AC_SUBST(COMPRESS_JARS)
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
UNLIMITED_CRYPTO=false
fi
AC_SUBST(UNLIMITED_CRYPTO)
###############################################################################
#
# Should we compile JFR
# default no, except for on closed-jdk
#
ENABLE_JFR=no
# Is the JFR source present
#
# For closed default is yes
# Compress jars
#
if test "x${OPENJDK}" != "xtrue"; then
ENABLE_JFR=yes
fi
AC_MSG_CHECKING([whether to build jfr])
AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
[enable jfr (default is no)])]
[ENABLE_JFR="${enableval}"])
AC_MSG_RESULT([${ENABLE_JFR}])
if test "x$ENABLE_JFR" = "xyes"; then
ENABLE_JFR=true
elif test "x$ENABLE_JFR" = "xno"; then
ENABLE_JFR=false
else
AC_MSG_ERROR([Invalid argument to --enable-jfr])
fi
COMPRESS_JARS=false
AC_SUBST(ENABLE_JFR)
AC_SUBST(COMPRESS_JARS)
])
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
......@@ -409,6 +374,8 @@ 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)
......@@ -437,7 +404,7 @@ else
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
fi
AC_SUBST(FULL_VERSION)
......@@ -473,7 +440,7 @@ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
fi
AC_ARG_ENABLE([debug-symbols],
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])],
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
)
......@@ -487,7 +454,7 @@ fi
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
# Default is on if objcopy is found, otherwise off
if test "x$OBJCOPY" != x; then
if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=yes
else
ENABLE_DEBUG_SYMBOLS=no
......@@ -502,7 +469,7 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
ZIP_DEBUGINFO_FILES=yes
AC_ARG_ENABLE([zip-debug-info],
[AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])],
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
)
......@@ -528,5 +495,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],
[directory containing 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)
......@@ -172,9 +172,15 @@ fi
AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS"
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
[X11_A_OK=yes],
[X11_A_OK=no])
[X11_A_OK=yes],
[X11_A_OK=no],
[ # include <X11/Xlib.h>
# include <X11/Xutil.h>
])
CFLAGS="$OLD_CFLAGS"
AC_LANG_POP(C)
......@@ -196,27 +202,23 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
#
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
[specify prefix directory for the cups package
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
(expecting the headers under PATH/include)])])
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
[specify directory for the cups include files])])
AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
[specify directory for the cups library])])
if test "x$CUPS_NOT_NEEDED" = xyes; then
if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
AC_MSG_WARN([cups not used, so --with-cups is ignored])
fi
CUPS_CFLAGS=
CUPS_LIBS=
else
CUPS_FOUND=no
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
fi
if test "x${with_cups}" != x; then
CUPS_LIBS="-L${with_cups}/lib -lcups"
CUPS_CFLAGS="-I${with_cups}/include"
CUPS_FOUND=yes
fi
......@@ -224,10 +226,6 @@ else
CUPS_CFLAGS="-I${with_cups_include}"
CUPS_FOUND=yes
fi
if test "x${with_cups_lib}" != x; then
CUPS_LIBS="-L${with_cups_lib} -lcups"
CUPS_FOUND=yes
fi
if test "x$CUPS_FOUND" = xno; then
BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
fi
......@@ -236,23 +234,20 @@ else
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
[CUPS_FOUND=yes
CUPS_CFLAGS=
CUPS_LIBS="-lcups"
DEFAULT_CUPS=yes])
fi
if test "x$CUPS_FOUND" = xno; then
# Getting nervous now? Lets poke around for standard Solaris third-party
# package installation locations.
AC_MSG_CHECKING([for cups headers and libs])
AC_MSG_CHECKING([for cups headers])
if test -s /opt/sfw/cups/include/cups/cups.h; then
# An SFW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/sfw/cups/include"
CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
elif test -s /opt/csw/include/cups/cups.h; then
# A CSW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/csw/include"
CUPS_LIBS="-L/opt/csw/lib -lcups"
fi
AC_MSG_RESULT([$CUPS_FOUND])
fi
......@@ -263,7 +258,6 @@ else
fi
AC_SUBST(CUPS_CFLAGS)
AC_SUBST(CUPS_LIBS)
])
......@@ -292,17 +286,21 @@ else
FREETYPE2_FOUND=no
if test "x$with_freetype" != x; then
SPACESAFE(with_freetype,[the path to freetype])
BASIC_FIXUP_PATH(with_freetype)
FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
FREETYPE2_LIB_PATH="$with_freetype/lib"
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
fi
FREETYPE2_LIB_PATH="$with_freetype/lib"
FREETYPE2_CFLAGS="-I$with_freetype/include"
if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
fi
FREETYPE2_FOUND=yes
FREETYPE2_FOUND=yes
if test "x$FREETYPE2_FOUND" = xyes; then
# Verify that the directories exist
if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
......@@ -311,7 +309,7 @@ else
# List the contents of the lib.
FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
if test "x$FREETYPELIB" = x; then
AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib])
fi
# Check one h-file
if ! test -s "$with_freetype/include/ft2build.h"; then
......@@ -323,9 +321,34 @@ else
BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
USING_SYSTEM_FT_LIB=true
fi
if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
BASIC_FIXUP_PATH(FREETYPELOCATION)
AC_MSG_CHECKING([for freetype in some standard windows locations])
if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
if ! test -s "$FREETYPE2_LIBS"; then
AC_MSG_ERROR([Could not find $FREETYPE2_LIBS])
fi
if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll])
fi
USING_SYSTEM_FT_LIB=true
FREETYPE2_FOUND=yes
fi
AC_MSG_RESULT([$FREETYPE2_FOUND])
fi
if test "x$FREETYPE2_FOUND" = xno; then
PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
USING_SYSTEM_FT_LIB=true
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
fi
fi
if test "x$FREETYPE2_FOUND" = xno; then
AC_MSG_CHECKING([for freetype in some standard locations])
......@@ -364,7 +387,15 @@ else
if test "x$FREETYPE2_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([freetype2])
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
fi
fi
if test "x$OPENJDK_TARGET_OS" != xwindows; then
# AC_CHECK_LIB does not support use of cl.exe
PREV_LDFLAGS="$LDFLAGS"
LDFLAGS="$FREETYPE2_LIBS"
AC_CHECK_LIB(freetype, FT_Init_FreeType, [], AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
LDFLAGS="$PREV_LDFLAGS"
fi
fi
AC_SUBST(USING_SYSTEM_FT_LIB)
......@@ -621,13 +652,16 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
if test "x$enable_static_link_stdc__" = xyes; then
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
LDCXX="$CC"
STATIC_CXX_SETTING="STATIC_CXX=true"
AC_MSG_RESULT([static])
else
LIBCXX="$LIBCXX -lstdc++"
LDCXX="$CXX"
STATIC_CXX_SETTING="STATIC_CXX=false"
AC_MSG_RESULT([dynamic])
fi
fi
AC_SUBST(STATIC_CXX_SETTING)
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
......
......@@ -87,22 +87,32 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
*linux*)
VAR_OS=linux
VAR_OS_API=posix
VAR_OS_ENV=linux
;;
*solaris*)
VAR_OS=solaris
VAR_OS_API=posix
VAR_OS_ENV=solaris
;;
*darwin*)
VAR_OS=macosx
VAR_OS_API=posix
VAR_OS_ENV=macosx
;;
*bsd*)
VAR_OS=bsd
VAR_OS_API=posix
VAR_OS_ENV=bsd
;;
*cygwin*|*windows*)
*cygwin*)
VAR_OS=windows
VAR_OS_API=winapi
VAR_OS_ENV=windows.cygwin
;;
*mingw*)
VAR_OS=windows
VAR_OS_API=winapi
VAR_OS_ENV=windows.msys
;;
*)
AC_MSG_ERROR([unsupported operating system $1])
......@@ -127,12 +137,34 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_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)
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"
......@@ -144,22 +176,8 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
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($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_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-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
......@@ -208,7 +226,7 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
fi
AC_SUBST(COMPILE_TYPE)
AC_MSG_CHECKING([for compilation type])
AC_MSG_CHECKING([compilation type])
AC_MSG_RESULT([$COMPILE_TYPE])
])
......@@ -299,7 +317,11 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
A_LP64="LP64:="
ADD_LP64="-D_LP64=1"
# -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
fi
AC_SUBST(LP64,$A_LP64)
......
......@@ -41,7 +41,9 @@ SQUOTE:='
#'
DQUOTE:="
#"
define NEWLINE:=
define NEWLINE
endef
# A self-referential reference to this file.
......@@ -50,11 +52,7 @@ SPEC:=@SPEC@
# Specify where the spec file is.
MAKE_ARGS="SPEC=$(SPEC)"
# TODO The logic for finding and setting MAKE is currently not working
# well on windows. Disable it TEMPORARILY there for now.
ifneq (@OPENJDK_TARGET_OS@,windows)
MAKE:=@MAKE@
endif
MAKE:=@MAKE@
# Pass along the verbosity setting.
ifeq (,$(findstring VERBOSE=,$(MAKE)))
......@@ -77,6 +75,7 @@ CONF_NAME:=@CONF_NAME@
# The built jdk will run in this target system.
OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
......@@ -109,16 +108,21 @@ REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
@SET_OPENJDK@
JIGSAW:=@JIGSAW@
LIBM:=-lm
LIBDL:=@LIBDL@
# colon or semicolon
PATH_SEP:=@PATH_SEP@
# Set special env variables, to be passed to external tools.
# Used for cygwin setups.
@SETUPDEVENV@
ifeq ($(OPENJDK_TARGET_OS), windows)
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
# environment variables (in Windows path style), and the PATH needs to
# be adjusted to include Visual Studio tools (but this needs to be in
# cygwin/msys style).
export PATH:=@VS_PATH@
export INCLUDE:=@VS_INCLUDE@
export LIB:=@VS_LIB@
endif
# The sys root where standard headers and libraries are found.
# Usually not needed since the configure script should have
......@@ -131,7 +135,6 @@ ADD_SRC_ROOT:=@ADD_SRC_ROOT@
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
TOPDIR:=@SRC_ROOT@
OUTPUT_ROOT:=@OUTPUT_ROOT@
JDK_MAKE_SHARED_DIR:=@JDK_TOPDIR@/makefiles/common/shared
JDK_TOPDIR:=@JDK_TOPDIR@
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
CORBA_TOPDIR:=@CORBA_TOPDIR@
......@@ -155,6 +158,8 @@ PRODUCT_NAME:=@PRODUCT_NAME@
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
COMPANY_NAME:=@COMPANY_NAME@
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
# Different version strings generated from the above information.
JDK_VERSION:=@JDK_VERSION@
......@@ -260,6 +265,9 @@ PACKAGE_PATH=@PACKAGE_PATH@
# Source file for cacerts
CACERTS_FILE=@CACERTS_FILE@
# Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
# Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@
......@@ -289,7 +297,7 @@ C_FLAG_DEPS:=@C_FLAG_DEPS@
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
# Tools that potentially need to be cross compilation aware.
CC:=@UNCYGDRIVE@ @CCACHE@ @CC@
CC:=@FIXPATH@ @CCACHE@ @CC@
# CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
......@@ -299,17 +307,17 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
CXX:=@UNCYGDRIVE@ @CCACHE@ @CXX@
CXX:=@FIXPATH@ @CCACHE@ @CXX@
#CXXFLAGS:=@CXXFLAGS@
OBJC:=@CCACHE@ @OBJC@
#OBJCFLAGS:=@OBJCFLAGS@
CPP:=@UNCYGDRIVE@ @CPP@
CPP:=@FIXPATH@ @CPP@
#CPPFLAGS:=@CPPFLAGS@
# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
LD:=@UNCYGDRIVE@ @LD@
LD:=@FIXPATH@ @LD@
# LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
......@@ -317,7 +325,7 @@ LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
# On some platforms the linker cannot be used to create executables, thus
# the need for a separate LDEXE command.
LDEXE:=@UNCYGDRIVE@ @LDEXE@
LDEXE:=@FIXPATH@ @LDEXE@
# LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
......@@ -327,22 +335,22 @@ LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
# Sometimes a different linker is needed for c++ libs
LDCXX:=@UNCYGDRIVE@ @LDCXX@
LDCXX:=@FIXPATH@ @LDCXX@
# The flags for linking libstdc++ linker.
LIBCXX:=@LIBCXX@
# Sometimes a different linker is needed for c++ executables
LDEXECXX:=@UNCYGDRIVE@ @LDEXECXX@
LDEXECXX:=@FIXPATH@ @LDEXECXX@
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
# build platform.
BUILD_CC:=@UNCYGDRIVE@ @BUILD_CC@
BUILD_LD:=@UNCYGDRIVE@ @BUILD_LD@
BUILD_CC:=@FIXPATH@ @BUILD_CC@
BUILD_LD:=@FIXPATH@ @BUILD_LD@
AS:=@UNCYGDRIVE@ @AS@
AS:=@FIXPATH@ @AS@
# AR is used to create a static library (is ar in posix, lib.exe in windows)
AR:=@UNCYGDRIVE@ @AR@
AR:=@FIXPATH@ @AR@
ARFLAGS:=@ARFLAGS@
NM:=@NM@
......@@ -400,20 +408,20 @@ POST_MCS_CMD:=@POST_MCS_CMD@
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
JAVA=@UNCYGDRIVE@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
JAVAC=@UNCYGDRIVE@ $(BOOT_JDK)/bin/javac
JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
# overriding that value by using ?=.
JAVAC_FLAGS?=@JAVAC_FLAGS@
JAVAH=@UNCYGDRIVE@ $(BOOT_JDK)/bin/javah
JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
JAR=@UNCYGDRIVE@ $(BOOT_JDK)/bin/jar
JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
RMIC=@UNCYGDRIVE@ $(BOOT_JDK)/bin/rmic
RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
NATIVE2ASCII=@UNCYGDRIVE@ $(BOOT_JDK)/bin/native2ascii
NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
......@@ -424,21 +432,20 @@ endif
# A specific java binary with specific options can be used to run
# the long running background sjavac servers and other long running tasks.
SJAVAC_SERVER_JAVA:=@UNCYGDRIVE@ @SJAVAC_SERVER_JAVA@
SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
# Tools adhering to a minimal and common standard of posix compliance.
AWK:=@AWK@
BASENAME:=@BASENAME@
BASH:=@BASH@
CAT:=@CAT@
CCACHE:=@CCACHE@
# CD is going away, but remains to cater for legacy makefiles.
CD:=cd
CHMOD:=@CHMOD@
CP:=@CP@
CPIO:=@CPIO@
CUT:=@CUT@
DATE:=@DATE@
DF:=@DF@
DIFF:=@DIFF@
FIND:=@FIND@
FIND_DELETE:=@FIND_DELETE@
......@@ -461,6 +468,7 @@ SORT:=@SORT@
TAR:=@TAR@
TAIL:=@TAIL@
TEE:=@TEE@
TIME:=@TIME@
TR:=@TR@
TOUCH:=@TOUCH@
WC:=@WC@
......@@ -468,9 +476,9 @@ XARGS:=@XARGS@
ZIPEXE:=@ZIP@
ZIP:=@ZIP@
UNZIP:=@UNZIP@
MT:=@UNCYGDRIVE@ @MT@
RC:=@UNCYGDRIVE@ @RC@
DUMPBIN:=@UNCYGDRIVE@ @DUMPBIN@
MT:=@FIXPATH@ @MT@
RC:=@FIXPATH@ @RC@
DUMPBIN:=@FIXPATH@ @DUMPBIN@
CYGPATH:=@CYGPATH@
LDD:=@LDD@
OTOOL:=@OTOOL@
......@@ -479,8 +487,9 @@ EXPR:=@EXPR@
FILE:=@FILE@
HG:=@HG@
OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@
UNCYGDRIVE:=@UNCYGDRIVE@
FIXPATH:=@FIXPATH@
# Where the build output is stored for your convenience.
BUILD_LOG:=@BUILD_LOG@
......@@ -488,14 +497,12 @@ BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
# Build setup
DISABLE_NIMBUS:=@DISABLE_NIMBUS@
ENABLE_JFR=@ENABLE_JFR@
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
CHECK_FOR_VCINSTALLDIR=@CHECK_FOR_VCINSTALLDIR@
MSVCRNN_DLL:=@MSVCR100DLL@
MSVCR_DLL:=@MSVCR_DLL@
# ADD_SRCS takes a single argument with source roots
......
此差异已折叠。
此差异已折叠。
......@@ -34,3 +34,7 @@ PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
JDK_RC_PLATFORM_NAME=Platform
COMPANY_NAME=N/A
# Might need better names for these
MACOSX_BUNDLE_NAME_BASE="OpenJDK"
MACOSX_BUNDLE_ID_BASE="net.java.openjdk"
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
#!/bin/sh
#!/bin/bash
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
......
#!/bin/sh
#!/bin/bash
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
......
......@@ -22,32 +22,26 @@
# questions.
#
# Must be bash, but that is ok since we are running from cygwin.
# The first argument is the vcvarsall.bat file to run.
# The second argument is the arch arg to give to vcvars.
VCVARSALL="$1"
ARCH_ARG="$2"
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
# but calculate the difference in Cygwin environment before/after running it and then
# apply the diff.
_vs10varsall=`cygpath -a -m -s "$VCVARSALL"`
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
_dosbash=`cygpath -a -w -s \`which bash\`.*`
# generate the set of exported vars before/after the vs10 setup
echo "@echo off" > localdevenvtmp.bat
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
echo "call $_dosvs10varsall $ARCH_ARG" >> localdevenvtmp.bat
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
cmd /c localdevenvtmp.bat
# apply the diff (less some non-vs10 vars named by "!")
sort localdevenvtmp.export0 |grep -v "!" > localdevenvtmp.export0.sort
sort localdevenvtmp.export1 |grep -v "!" > localdevenvtmp.export1.sort
comm -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
cat localdevenv.sh | sed 's/declare -x /export /g' | sed 's/="/:="/g' | sed 's/\\\\/\\/g' | sed 's/"//g' | \
sed 's/#/\$\(HASH\)/g' > localdevenv.gmk
# Usage: sh shell-tracer.sh <TIME_CMD> <OUTPUT_FILE> <OLD_SHELL> <shell command line>
#
# This shell script is supposed to be set as a replacement for SHELL in make,
# causing it to be called whenever make wants to execute shell commands.
# The <shell command line> is suitable for passing on to the old shell,
# typically beginning with -c.
#
# This script will make sure the shell command line is executed with
# OLD_SHELL -x, and it will also store a simple log of the the time it takes to
# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
# to by TIME_CMD. If TIME_CMD is "-", no timestamp will be stored.
# cleanup
rm -f localdevenvtmp*
TIME_CMD="$1"
OUTPUT_FILE="$2"
OLD_SHELL="$3"
shift
shift
shift
if [ "$TIME_CMD" != "-" ]; then
"$TIME_CMD" -f "[TIME:%E] $*" -a -o "$OUTPUT_FILE" "$OLD_SHELL" -x "$@"
else
"$OLD_SHELL" -x "$@"
fi
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
\ No newline at end of file
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
$(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72,
\ No newline at end of file
$(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72,
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册