Merge
This commit is contained in:
commit
b32d3c877e
@ -233,3 +233,4 @@ b7e64be81c8a7690703df5711f4fc2375da8a9cb jdk8-b103
|
||||
91f47e8da5c60de58ed195e9b57f3bf192a18f83 jdk8-b109
|
||||
4faa09c7fe555de086dd9048d3c5cc92317d6f45 jdk8-b110
|
||||
d086227bfc45d124f09b3bd72a07956b4073bf71 jdk8-b111
|
||||
547316ea137d83d9c63083a9b83db64198fe0c81 jdk8-b112
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2013, 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
|
||||
@ -36,10 +36,8 @@ default:
|
||||
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
|
||||
|
||||
# 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 ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
|
||||
endif
|
||||
|
||||
# Locate this Makefile
|
||||
|
@ -212,6 +212,18 @@ AC_DEFUN([BASIC_DEPRECATED_ARG_WITH],
|
||||
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
|
||||
])
|
||||
|
||||
# Register a --enable argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --enable-
|
||||
# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
|
||||
AC_DEFUN([BASIC_DEPRECATED_ARG_ENABLE],
|
||||
[
|
||||
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])])
|
||||
if test "x$enable_$2" != x; then
|
||||
AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
@ -502,7 +514,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[[12]]\)\|\(4\.\)'`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
else
|
||||
@ -644,6 +656,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
BASIC_REQUIRE_PROG(DSYMUTIL, dsymutil)
|
||||
BASIC_REQUIRE_PROG(XATTR, xattr)
|
||||
AC_PATH_PROG(CODESIGN, codesign)
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
|
@ -177,6 +177,9 @@ JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
|
||||
BASIC_COMPILE_FIXPATH
|
||||
|
||||
LIB_SETUP_INIT
|
||||
LIB_SETUP_X11
|
||||
LIB_SETUP_CUPS
|
||||
@ -185,8 +188,6 @@ 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
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,43 +31,76 @@ AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
|
||||
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
|
||||
# $1 is the help tag: freetype, cups, pulse, alsa etc
|
||||
MISSING_DEPENDENCY=$1
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
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 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
cygwin_help $MISSING_DEPENDENCY
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
msys_help $MISSING_DEPENDENCY
|
||||
else
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
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 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
cygwin_help() {
|
||||
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 )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
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 )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
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 )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
freetype)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
HELP_MSG="To install freetype, run:
|
||||
wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
|
||||
chmod +x /tmp/freetype-setup.exe
|
||||
/tmp/freetype-setup.exe
|
||||
Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
|
||||
After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
|
||||
else
|
||||
HELP_MSG="You need to build a 64-bit version of freetype.
|
||||
This is not readily available.
|
||||
You can find source code and build instructions on
|
||||
http://www.freetype.org/
|
||||
If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
msys_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
apt_help() {
|
||||
case $1 in
|
||||
devkit)
|
||||
@ -78,7 +111,7 @@ apt_help() {
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
|
||||
freetype2)
|
||||
freetype)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
|
||||
@ -101,7 +134,7 @@ yum_help() {
|
||||
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
|
||||
freetype2)
|
||||
freetype)
|
||||
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@ -123,8 +123,7 @@ endif
|
||||
# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES)$(ENABLE_DEBUG_SYMBOLS), truetrue)
|
||||
ZIP_DEBUGINFO_FILES:=1
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), false)
|
||||
else
|
||||
ZIP_DEBUGINFO_FILES:=0
|
||||
endif
|
||||
|
||||
|
@ -516,11 +516,11 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
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
|
||||
# Default is on if objcopy is found
|
||||
if test "x$OBJCOPY" != x; then
|
||||
ENABLE_DEBUG_SYMBOLS=true
|
||||
# MacOS X and Windows don't use objcopy but default is on for those OSes
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
ENABLE_DEBUG_SYMBOLS=true
|
||||
else
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
|
@ -57,7 +57,6 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
|
||||
ALSA_NOT_NEEDED=yes
|
||||
PULSE_NOT_NEEDED=yes
|
||||
X11_NOT_NEEDED=yes
|
||||
FREETYPE2_NOT_NEEDED=yes
|
||||
# If the java runtime framework is disabled, then we need X11.
|
||||
# This will be adjusted below.
|
||||
AC_MSG_RESULT([alsa pulse x11])
|
||||
@ -70,7 +69,7 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK" = "xfalse"; then
|
||||
FREETYPE2_NOT_NEEDED=yes
|
||||
FREETYPE_NOT_NEEDED=yes
|
||||
fi
|
||||
|
||||
if test "x$SUPPORT_HEADFUL" = xno; then
|
||||
@ -79,33 +78,17 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
|
||||
# that uses this API.
|
||||
# Check for MacOSX support for OpenJDK.
|
||||
#
|
||||
AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
|
||||
[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
|
||||
[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
|
||||
|
||||
USE_MACOSX_RUNTIME_SUPPORT=no
|
||||
AC_MSG_CHECKING([for explicit Java runtime support in the OS])
|
||||
BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support)
|
||||
|
||||
AC_MSG_CHECKING([for Mac OS X Java Framework])
|
||||
if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
|
||||
if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
|
||||
MACOSX_RUNTIME_SUPPORT=yes
|
||||
USE_MACOSX_RUNTIME_SUPPORT=yes
|
||||
AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
|
||||
else
|
||||
AC_MSG_RESULT([yes, but explicitly disabled.])
|
||||
fi
|
||||
AC_MSG_RESULT([/System/Library/Frameworks/JavaVM.framework])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
|
||||
AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
|
||||
X11_NOT_NEEDED=
|
||||
FREETYPE2_NOT_NEEDED=
|
||||
AC_MSG_RESULT([alsa pulse])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
@ -153,16 +136,6 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
|
||||
fi
|
||||
|
||||
# Some of the old makefiles require a setting of OPENWIN_HOME
|
||||
# Since the X11R6 directory has disappeared on later Linuxes,
|
||||
# we need to probe for it.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test -d "$SYS_ROOT/usr/X11R6"; then
|
||||
OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
|
||||
elif test -d "$SYS_ROOT/usr/include/X11"; then
|
||||
OPENWIN_HOME="$SYS_ROOT/usr"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
OPENWIN_HOME="/usr/openwin"
|
||||
fi
|
||||
@ -277,151 +250,279 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
[
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$2"
|
||||
METHOD="$3"
|
||||
|
||||
# First check if the files exists.
|
||||
if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
|
||||
# We found an arbitrary include file. That's a good sign.
|
||||
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
|
||||
FOUND_FREETYPE=yes
|
||||
|
||||
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
|
||||
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
|
||||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# On Windows, we will need both .lib and .dll file.
|
||||
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
|
||||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
|
||||
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
|
||||
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
|
||||
|
||||
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
|
||||
AC_MSG_CHECKING([for freetype includes])
|
||||
AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
|
||||
FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
|
||||
AC_MSG_CHECKING([for freetype libraries])
|
||||
AC_MSG_RESULT([$FREETYPE_LIB_PATH])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# The ubiquitous freetype2 library is used to render fonts.
|
||||
# The ubiquitous freetype library is used to render fonts.
|
||||
#
|
||||
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
|
||||
[specify prefix directory for the freetype2 package
|
||||
[specify prefix directory for the freetype package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
|
||||
[specify directory for the freetype include files])])
|
||||
AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
|
||||
[specify directory for the freetype library])])
|
||||
AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
|
||||
[disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
|
||||
|
||||
# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
|
||||
USING_SYSTEM_FT_LIB=false
|
||||
FREETYPE_CFLAGS=
|
||||
FREETYPE_LIBS=
|
||||
FREETYPE_BUNDLE_LIB_PATH=
|
||||
|
||||
if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
|
||||
if test "x$FREETYPE_NOT_NEEDED" = xyes; then
|
||||
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
|
||||
AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
|
||||
fi
|
||||
FREETYPE2_CFLAGS=
|
||||
FREETYPE2_LIBS=
|
||||
FREETYPE2_LIB_PATH=
|
||||
if test "x$enable_freetype_bundling" != x; then
|
||||
AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
|
||||
fi
|
||||
else
|
||||
FREETYPE2_FOUND=no
|
||||
# freetype is needed to build; go get it!
|
||||
|
||||
if test "x$with_freetype" != x; then
|
||||
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"
|
||||
BUNDLE_FREETYPE="$enable_freetype_bundling"
|
||||
|
||||
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
|
||||
# User has specified settings
|
||||
|
||||
if test "x$BUNDLE_FREETYPE" = x; then
|
||||
# If not specified, default is to bundle freetype
|
||||
BUNDLE_FREETYPE=yes
|
||||
fi
|
||||
|
||||
if test "x$with_freetype" != x; then
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
|
||||
fi
|
||||
|
||||
# Allow --with-freetype-lib and --with-freetype-include to override
|
||||
if test "x$with_freetype_include" != x; then
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
|
||||
fi
|
||||
if test "x$with_freetype_lib" != x; then
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
|
||||
fi
|
||||
|
||||
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
|
||||
# Okay, we got it. Check that it works.
|
||||
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
|
||||
fi
|
||||
else
|
||||
# User specified only one of lib or include. This is an error.
|
||||
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
|
||||
AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
|
||||
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
|
||||
else
|
||||
AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
|
||||
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# User did not specify settings, but we need freetype. Try to locate it.
|
||||
|
||||
if test "x$BUNDLE_FREETYPE" = x; then
|
||||
# If not specified, default is to bundle freetype only on windows
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
BUNDLE_FREETYPE=yes
|
||||
else
|
||||
BUNDLE_FREETYPE=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
# Check builddeps
|
||||
BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
|
||||
# BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
if test "x$BUNDLE_FREETYPE" = xyes; then
|
||||
AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that])
|
||||
FOUND_FREETYPE=no
|
||||
else
|
||||
AC_MSG_CHECKING([for freetype])
|
||||
AC_MSG_RESULT([yes (using builddeps)])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
# Check modules using pkg-config, but only if we have it (ugly output results otherwise)
|
||||
if test "x$PKG_CONFIG" != x; then
|
||||
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
|
||||
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
|
||||
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
|
||||
fi
|
||||
# BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
|
||||
if test "x$BUNDLE_FREETYPE" = xyes; then
|
||||
AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
|
||||
FOUND_FREETYPE=no
|
||||
else
|
||||
AC_MSG_CHECKING([for freetype])
|
||||
AC_MSG_RESULT([yes (using pkg-config)])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
# Check in well-known locations
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
else
|
||||
if test "x$SYS_ROOT" = "x/"; then
|
||||
FREETYPE_ROOT=
|
||||
else
|
||||
FREETYPE_ROOT="$SYS_ROOT"
|
||||
fi
|
||||
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi # end check in well-known locations
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype])
|
||||
AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
|
||||
fi
|
||||
fi # end user specified settings
|
||||
|
||||
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
|
||||
if test "x$FREETYPE_CFLAGS" = x; then
|
||||
BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
|
||||
if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
|
||||
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
|
||||
else
|
||||
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FREETYPE_LIBS" = x; then
|
||||
BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
|
||||
FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
|
||||
else
|
||||
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
|
||||
fi
|
||||
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
|
||||
if test "x$FREETYPE2_FOUND" = xyes; then
|
||||
# Verify that the directories exist
|
||||
if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
|
||||
AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
|
||||
fi
|
||||
# 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.so nor freetype.dll in $with_freetype/lib])
|
||||
fi
|
||||
# Check one h-file
|
||||
if ! test -s "$with_freetype/include/ft2build.h"; then
|
||||
AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
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])
|
||||
|
||||
if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
|
||||
DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
|
||||
DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
|
||||
fi
|
||||
if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
|
||||
DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
|
||||
DEFAULT_FREETYPE_LIBS="-lfreetype"
|
||||
fi
|
||||
|
||||
PREV_CXXCFLAGS="$CXXFLAGS"
|
||||
PREV_LDFLAGS="$LDFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
#include<ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
int main() { return 0; }
|
||||
]])],
|
||||
[
|
||||
# Yes, the default cflags and libs did the trick.
|
||||
FREETYPE2_FOUND=yes
|
||||
FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
|
||||
FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
|
||||
],
|
||||
[
|
||||
FREETYPE2_FOUND=no
|
||||
]
|
||||
)
|
||||
CXXCFLAGS="$PREV_CXXFLAGS"
|
||||
LDFLAGS="$PREV_LDFLAGS"
|
||||
AC_MSG_RESULT([$FREETYPE2_FOUND])
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype2])
|
||||
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
|
||||
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,
|
||||
FREETYPE2_FOUND=true,
|
||||
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
|
||||
LDFLAGS="$PREV_LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
# Try to compile it
|
||||
AC_MSG_CHECKING([if we can compile and link with freetype])
|
||||
AC_LANG_PUSH(C++)
|
||||
PREV_CXXCFLAGS="$CXXFLAGS"
|
||||
PREV_LDFLAGS="$LDFLAGS"
|
||||
PREV_CXX="$CXX"
|
||||
CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
|
||||
CXX="$FIXPATH $CXX"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
#include<ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
int main () {
|
||||
FT_Init_FreeType(NULL);
|
||||
return 0;
|
||||
}
|
||||
]])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
|
||||
AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
|
||||
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype])
|
||||
|
||||
AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
|
||||
]
|
||||
)
|
||||
CXXCFLAGS="$PREV_CXXFLAGS"
|
||||
LDFLAGS="$PREV_LDFLAGS"
|
||||
CXX="$PREV_CXX"
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
AC_SUBST(USING_SYSTEM_FT_LIB)
|
||||
AC_SUBST(FREETYPE2_LIB_PATH)
|
||||
AC_SUBST(FREETYPE2_CFLAGS)
|
||||
AC_SUBST(FREETYPE2_LIBS)
|
||||
AC_MSG_CHECKING([if we should bundle freetype])
|
||||
if test "x$BUNDLE_FREETYPE" = xyes; then
|
||||
FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
|
||||
fi
|
||||
AC_MSG_RESULT([$BUNDLE_FREETYPE])
|
||||
|
||||
fi # end freetype needed
|
||||
|
||||
AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
||||
AC_SUBST(FREETYPE_LIBS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
|
@ -268,13 +268,9 @@ SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
|
||||
# Number of parallel jobs to use for compilation
|
||||
JOBS?=@JOBS@
|
||||
|
||||
# The OpenJDK makefiles should be changed to using the standard
|
||||
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
|
||||
# extract the information here.
|
||||
FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
|
||||
FREETYPE2_LIBS:=@FREETYPE2_LIBS@
|
||||
FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
|
||||
USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
|
||||
FREETYPE_LIBS:=@FREETYPE_LIBS@
|
||||
FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
|
||||
FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
|
||||
CUPS_CFLAGS:=@CUPS_CFLAGS@
|
||||
ALSA_LIBS:=@ALSA_LIBS@
|
||||
ALSA_CFLAGS:=@ALSA_CFLAGS@
|
||||
@ -485,6 +481,7 @@ CUT:=@CUT@
|
||||
DATE:=@DATE@
|
||||
DIFF:=@DIFF@
|
||||
DIRNAME:=@DIRNAME@
|
||||
DSYMUTIL:=@DSYMUTIL@
|
||||
FIND:=@FIND@
|
||||
FIND_DELETE:=@FIND_DELETE@
|
||||
ECHO:=@ECHO@
|
||||
|
@ -176,6 +176,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
TOOLCHAIN_SETUP_MSVCR_DLL
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||
|
@ -228,52 +228,113 @@ 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_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
|
||||
[
|
||||
POSSIBLE_MSVCR_DLL="$1"
|
||||
METHOD="$2"
|
||||
if test -e "$POSSIBLE_MSVCR_DLL"; then
|
||||
AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
|
||||
|
||||
# Need to check if the found msvcr is correct architecture
|
||||
AC_MSG_CHECKING([found msvcr100.dll architecture])
|
||||
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
else
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
fi
|
||||
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
|
||||
AC_MSG_RESULT([ok])
|
||||
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_MSG_RESULT([$MSVCR_DLL])
|
||||
else
|
||||
AC_MSG_RESULT([incorrect, ignoring])
|
||||
AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
|
||||
[
|
||||
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
|
||||
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_msvcr_dll" != x; then
|
||||
MSVCR_DLL="$with_msvcr_dll"
|
||||
else
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
|
||||
else
|
||||
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR_DLL" != x; then
|
||||
AC_MSG_NOTICE([msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR])
|
||||
else
|
||||
AC_MSG_NOTICE([Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR])
|
||||
fi
|
||||
fi
|
||||
# Try some fallback alternatives
|
||||
# If given explicitely by user, do not probe. If not present, fail directly.
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# If visual studio express is installed, there is usually one with the debugger
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
|
||||
AC_MSG_NOTICE([msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS..])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
# Fallback for 32bit builds, look in the windows directory.
|
||||
if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
|
||||
AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32])
|
||||
MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find msvcr100.dll !])
|
||||
# Probe: Using well-known location from Visual Studio 10.0
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
|
||||
else
|
||||
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in VCINSTALLDIR])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$MSVCR_DLL])
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: Check in the Boot JDK directory.
|
||||
POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
|
||||
fi
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: Look in the Windows system32 directory
|
||||
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
||||
POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in SYSTEMROOT])
|
||||
fi
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: If Visual Studio Express is installed, there is usually one with the debugger
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
|
||||
else
|
||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
|
||||
# (This was the original behaviour; kept since it might turn up something)
|
||||
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
|
||||
else
|
||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
|
||||
if test "x$POSSIBLE_MSVCR_DLL" = x; then
|
||||
# We're grasping at straws now...
|
||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
|
||||
fi
|
||||
fi
|
||||
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find msvcr100.dll. Please specify using --with-msvcr-dll.])
|
||||
fi
|
||||
|
||||
BASIC_FIXUP_PATH(MSVCR_DLL)
|
||||
])
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2013, 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
|
||||
@ -27,37 +27,11 @@
|
||||
command="$1"
|
||||
pull_extra_base="$2"
|
||||
|
||||
# Python always buffers stdout significantly, thus we will not see any output from hg clone jdk,
|
||||
# until a lot of time has passed! By passing -u to python, we get incremental updates
|
||||
# on stdout. Much nicer.
|
||||
whichhg="`which hg 2> /dev/null | grep -v '^no hg in'`"
|
||||
|
||||
if [ "${whichhg}" = "" ] ; then
|
||||
echo Cannot find hg!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "" = "$command" ] ; then
|
||||
echo No command to hg supplied!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
has_hash_bang="`head -n 1 "${whichhg}" | cut -b 1-2`"
|
||||
python=""
|
||||
bpython=""
|
||||
|
||||
if [ "#!" = "$has_hash_bang" ] ; then
|
||||
python="`head -n 1 ${whichhg} | cut -b 3- | sed -e 's/^[ \t]*//;s/[ \t]*$//'`"
|
||||
bpython="`basename "$python"`"
|
||||
fi
|
||||
|
||||
if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d ' '`" = "Python" ] ; then
|
||||
hg="${python} -u ${whichhg}"
|
||||
else
|
||||
echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
|
||||
hg="hg"
|
||||
fi
|
||||
|
||||
# Clean out the temporary directory that stores the pid files.
|
||||
tmp=/tmp/forest.$$
|
||||
rm -f -r ${tmp}
|
||||
@ -171,7 +145,7 @@ for i in ${repos} ${repos_extra} ; do
|
||||
(
|
||||
if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
|
||||
pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
|
||||
echo ${hg} clone ${pull_newrepo} ${i}
|
||||
echo hg clone ${pull_newrepo} ${i}
|
||||
path="`dirname ${i}`"
|
||||
if [ "${path}" != "." ] ; then
|
||||
times=0
|
||||
@ -184,10 +158,10 @@ for i in ${repos} ${repos_extra} ; do
|
||||
sleep 5
|
||||
done
|
||||
fi
|
||||
(${hg} clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
|
||||
(PYTHONUNBUFFERED=true hg clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
|
||||
else
|
||||
echo "cd ${i} && ${hg} $*"
|
||||
cd ${i} && (${hg} "$@"; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
|
||||
echo "cd ${i} && hg $*"
|
||||
cd ${i} && (PYTHONUNBUFFERED=true hg "$@"; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
|
||||
fi
|
||||
echo $! > ${tmp}/${repopidfile}.pid
|
||||
) 2>&1 | sed -e "s@^@${reponame}: @") &
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@ -266,8 +266,12 @@ define SetupZipArchive
|
||||
endif
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_ALL_SRCS := $$(call not-containing,_the., \
|
||||
$$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
|
||||
$1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
|
||||
|
||||
# Filter on suffixes if set
|
||||
ifneq ($$($1_SUFFIXES),)
|
||||
$1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
|
||||
endif
|
||||
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
ifneq ($$($1_SUFFIXES),)
|
||||
@ -371,8 +375,8 @@ define SetupJavaCompilation
|
||||
# INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
|
||||
# EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
|
||||
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
|
||||
# JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=Don't use this. This forces an explicit -sourcepath to javac.
|
||||
# Its only here until we cleanup some nasty source code pasta in the jdk.
|
||||
# JAVAC_SOURCE_PATH_OVERRIDE:=This forces an explicit -sourcepath to javac instead of the complete
|
||||
# source roots from SRC. This is sometimes needed when compiling specific subsets of the source.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependecy
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
@ -474,8 +478,8 @@ define SetupJavaCompilation
|
||||
endif
|
||||
|
||||
# Prep the source paths.
|
||||
ifneq ($$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE),)
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE)))
|
||||
ifneq ($$($1_JAVAC_SOURCE_PATH_OVERRIDE),)
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_OVERRIDE)))
|
||||
else
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@ -435,31 +435,36 @@ define SetupNativeCompilation
|
||||
$(CP) $$< $$@
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif # Touch to not retrigger rule on rebuild
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif # Touch to not retrigger rule on rebuild
|
||||
$(TOUCH) $$@
|
||||
endif # !windows
|
||||
endif # !macosx
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), true)
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
|
||||
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@ -472,11 +477,12 @@ define SetupNativeCompilation
|
||||
$(CD) $$($1_OBJECT_DIR) \
|
||||
&& $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
|
||||
endif
|
||||
endif # no MacOS X support yet
|
||||
else
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
|
||||
$$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
|
||||
else
|
||||
else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
|
||||
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
|
||||
endif
|
||||
endif
|
||||
@ -513,31 +519,36 @@ define SetupNativeCompilation
|
||||
$(CP) $$< $$@
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif
|
||||
$(TOUCH) $$@
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif
|
||||
$(TOUCH) $$@
|
||||
endif # !windows
|
||||
endif # !macosx
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), true)
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@ -550,11 +561,12 @@ define SetupNativeCompilation
|
||||
$(CD) $$($1_OBJECT_DIR) \
|
||||
&& $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
|
||||
endif
|
||||
endif # no MacOS X support yet
|
||||
else
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
|
||||
$$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
|
||||
else
|
||||
else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
|
||||
endif
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@ -38,7 +38,7 @@ define SetupRMICompilation
|
||||
$(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)/_the.$1_rmic.generated
|
||||
|
||||
$1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
|
||||
$1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
|
||||
@ -60,11 +60,11 @@ define SetupRMICompilation
|
||||
|
||||
ifneq (,$$($1_RUN_IIOP))
|
||||
$1_TARGETS += $$($1_TIE_FILES)
|
||||
$1_ARGS += -iiop
|
||||
$1_ARGS += -iiop -emitPermissionCheck
|
||||
endif
|
||||
ifneq (,$$($1_RUN_IIOP_STDPKG))
|
||||
$1_TARGETS += $$($1_TIE_STDPKG_FILES)
|
||||
$1_ARGS2 := -iiop -standardPackage
|
||||
$1_ARGS2 := -iiop -emitPermissionCheck -standardPackage
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_KEEP_GENERATED))
|
||||
@ -88,10 +88,9 @@ define SetupRMICompilation
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
fi;
|
||||
$(TOUCH) $$@
|
||||
|
||||
|
||||
$1 := $$($1_TARGETS)
|
||||
$1 := $$($1_TARGETS) $$($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
|
||||
|
@ -36,9 +36,7 @@ jprt.build.flavors=product,fastdebug
|
||||
|
||||
# Standard list of jprt build targets for this source tree
|
||||
jprt.build.targets= \
|
||||
solaris_sparc_5.10-{product|fastdebug}, \
|
||||
solaris_sparcv9_5.10-{product|fastdebug}, \
|
||||
solaris_i586_5.10-{product|fastdebug}, \
|
||||
solaris_x64_5.10-{product|fastdebug}, \
|
||||
linux_i586_2.6-{product|fastdebug}, \
|
||||
linux_x64_2.6-{product|fastdebug}, \
|
||||
@ -51,9 +49,7 @@ jprt.my.test.set=${jprt.test.set}
|
||||
|
||||
# Test target list (no fastdebug & limited c2 testing)
|
||||
jprt.my.test.target.set= \
|
||||
solaris_sparc_5.10-product-c1-TESTNAME, \
|
||||
solaris_sparcv9_5.10-product-c2-TESTNAME, \
|
||||
solaris_i586_5.10-product-c1-TESTNAME, \
|
||||
solaris_x64_5.10-product-c2-TESTNAME, \
|
||||
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
|
||||
linux_x64_2.6-product-c2-TESTNAME, \
|
||||
@ -114,9 +110,7 @@ jprt.make.rule.all.test.targets= \
|
||||
|
||||
# JCK test targets in test/Makefile (no windows)
|
||||
jprt.my.jck.test.target.set= \
|
||||
solaris_sparc_5.10-product-c1-JCK7TESTRULE, \
|
||||
solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, \
|
||||
solaris_i586_5.10-product-c1-JCK7TESTRULE, \
|
||||
solaris_x64_5.10-product-c2-JCK7TESTRULE, \
|
||||
linux_i586_2.6-product-c1-JCK7TESTRULE, \
|
||||
linux_x64_2.6-product-c2-JCK7TESTRULE
|
||||
|
@ -27,7 +27,7 @@
|
||||
# Documentation is available via 'webrev -h'.
|
||||
#
|
||||
|
||||
WEBREV_UPDATED=24.1-hg+openjdk.java.net
|
||||
WEBREV_UPDATED=25.0-hg+openjdk.java.net
|
||||
|
||||
HTML='<?xml version="1.0"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
@ -39,7 +39,8 @@ FRAMEHTML='<?xml version="1.0"?>
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n'
|
||||
|
||||
STDHEAD='<meta http-equiv="cache-control" content="no-cache" />
|
||||
STDHEAD='<meta charset="utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="-1" />
|
||||
<!--
|
||||
@ -136,7 +137,19 @@ span.new {
|
||||
#
|
||||
html_quote()
|
||||
{
|
||||
sed -e "s/&/\&/g" -e "s/</\</g" -e "s/>/\>/g" "$@" | expand
|
||||
sed -e "s/&/\&/g" -e "s/&#\([x]*[0-9A-Fa-f]\{2,5\}\);/\&#\1;/g" -e "s/</\</g" -e "s/>/\>/g" "$@" | expand
|
||||
}
|
||||
|
||||
#
|
||||
# input_cmd | html_quote | output_cmd
|
||||
# or
|
||||
# html_dequote filename | output_cmd
|
||||
#
|
||||
# Replace HTML entities with literals
|
||||
#
|
||||
html_dequote()
|
||||
{
|
||||
sed -e "s/"/\"/g" -e "s/'/\'/g" -e "s/&/\&/g" -e "s/</<'/g" -e "s/>/>/g" "$@" | expand
|
||||
}
|
||||
|
||||
#
|
||||
@ -149,23 +162,6 @@ bug2url()
|
||||
sed -e 's|[0-9]\{5,\}|<a href=\"'$BUGURL$IDPREFIX'&\">&</a>|g'
|
||||
}
|
||||
|
||||
#
|
||||
# input_cmd | sac2url | output_cmd
|
||||
#
|
||||
# Scan for ARC cases and insert <a> links to the relevent SAC database.
|
||||
# This is slightly complicated because inside the SWAN, SAC cases are
|
||||
# grouped by ARC: PSARC/2006/123. But on OpenSolaris.org, they are
|
||||
# referenced as 2006/123 (without labelling the ARC).
|
||||
#
|
||||
sac2url()
|
||||
{
|
||||
if [[ -z $Oflag ]]; then
|
||||
sed -e 's|\([A-Z]\{1,2\}ARC\)[ /]\([0-9]\{4\}\)/\([0-9]\{3\}\)|<a href=\"'$SACURL'\1/\2/\3\">\1 \2/\3</a>|g'
|
||||
else
|
||||
sed -e 's|\([A-Z]\{1,2\}ARC\)[ /]\([0-9]\{4\}\)/\([0-9]\{3\}\)|<a href=\"'$SACURL'/\2/\3\">\1 \2/\3</a>|g'
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# strip_unchanged <infile> | output_cmd
|
||||
#
|
||||
@ -1055,79 +1051,6 @@ source_to_html()
|
||||
print "</pre></body></html>"
|
||||
}
|
||||
|
||||
#
|
||||
# teamwarecomments {text|html} parent-file child-file
|
||||
#
|
||||
# Find the first delta in the child that's not in the parent. Get the
|
||||
# newest delta from the parent, get all deltas from the child starting
|
||||
# with that delta, and then get all info starting with the second oldest
|
||||
# delta in that list (the first delta unique to the child).
|
||||
#
|
||||
# This code adapted from Bill Shannon's "spc" script
|
||||
#
|
||||
comments_from_teamware()
|
||||
{
|
||||
fmt=$1
|
||||
pfile=$PWS/$2
|
||||
cfile=$CWS/$3
|
||||
|
||||
psid=$($SCCS prs -d:I: $pfile 2>/dev/null)
|
||||
if [[ -z "$psid" ]]; then
|
||||
psid=1.1
|
||||
fi
|
||||
|
||||
set -A sids $($SCCS prs -l -r$psid -d:I: $cfile 2>/dev/null)
|
||||
N=${#sids[@]}
|
||||
|
||||
nawkprg='
|
||||
/^COMMENTS:/ {p=1; next}
|
||||
/^D [0-9]+\.[0-9]+/ {printf "--- %s ---\n", $2; p=0; }
|
||||
NF == 0u { next }
|
||||
{if (p==0) next; print $0 }'
|
||||
|
||||
if [[ $N -ge 2 ]]; then
|
||||
sid1=${sids[$((N-2))]} # Gets 2nd to last sid
|
||||
|
||||
if [[ $fmt == "text" ]]; then
|
||||
$SCCS prs -l -r$sid1 $cfile 2>/dev/null | \
|
||||
$AWK "$nawkprg"
|
||||
return
|
||||
fi
|
||||
|
||||
$SCCS prs -l -r$sid1 $cfile 2>/dev/null | \
|
||||
html_quote | bug2url | sac2url | $AWK "$nawkprg"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# wxcomments {text|html} filepath
|
||||
#
|
||||
# Given the pathname of a file, find its location in a "wx" active file
|
||||
# list and print the following sccs comment. Output is either text or
|
||||
# HTML; if the latter, embedded bugids (sequence of 5 or more digits) are
|
||||
# turned into URLs.
|
||||
#
|
||||
comments_from_wx()
|
||||
{
|
||||
typeset fmt=$1
|
||||
typeset p=$2
|
||||
|
||||
comm=`$AWK '
|
||||
$1 == "'$p'" {
|
||||
do getline ; while (NF > 0)
|
||||
getline
|
||||
while (NF > 0) { print ; getline }
|
||||
exit
|
||||
}' < $wxfile`
|
||||
|
||||
if [[ $fmt == "text" ]]; then
|
||||
print "$comm"
|
||||
return
|
||||
fi
|
||||
|
||||
print "$comm" | html_quote | bug2url | sac2url
|
||||
}
|
||||
|
||||
comments_from_mercurial()
|
||||
{
|
||||
fmt=$1
|
||||
@ -1161,7 +1084,7 @@ comments_from_mercurial()
|
||||
return
|
||||
fi
|
||||
|
||||
print "$comm" | html_quote | bug2url | sac2url
|
||||
print "$comm" | html_quote | bug2url
|
||||
)
|
||||
fi
|
||||
}
|
||||
@ -1178,15 +1101,7 @@ getcomments()
|
||||
typeset p=$2
|
||||
typeset pp=$3
|
||||
|
||||
if [[ -n $wxfile ]]; then
|
||||
comments_from_wx $fmt $p
|
||||
else
|
||||
if [[ $SCM_MODE == "teamware" ]]; then
|
||||
comments_from_teamware $fmt $pp $p
|
||||
elif [[ $SCM_MODE == "mercurial" ]]; then
|
||||
comments_from_mercurial $fmt $pp $p
|
||||
fi
|
||||
fi
|
||||
comments_from_mercurial $fmt $pp $p
|
||||
}
|
||||
|
||||
#
|
||||
@ -1333,74 +1248,6 @@ function difflines
|
||||
print "</span>"
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# flist_from_wx
|
||||
#
|
||||
# Sets up webrev to source its information from a wx-formatted file.
|
||||
# Sets the global 'wxfile' variable.
|
||||
#
|
||||
function flist_from_wx
|
||||
{
|
||||
typeset argfile=$1
|
||||
if [[ -n ${argfile%%/*} ]]; then
|
||||
#
|
||||
# If the wx file pathname is relative then make it absolute
|
||||
# because the webrev does a "cd" later on.
|
||||
#
|
||||
wxfile=$PWD/$argfile
|
||||
else
|
||||
wxfile=$argfile
|
||||
fi
|
||||
|
||||
$AWK '{ c = 1; print;
|
||||
while (getline) {
|
||||
if (NF == 0) { c = -c; continue }
|
||||
if (c > 0) print
|
||||
}
|
||||
}' $wxfile > $FLIST
|
||||
|
||||
print " Done."
|
||||
}
|
||||
|
||||
#
|
||||
# flist_from_teamware [ <args-to-putback-n> ]
|
||||
#
|
||||
# Generate the file list by extracting file names from a putback -n. Some
|
||||
# names may come from the "update/create" messages and others from the
|
||||
# "currently checked out" warning. Renames are detected here too. Extract
|
||||
# values for CODEMGR_WS and CODEMGR_PARENT from the output of the putback
|
||||
# -n as well, but remove them if they are already defined.
|
||||
#
|
||||
function flist_from_teamware
|
||||
{
|
||||
if [[ -n $codemgr_parent ]]; then
|
||||
if [[ ! -d $codemgr_parent/Codemgr_wsdata ]]; then
|
||||
print -u2 "parent $codemgr_parent doesn't look like a" \
|
||||
"valid teamware workspace"
|
||||
exit 1
|
||||
fi
|
||||
parent_args="-p $codemgr_parent"
|
||||
fi
|
||||
|
||||
print " File list from: 'putback -n $parent_args $*' ... \c"
|
||||
|
||||
putback -n $parent_args $* 2>&1 |
|
||||
$AWK '
|
||||
/^update:|^create:/ {print $2}
|
||||
/^Parent workspace:/ {printf("CODEMGR_PARENT=%s\n",$3)}
|
||||
/^Child workspace:/ {printf("CODEMGR_WS=%s\n",$3)}
|
||||
/^The following files are currently checked out/ {p = 1; next}
|
||||
NF == 0 {p=0 ; next}
|
||||
/^rename/ {old=$3}
|
||||
$1 == "to:" {print $2, old}
|
||||
/^"/ {next}
|
||||
p == 1 {print $1}' |
|
||||
sort -r -k 1,1 -u | sort > $FLIST
|
||||
|
||||
print " Done."
|
||||
}
|
||||
|
||||
function outgoing_from_mercurial_forest
|
||||
{
|
||||
hg foutgoing --template 'rev: {rev}\n' $OUTPWS | $FILTER | $AWK '
|
||||
@ -1710,47 +1557,13 @@ function env_from_flist
|
||||
#
|
||||
function detect_scm
|
||||
{
|
||||
#
|
||||
# If CODEMGR_WS is specified in the flist file, we assume teamware.
|
||||
#
|
||||
if [[ -r $FLIST ]]; then
|
||||
egrep '^CODEMGR_WS=' $FLIST > /dev/null 2>&1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
print "teamware"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# The presence of $CODEMGR_WS and a Codemgr_wsdata directory
|
||||
# is our clue that this is a teamware workspace.
|
||||
# Same if true if current directory has a Codemgr_wsdata sub-dir
|
||||
#
|
||||
if [[ -z "$CODEMGR_WS" ]]; then
|
||||
CODEMGR_WS=`workspace name 2>/dev/null`
|
||||
fi
|
||||
|
||||
if [[ -n $CODEMGR_WS && -d "$CODEMGR_WS/Codemgr_wsdata" ]]; then
|
||||
print "teamware"
|
||||
elif [[ -d $PWD/Codemgr_wsdata ]]; then
|
||||
print "teamware"
|
||||
elif hg root >/dev/null ; then
|
||||
if hg root >/dev/null ; then
|
||||
print "mercurial"
|
||||
else
|
||||
print "unknown"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Extract the parent workspace from the Codemgr_wsdata/parent file
|
||||
#
|
||||
function parent_from_teamware
|
||||
{
|
||||
if [[ -f "$1/Codemgr_wsdata/parent" ]]; then
|
||||
tail -1 "$1/Codemgr_wsdata/parent"
|
||||
fi
|
||||
}
|
||||
|
||||
function look_for_prog
|
||||
{
|
||||
typeset path
|
||||
@ -1777,48 +1590,6 @@ function look_for_prog
|
||||
fi
|
||||
}
|
||||
|
||||
function build_old_new_teamware
|
||||
{
|
||||
# If the child's version doesn't exist then
|
||||
# get a readonly copy.
|
||||
|
||||
if [[ ! -f $F && -f SCCS/s.$F ]]; then
|
||||
$SCCS get -s $F
|
||||
fi
|
||||
|
||||
#
|
||||
# Snag new version of file.
|
||||
#
|
||||
rm -f $newdir/$DIR/$F
|
||||
cp $F $newdir/$DIR/$F
|
||||
|
||||
#
|
||||
# Get the parent's version of the file. First see whether the
|
||||
# child's version is checked out and get the parent's version
|
||||
# with keywords expanded or unexpanded as appropriate.
|
||||
#
|
||||
if [ -f $PWS/$PDIR/SCCS/s.$PF -o \
|
||||
-f $PWS/$PDIR/SCCS/p.$PF ]; then
|
||||
rm -f $olddir/$PDIR/$PF
|
||||
if [ -f SCCS/p.$F ]; then
|
||||
$SCCS get -s -p -k $PWS/$PDIR/$PF \
|
||||
> $olddir/$PDIR/$PF
|
||||
else
|
||||
$SCCS get -s -p $PWS/$PDIR/$PF \
|
||||
> $olddir/$PDIR/$PF
|
||||
fi
|
||||
else
|
||||
if [[ -f $PWS/$PDIR/$PF ]]; then
|
||||
# Parent is not a real workspace, but just a raw
|
||||
# directory tree - use the file that's there as
|
||||
# the old file.
|
||||
|
||||
rm -f $olddir/$DIR/$F
|
||||
cp $PWS/$PDIR/$PF $olddir/$DIR/$F
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Find the parent for $1
|
||||
#
|
||||
@ -1938,10 +1709,6 @@ function build_old_new_mercurial
|
||||
|
||||
function build_old_new
|
||||
{
|
||||
if [[ $SCM_MODE == "teamware" ]]; then
|
||||
build_old_new_teamware $@
|
||||
fi
|
||||
|
||||
if [[ $SCM_MODE == "mercurial" ]]; then
|
||||
build_old_new_mercurial $@
|
||||
fi
|
||||
@ -1953,37 +1720,31 @@ function build_old_new
|
||||
#
|
||||
function usage
|
||||
{
|
||||
print "Usage:\twebrev [common-options]
|
||||
webrev [common-options] ( <file> | - )
|
||||
webrev [common-options] -w <wx file>
|
||||
webrev [common-options] -l [arguments to 'putback']
|
||||
print "Usage:\twebrev [options]
|
||||
webrev [options] ( <file> | - )
|
||||
|
||||
Options:
|
||||
-v: Print the version of this tool.
|
||||
-b: Do not ignore changes in the amount of white space.
|
||||
-c <CR#>: Include link to CR (aka bugid) in the main page.
|
||||
-O: Print bugids/arc cases suitable for OpenJDK.
|
||||
-i <filename>: Include <filename> in the index.html file.
|
||||
-o <outdir>: Output webrev to specified directory.
|
||||
-p <compare-against>: Use specified parent wkspc or basis for comparison
|
||||
-w <wxfile>: Use specified wx active file.
|
||||
-u <username>: Use that username instead of 'guessing' one.
|
||||
-m: Forces the use of Mercurial
|
||||
-t: Forces the use of Teamware
|
||||
|
||||
Mercurial only options:
|
||||
-r rev: Compare against a specified revision
|
||||
-N: Skip 'hg outgoing', use only 'hg status'
|
||||
-f: Use the forest extension
|
||||
|
||||
Arguments:
|
||||
<file>: Optional file containing list of files to include in webrev
|
||||
-: read list of files to include in webrev from standard input
|
||||
|
||||
Environment:
|
||||
WDIR: Control the output directory.
|
||||
WEBREV_BUGURL: Control the URL prefix for bugids.
|
||||
WEBREV_SACURL: Control the URL prefix for ARC cases.
|
||||
|
||||
SCM Environment:
|
||||
Teamware: CODEMGR_WS: Workspace location.
|
||||
Teamware: CODEMGR_PARENT: Parent workspace location.
|
||||
|
||||
"
|
||||
|
||||
@ -2003,7 +1764,6 @@ trap "rm -f /tmp/$$.* ; exit" 0 1 2 3 15
|
||||
set +o noclobber
|
||||
|
||||
[[ -z $WDIFF ]] && WDIFF=`look_for_prog wdiff`
|
||||
[[ -z $WX ]] && WX=`look_for_prog wx`
|
||||
[[ -z $CODEREVIEW ]] && CODEREVIEW=`look_for_prog codereview`
|
||||
[[ -z $PS2PDF ]] && PS2PDF=`look_for_prog ps2pdf`
|
||||
[[ -z $PERL ]] && PERL=`look_for_prog perl`
|
||||
@ -2011,7 +1771,6 @@ set +o noclobber
|
||||
[[ -z $AWK ]] && AWK=`look_for_prog nawk`
|
||||
[[ -z $AWK ]] && AWK=`look_for_prog gawk`
|
||||
[[ -z $AWK ]] && AWK=`look_for_prog awk`
|
||||
[[ -z $WSPACE ]] && WSPACE=`look_for_prog workspace`
|
||||
[[ -z $JAR ]] && JAR=`look_for_prog jar`
|
||||
[[ -z $ZIP ]] && ZIP=`look_for_prog zip`
|
||||
[[ -z $GETENT ]] && GETENT=`look_for_prog getent`
|
||||
@ -2033,8 +1792,6 @@ fi
|
||||
|
||||
#
|
||||
# These aren't fatal, but we want to note them to the user.
|
||||
# We don't warn on the absence of 'wx' until later when we've
|
||||
# determined that we actually need to try to invoke it.
|
||||
#
|
||||
# [[ ! -x $CODEREVIEW ]] && print -u2 "WARNING: codereview(1) not found."
|
||||
# [[ ! -x $PS2PDF ]] && print -u2 "WARNING: ps2pdf(1) not found."
|
||||
@ -2050,13 +1807,11 @@ iflag=
|
||||
oflag=
|
||||
pflag=
|
||||
uflag=
|
||||
lflag=
|
||||
wflag=
|
||||
Oflag=
|
||||
rflag=
|
||||
Nflag=
|
||||
forestflag=
|
||||
while getopts "c:i:o:p:r:u:lmtwONvfb" opt
|
||||
while getopts "c:i:o:p:r:u:mONvfb" opt
|
||||
do
|
||||
case $opt in
|
||||
b) bflag=1;;
|
||||
@ -2081,19 +1836,7 @@ do
|
||||
|
||||
m) SCM_MODE="mercurial";;
|
||||
|
||||
t) SCM_MODE="teamware";;
|
||||
|
||||
#
|
||||
# If -l has been specified, we need to abort further options
|
||||
# processing, because subsequent arguments are going to be
|
||||
# arguments to 'putback -n'.
|
||||
#
|
||||
l) lflag=1
|
||||
break;;
|
||||
|
||||
w) wflag=1;;
|
||||
|
||||
O) Oflag=1;;
|
||||
O) Oflag=1;; # ignored (bugs are now all visible at bugs.openjdk.java.net)
|
||||
|
||||
N) Nflag=1;;
|
||||
|
||||
@ -2112,10 +1855,6 @@ done
|
||||
FLIST=/tmp/$$.flist
|
||||
HG_LIST_FROM_COMMIT=
|
||||
|
||||
if [[ -n $wflag && -n $lflag ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [[ -n $forestflag && -n $rflag ]]; then
|
||||
print "The -r <rev> flag is incompatible with the use of forests"
|
||||
exit 2
|
||||
@ -2130,27 +1869,25 @@ if [[ -n $pflag && -d $codemgr_parent/raw_files/new ]]; then
|
||||
codemgr_parent="$codemgr_parent/raw_files/new"
|
||||
fi
|
||||
|
||||
if [[ -z $wflag && -z $lflag ]]; then
|
||||
shift $(($OPTIND - 1))
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
if [[ $1 == "-" ]]; then
|
||||
cat > $FLIST
|
||||
flist_mode="stdin"
|
||||
flist_done=1
|
||||
shift
|
||||
elif [[ -n $1 ]]; then
|
||||
if [[ ! -r $1 ]]; then
|
||||
print -u2 "$1: no such file or not readable"
|
||||
usage
|
||||
fi
|
||||
cat $1 > $FLIST
|
||||
flist_mode="file"
|
||||
flist_file=$1
|
||||
flist_done=1
|
||||
shift
|
||||
else
|
||||
flist_mode="auto"
|
||||
if [[ $1 == "-" ]]; then
|
||||
cat > $FLIST
|
||||
flist_mode="stdin"
|
||||
flist_done=1
|
||||
shift
|
||||
elif [[ -n $1 ]]; then
|
||||
if [[ ! -r $1 ]]; then
|
||||
print -u2 "$1: no such file or not readable"
|
||||
usage
|
||||
fi
|
||||
cat $1 > $FLIST
|
||||
flist_mode="file"
|
||||
flist_file=$1
|
||||
flist_done=1
|
||||
shift
|
||||
else
|
||||
flist_mode="auto"
|
||||
fi
|
||||
|
||||
#
|
||||
@ -2161,11 +1898,9 @@ if [[ -z $SCM_MODE ]]; then
|
||||
SCM_MODE=`detect_scm $FLIST`
|
||||
fi
|
||||
if [[ $SCM_MODE == "unknown" ]]; then
|
||||
print -u2 "Unable to determine SCM type currently in use."
|
||||
print -u2 "For teamware: webrev looks for \$CODEMGR_WS either in"
|
||||
print -u2 " the environment or in the file list."
|
||||
print -u2 "For mercurial: webrev runs 'hg root'."
|
||||
exit 1
|
||||
print -u2 "Unable to determine SCM type currently in use."
|
||||
print -u2 "For mercurial: webrev runs 'hg root'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print -u2 " SCM detected: $SCM_MODE"
|
||||
@ -2199,7 +1934,7 @@ if [[ $SCM_MODE == "mercurial" ]]; then
|
||||
#
|
||||
# for forest we have to rely on properly set default and
|
||||
# default-push because they can be different from the top one.
|
||||
# unless of course it was explicitely speficied with -p
|
||||
# unless of course it was explicitly specified with -p
|
||||
if [[ -z $pflag ]]; then
|
||||
OUTPWS=
|
||||
fi
|
||||
@ -2281,46 +2016,7 @@ if [[ $SCM_MODE == "mercurial" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $lflag ]]; then
|
||||
#
|
||||
# If the -l flag is given instead of the name of a file list,
|
||||
# then generate the file list by extracting file names from a
|
||||
# putback -n.
|
||||
#
|
||||
shift $(($OPTIND - 1))
|
||||
if [[ $SCM_MODE == "teamware" ]]; then
|
||||
flist_from_teamware "$*"
|
||||
elif [[ $SCM_MODE == "mercurial" ]]; then
|
||||
flist_from_mercurial
|
||||
fi
|
||||
flist_done=1
|
||||
shift $#
|
||||
|
||||
elif [[ -n $wflag ]]; then
|
||||
#
|
||||
# If the -w is given then assume the file list is in Bonwick's "wx"
|
||||
# command format, i.e. pathname lines alternating with SCCS comment
|
||||
# lines with blank lines as separators. Use the SCCS comments later
|
||||
# in building the index.html file.
|
||||
#
|
||||
shift $(($OPTIND - 1))
|
||||
wxfile=$1
|
||||
if [[ -z $wxfile && -n $CODEMGR_WS ]]; then
|
||||
if [[ -r $CODEMGR_WS/wx/active ]]; then
|
||||
wxfile=$CODEMGR_WS/wx/active
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -z $wxfile ]] && print -u2 "wx file not specified, and could not " \
|
||||
"be auto-detected (check \$CODEMGR_WS)" && exit 1
|
||||
|
||||
print -u2 " File list from: wx 'active' file '$wxfile' ... \c"
|
||||
flist_from_wx $wxfile
|
||||
flist_done=1
|
||||
if [[ -n "$*" ]]; then
|
||||
shift
|
||||
fi
|
||||
elif [[ $flist_mode == "stdin" ]]; then
|
||||
if [[ $flist_mode == "stdin" ]]; then
|
||||
print -u2 " File list from: standard input"
|
||||
elif [[ $flist_mode == "file" ]]; then
|
||||
print -u2 " File list from: $flist_file"
|
||||
@ -2330,110 +2026,7 @@ if [[ $# -gt 0 ]]; then
|
||||
print -u2 "WARNING: unused arguments: $*"
|
||||
fi
|
||||
|
||||
if [[ $SCM_MODE == "teamware" ]]; then
|
||||
#
|
||||
# Parent (internally $codemgr_parent) and workspace ($codemgr_ws) can
|
||||
# be set in a number of ways, in decreasing precedence:
|
||||
#
|
||||
# 1) on the command line (only for the parent)
|
||||
# 2) in the user environment
|
||||
# 3) in the flist
|
||||
# 4) automatically based on the workspace (only for the parent)
|
||||
#
|
||||
|
||||
#
|
||||
# Here is case (2): the user environment
|
||||
#
|
||||
[[ -z $codemgr_ws && -n $CODEMGR_WS ]] && codemgr_ws=$CODEMGR_WS
|
||||
[[ -z $codemgr_ws && -n $WSPACE ]] && codemgr_ws=`$WSPACE name`
|
||||
|
||||
if [[ -n $codemgr_ws && ! -d $codemgr_ws ]]; then
|
||||
print -u2 "$codemgr_ws: no such workspace"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[[ -z $codemgr_parent && -n $CODEMGR_PARENT ]] && \
|
||||
codemgr_parent=$CODEMGR_PARENT
|
||||
|
||||
if [[ -n $codemgr_parent && ! -d $codemgr_parent ]]; then
|
||||
print -u2 "$codemgr_parent: no such directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# If we're in auto-detect mode and we haven't already gotten the file
|
||||
# list, then see if we can get it by probing for wx.
|
||||
#
|
||||
if [[ -z $flist_done && $flist_mode == "auto" && -n $codemgr_ws ]]; then
|
||||
if [[ ! -x $WX ]]; then
|
||||
print -u2 "WARNING: wx not found!"
|
||||
fi
|
||||
|
||||
#
|
||||
# We need to use wx list -w so that we get renamed files, etc.
|
||||
# but only if a wx active file exists-- otherwise wx will
|
||||
# hang asking us to initialize our wx information.
|
||||
#
|
||||
if [[ -x $WX && -f $codemgr_ws/wx/active ]]; then
|
||||
print -u2 " File list from: 'wx list -w' ... \c"
|
||||
$WX list -w > $FLIST
|
||||
$WX comments > /tmp/$$.wx_comments
|
||||
wxfile=/tmp/$$.wx_comments
|
||||
print -u2 "done"
|
||||
flist_done=1
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# If by hook or by crook we've gotten a file list by now (perhaps
|
||||
# from the command line), eval it to extract environment variables from
|
||||
# it: This is step (3).
|
||||
#
|
||||
env_from_flist
|
||||
|
||||
#
|
||||
# Continuing step (3): If we still have no file list, we'll try to get
|
||||
# it from teamware.
|
||||
#
|
||||
if [[ -z $flist_done ]]; then
|
||||
flist_from_teamware
|
||||
env_from_flist
|
||||
fi
|
||||
|
||||
if [[ -z $codemgr_ws && -d $PWD/Codemgr_wsdata ]]; then
|
||||
codemgr_ws=$PWD
|
||||
fi
|
||||
#
|
||||
# Observe true directory name of CODEMGR_WS, as used later in
|
||||
# webrev title.
|
||||
#
|
||||
if [[ -n $codemgr_ws ]]; then
|
||||
codemgr_ws=$(cd $codemgr_ws;print $PWD)
|
||||
fi
|
||||
|
||||
if [[ -n $codemgr_parent ]]; then
|
||||
codemgr_parent=$(cd $codemgr_parent;print $PWD)
|
||||
fi
|
||||
|
||||
#
|
||||
# (4) If we still don't have a value for codemgr_parent, get it
|
||||
# from workspace.
|
||||
#
|
||||
[[ -z $codemgr_parent && -n $WSPACE ]] && codemgr_parent=`$WSPACE parent`
|
||||
[[ -z $codemgr_parent ]] && codemgr_parent=`parent_from_teamware $codemgr_ws`
|
||||
|
||||
if [[ ! -d $codemgr_parent ]]; then
|
||||
print -u2 "$CODEMGR_PARENT: no such parent workspace"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Reset CODEMGR_WS to make sure teamware commands are happy.
|
||||
#
|
||||
CODEMGR_WS=$codemgr_ws
|
||||
CWS=$codemgr_ws
|
||||
PWS=$codemgr_parent
|
||||
elif [[ $SCM_MODE == "mercurial" ]]; then
|
||||
if [[ $SCM_MODE == "mercurial" ]]; then
|
||||
if [[ -z $flist_done ]]; then
|
||||
flist_from_mercurial $PWS
|
||||
fi
|
||||
@ -2527,31 +2120,13 @@ print " Output to: $WDIR"
|
||||
|
||||
#
|
||||
# Bug IDs will be replaced by a URL. Order of precedence
|
||||
# is: default location, $WEBREV_BUGURL, the -O flag.
|
||||
# is: default location, $WEBREV_BUGURL
|
||||
#
|
||||
BUGURL='https://bugs.openjdk.java.net/browse/'
|
||||
[[ -n $WEBREV_BUGURL ]] && BUGURL="$WEBREV_BUGURL"
|
||||
if [[ -n "$Oflag" ]]; then
|
||||
CRID=`echo $CRID | sed -e 's/JDK-//'`
|
||||
BUGURL='http://bugs.sun.com/bugdatabase/view_bug.do?bug_id='
|
||||
IDPREFIX=''
|
||||
else
|
||||
IDPREFIX='JDK-'
|
||||
fi
|
||||
IDPREFIX='JDK-'
|
||||
|
||||
|
||||
#
|
||||
# Likewise, ARC cases will be replaced by a URL. Order of precedence
|
||||
# is: default, $WEBREV_SACURL, the -O flag.
|
||||
#
|
||||
# Note that -O also triggers different substitution behavior for
|
||||
# SACURL. See sac2url().
|
||||
#
|
||||
SACURL='http://sac.eng.sun.com'
|
||||
[[ -n $WEBREV_SACURL ]] && SACURL="$WEBREV_SACURL"
|
||||
[[ -n $Oflag ]] && \
|
||||
SACURL='http://www.opensolaris.org/os/community/arc/caselog'
|
||||
|
||||
rm -f $WDIR/$WNAME.patch
|
||||
rm -f $WDIR/$WNAME.changeset
|
||||
rm -f $WDIR/$WNAME.ps
|
||||
@ -2650,20 +2225,6 @@ do
|
||||
# cd to the directory so the names are short
|
||||
cd $CWS/$DIR
|
||||
|
||||
#
|
||||
# If we're in OpenSolaris mode, we enforce a minor policy:
|
||||
# help to make sure the reviewer doesn't accidentally publish
|
||||
# source which is in usr/closed/*
|
||||
#
|
||||
if [[ -n $Oflag ]]; then
|
||||
pclosed=${P##usr/closed/}
|
||||
if [[ $pclosed != $P ]]; then
|
||||
print "*** Omitting closed source for OpenSolaris" \
|
||||
"mode review"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# We stash old and new files into parallel directories in /tmp
|
||||
# and do our diffs there. This makes it possible to generate
|
||||
@ -2968,18 +2529,15 @@ print "<h2>Code Review for $WNAME</h2>"
|
||||
|
||||
print "<table>"
|
||||
|
||||
if [[ -z $uflag ]]
|
||||
then
|
||||
if [[ $SCM_MODE == "mercurial" ]]
|
||||
then
|
||||
if [[ -z $uflag ]]; then
|
||||
if [[ $SCM_MODE == "mercurial" ]]; then
|
||||
#
|
||||
# Let's try to extract the user name from the .hgrc file
|
||||
#
|
||||
username=`grep '^username' $HOME/.hgrc | sed 's/^username[ ]*=[ ]*\(.*\)/\1/'`
|
||||
fi
|
||||
|
||||
if [[ -z $username ]]
|
||||
then
|
||||
if [[ -z $username ]]; then
|
||||
#
|
||||
# Figure out the username and gcos name. To maintain compatibility
|
||||
# with passwd(4), we must support '&' substitutions.
|
||||
@ -3047,27 +2605,21 @@ if [[ -n "$iflag" ]]; then
|
||||
print "</div></td></tr>"
|
||||
fi
|
||||
# Add links to referenced CRs, if any
|
||||
# external URL has a <title> like:
|
||||
# <title>Bug ID: 6641309 Wrong Cookie separator used in HttpURLConnection</title>
|
||||
# while internal URL has <title> like:
|
||||
# <title>[#JDK-6641309] Wrong Cookie separator used in HttpURLConnection</title>
|
||||
#
|
||||
# URL has a <title> like:
|
||||
# <title>[#JDK-8024688] b106-lambda: j.u.Map.merge doesn't work as specified if contains key:null pair - Java Bug System</title>
|
||||
# we format this to:
|
||||
# JDK-8024688: b106-lambda: j.u.Map.merge doesn't work as specified if contains key:null pair
|
||||
if [[ -n $CRID ]]; then
|
||||
for id in $CRID
|
||||
do
|
||||
if [[ -z "$Oflag" ]]; then
|
||||
#add "JDK-" to raw bug id for openjdk.java.net links.
|
||||
id=`echo ${id} | sed 's/^\([0-9]\{5,\}\)$/JDK-\1/'`
|
||||
fi
|
||||
#add "JDK-" to raw bug id for openjdk.java.net links.
|
||||
id=`echo ${id} | sed 's/^\([0-9]\{5,\}\)$/JDK-\1/'`
|
||||
|
||||
print "<tr><th>Bug id:</th><td>"
|
||||
url="${BUGURL}${id}"
|
||||
if [[ -n "$Oflag" ]]; then
|
||||
cleanup='s/Bug ID: \([0-9]\{5,\}\) \(.*\)/JDK-\1 : \2/'
|
||||
else
|
||||
cleanup='s|\[#\(JDK-[0-9]\{5,\}\)\] \(.*\)|\1 : \2|'
|
||||
fi
|
||||
|
||||
if [[ -n $WGET ]]; then
|
||||
msg=`$WGET --timeout=10 --tries=1 -q $url -O - | grep '<title>' | sed 's/<title>\(.*\)<\/title>/\1/' | sed "$cleanup" | html_quote`
|
||||
msg=`$WGET --timeout=10 --tries=1 -q $url -O - | grep '<title>' | sed 's/<title>\[#\(.*\)\] \(.*\) - Java Bug System<\/title>/\1 : \2/' | html_dequote | html_quote`
|
||||
fi
|
||||
if [[ -z $msg ]]; then
|
||||
msg="${id}"
|
||||
@ -3184,16 +2736,6 @@ do
|
||||
print "<b>$P</b> $oldname"
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for usr/closed
|
||||
#
|
||||
if [ ! -z "$Oflag" ]; then
|
||||
if [[ $P == usr/closed/* ]]; then
|
||||
print " <i>Closed source: omitted from" \
|
||||
"this review</i>"
|
||||
fi
|
||||
fi
|
||||
|
||||
print "</p><blockquote>\c"
|
||||
# Insert delta comments if any
|
||||
comments=`getcomments html $P $PP`
|
||||
|
Loading…
Reference in New Issue
Block a user