mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2024-11-23 12:29:56 +00:00
8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work. Reviewed-by: erikj, ihse, dholmes, tbell
This commit is contained in:
parent
650aac0d5e
commit
f9c6f4bd18
144
NewMakefile.gmk
144
NewMakefile.gmk
@ -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:
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/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
|
||||
|
@ -34,84 +34,102 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([SET_FULL_PATH],
|
||||
# This will make sure the given variable points to a full and proper
|
||||
# path. This means:
|
||||
# 1) There will be no spaces in the path. On posix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# $1: The name of the variable to fix
|
||||
AC_DEFUN([BASIC_FIXUP_PATH],
|
||||
[
|
||||
# Translate "gcc -E" into "`which gcc` -E" ie
|
||||
# extract the full path to the binary and at the
|
||||
# same time maintain any arguments passed to it.
|
||||
# The command MUST exist in the path, or else!
|
||||
tmp="[$]$1"
|
||||
car="${tmp%% *}"
|
||||
tmp="[$]$1 EOL"
|
||||
cdr="${tmp#* }"
|
||||
# On windows we want paths without spaces.
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
SET_FULL_PATH_SPACESAFE(car)
|
||||
else
|
||||
# "which" is not portable, but is used here
|
||||
# because we know that the command exists!
|
||||
car=`which $car`
|
||||
fi
|
||||
if test "x$cdr" != xEOL; then
|
||||
$1="$car ${cdr% *}"
|
||||
else
|
||||
$1="$car"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([SPACESAFE],
|
||||
[
|
||||
# Fail with message $2 if var $1 contains a path with no spaces in it.
|
||||
# Unless on Windows, where we can rewrite the path.
|
||||
HAS_SPACE=`echo "[$]$1" | grep " "`
|
||||
if test "x$HAS_SPACE" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# First convert it to DOS-style, short mode (no spaces)
|
||||
$1=`$CYGPATH -s -m -a "[$]$1"`
|
||||
# Now it's case insensitive; let's make it lowercase to improve readability
|
||||
$1=`$ECHO "[$]$1" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
|
||||
# Now convert it back to Unix-stile (cygpath)
|
||||
$1=`$CYGPATH -u "[$]$1"`
|
||||
else
|
||||
AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([SET_FULL_PATH_SPACESAFE],
|
||||
[
|
||||
# Translate long cygdrive or C:\sdfsf path
|
||||
# into a short mixed mode path that has no
|
||||
# spaces in it.
|
||||
tmp="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
BASIC_FIXUP_PATH_CYGWIN($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
BASIC_FIXUP_PATH_MSYS($1)
|
||||
else
|
||||
# We're on a posix platform. Hooray! :)
|
||||
path="[$]$1"
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
tmp=`$CYGPATH -u "[$]$1"`
|
||||
tmp=`which "$tmp"`
|
||||
# If file exists with .exe appended, that's the real filename
|
||||
# and cygpath needs that to convert to short style path.
|
||||
if test -f "${tmp}.exe"; then
|
||||
tmp="${tmp}.exe"
|
||||
elif test -f "${tmp}.cmd"; then
|
||||
tmp="${tmp}.cmd"
|
||||
fi
|
||||
# Convert to C:/ mixed style path without spaces.
|
||||
tmp=`$CYGPATH -s -m "$tmp"`
|
||||
if test ! -f "$path" && test ! -d "$path"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
|
||||
fi
|
||||
$1="$tmp"
|
||||
|
||||
has_space=`$ECHO "$path" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
AC_MSG_ERROR([Spaces are not allowed in this path.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
|
||||
# This will make sure the given variable points to a executable
|
||||
# with a full and proper path. This means:
|
||||
# 1) There will be no spaces in the path. On posix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# Any arguments given to the executable is preserved.
|
||||
# If the input variable does not have a directory specification, then
|
||||
# it need to be in the PATH.
|
||||
# $1: The name of the variable to fix
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
BASIC_FIXUP_EXECUTABLE_CYGWIN($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
BASIC_FIXUP_EXECUTABLE_MSYS($1)
|
||||
else
|
||||
# We're on a posix platform. Hooray! :)
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
new_path=`$WHICH $path 2> /dev/null`
|
||||
if test "x$new_path" = x; then
|
||||
is_absolute_path=`$ECHO "$path" | $GREP ^/`
|
||||
if test "x$is_absolute_path" != x; then
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
|
||||
new_path="$path"
|
||||
else
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
|
||||
if test "x$complete" != "x$new_complete"; then
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --help 2>&1 | grep GNU`
|
||||
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
@ -125,23 +143,25 @@ AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
|
||||
else
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
DIR=`dirname [$]$1`
|
||||
FIL=`basename [$]$1`
|
||||
DIR=`$DIRNAME [$]$1`
|
||||
FILE=`$BASENAME [$]$1`
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
|
||||
ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# The link might be relative! We have to use cd to travel safely.
|
||||
cd $DIR
|
||||
cd `dirname $ISLINK`
|
||||
DIR=`pwd`
|
||||
FIL=`basename $ISLINK`
|
||||
# ... and we must get the to the absolute path, not one using symbolic links.
|
||||
cd `pwd -P`
|
||||
cd `$DIRNAME $ISLINK`
|
||||
DIR=`$THEPWDCMD`
|
||||
FILE=`$BASENAME $ISLINK`
|
||||
let COUNTER=COUNTER+1
|
||||
done
|
||||
cd $STARTDIR
|
||||
$1=$DIR/$FIL
|
||||
$1=$DIR/$FILE
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@ -152,6 +172,107 @@ AC_DEFUN_ONCE([BASIC_INIT],
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
|
||||
])
|
||||
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
# $1: variable to check
|
||||
# $2: executable name to print in warning (optional)
|
||||
AC_DEFUN([BASIC_CHECK_NONEMPTY],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
if test "x$2" = x; then
|
||||
PROG_NAME=translit($1,A-Z,a-z)
|
||||
else
|
||||
PROG_NAME=$2
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find $PROG_NAME!])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
])
|
||||
|
||||
# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
|
||||
# Arguments as AC_PATH_PROG:
|
||||
# $1: variable to set
|
||||
# $2: executable name to look for
|
||||
AC_DEFUN([BASIC_REQUIRE_PROG],
|
||||
[
|
||||
AC_PATH_PROGS($1, $2)
|
||||
BASIC_CHECK_NONEMPTY($1, $2)
|
||||
])
|
||||
|
||||
# Setup the most fundamental tools that relies on not much else to set up,
|
||||
# but is used by much of the early bootstrap code.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
|
||||
# First are all the simple required tools.
|
||||
BASIC_REQUIRE_PROG(BASENAME, basename)
|
||||
BASIC_REQUIRE_PROG(BASH, bash)
|
||||
BASIC_REQUIRE_PROG(CAT, cat)
|
||||
BASIC_REQUIRE_PROG(CHMOD, chmod)
|
||||
BASIC_REQUIRE_PROG(CMP, cmp)
|
||||
BASIC_REQUIRE_PROG(CP, cp)
|
||||
BASIC_REQUIRE_PROG(CUT, cut)
|
||||
BASIC_REQUIRE_PROG(DATE, date)
|
||||
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
|
||||
BASIC_REQUIRE_PROG(DIRNAME, dirname)
|
||||
BASIC_REQUIRE_PROG(ECHO, echo)
|
||||
BASIC_REQUIRE_PROG(EXPR, expr)
|
||||
BASIC_REQUIRE_PROG(FILE, file)
|
||||
BASIC_REQUIRE_PROG(FIND, find)
|
||||
BASIC_REQUIRE_PROG(HEAD, head)
|
||||
BASIC_REQUIRE_PROG(LN, ln)
|
||||
BASIC_REQUIRE_PROG(LS, ls)
|
||||
BASIC_REQUIRE_PROG(MKDIR, mkdir)
|
||||
BASIC_REQUIRE_PROG(MKTEMP, mktemp)
|
||||
BASIC_REQUIRE_PROG(MV, mv)
|
||||
BASIC_REQUIRE_PROG(PRINTF, printf)
|
||||
BASIC_REQUIRE_PROG(THEPWDCMD, pwd)
|
||||
BASIC_REQUIRE_PROG(RM, rm)
|
||||
BASIC_REQUIRE_PROG(SH, sh)
|
||||
BASIC_REQUIRE_PROG(SORT, sort)
|
||||
BASIC_REQUIRE_PROG(TAIL, tail)
|
||||
BASIC_REQUIRE_PROG(TAR, tar)
|
||||
BASIC_REQUIRE_PROG(TEE, tee)
|
||||
BASIC_REQUIRE_PROG(TOUCH, touch)
|
||||
BASIC_REQUIRE_PROG(TR, tr)
|
||||
BASIC_REQUIRE_PROG(UNAME, uname)
|
||||
BASIC_REQUIRE_PROG(UNIQ, uniq)
|
||||
BASIC_REQUIRE_PROG(WC, wc)
|
||||
BASIC_REQUIRE_PROG(WHICH, which)
|
||||
BASIC_REQUIRE_PROG(XARGS, xargs)
|
||||
|
||||
# Then required tools that require some special treatment.
|
||||
AC_PROG_AWK
|
||||
BASIC_CHECK_NONEMPTY(AWK)
|
||||
AC_PROG_GREP
|
||||
BASIC_CHECK_NONEMPTY(GREP)
|
||||
AC_PROG_EGREP
|
||||
BASIC_CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
BASIC_CHECK_NONEMPTY(FGREP)
|
||||
AC_PROG_SED
|
||||
BASIC_CHECK_NONEMPTY(SED)
|
||||
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
BASIC_CHECK_NONEMPTY(NAWK)
|
||||
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
|
||||
# These are not required on all platforms
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
AC_PATH_PROG(DF, df)
|
||||
AC_PATH_PROG(SETFILE, SetFile)
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
@ -159,46 +280,37 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
REMOVE_SYMBOLIC_LINKS(SCRIPT)
|
||||
AUTOCONF_DIR=`dirname [$]0`
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(SCRIPT)
|
||||
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
|
||||
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`pwd`"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
SRC_ROOT_LENGTH=`pwd|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_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
BASIC_CHECK_PATHS_WINDOWS
|
||||
else
|
||||
PATH_SEP=":"
|
||||
fi
|
||||
|
||||
AC_SUBST(SRC_ROOT)
|
||||
AC_SUBST(PATH_SEP)
|
||||
cd "$CURDIR"
|
||||
|
||||
SPACESAFE(SRC_ROOT,[the path to the source root])
|
||||
SPACESAFE(CURDIR,[the path to the current directory])
|
||||
BASIC_FIXUP_PATH(SRC_ROOT)
|
||||
BASIC_FIXUP_PATH(CURDIR)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
# Add extra search paths on solaris for utilities like ar and as etc...
|
||||
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
|
||||
fi
|
||||
|
||||
# For cygwin we need cygpath first, since it is used everywhere.
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
PATH_SEP=":"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
PATH_SEP=";"
|
||||
fi
|
||||
AC_SUBST(PATH_SEP)
|
||||
|
||||
# You can force the sys-root if the sys-root encoded into the cross compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[pass this sys-root to the compilers and linker (useful if the sys-root encoded in
|
||||
the cross compiler tools is incorrect)])])
|
||||
[pass this sys-root to the compilers and tools (for cross-compiling)])])
|
||||
|
||||
if test "x$with_sys_root" != x; then
|
||||
SYS_ROOT=$with_sys_root
|
||||
@ -208,7 +320,7 @@ fi
|
||||
AC_SUBST(SYS_ROOT)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[search this directory for (cross-compiling) compilers and tools])], [TOOLS_DIR=$with_tools_dir])
|
||||
[search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
|
||||
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
|
||||
@ -228,8 +340,9 @@ AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration, overriding the generated default])],
|
||||
[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
@ -240,7 +353,7 @@ if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || te
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
mkdir -p "$OUTPUT_ROOT"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
if test ! -d "$OUTPUT_ROOT"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
|
||||
fi
|
||||
@ -254,8 +367,9 @@ else
|
||||
fi
|
||||
OUTPUT_ROOT="$CURDIR"
|
||||
fi
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
|
||||
SPACESAFE(OUTPUT_ROOT,[the path to the output root])
|
||||
BASIC_FIXUP_PATH(OUTPUT_ROOT)
|
||||
|
||||
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
|
||||
AC_SUBST(CONF_NAME, $CONF_NAME)
|
||||
@ -287,7 +401,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
|
||||
# Setup default logging of stdout and stderr to build.log in the output root.
|
||||
BUILD_LOG='$(OUTPUT_ROOT)/build.log'
|
||||
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
|
||||
BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
AC_SUBST(BUILD_LOG)
|
||||
AC_SUBST(BUILD_LOG_PREVIOUS)
|
||||
AC_SUBST(BUILD_LOG_WRAPPER)
|
||||
@ -305,7 +419,6 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
DESCRIPTION="$2"
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
|
||||
SET_FULL_PATH(MAKE_CANDIDATE)
|
||||
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
|
||||
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
@ -314,8 +427,27 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'`
|
||||
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
|
||||
FOUND_MAKE=$MAKE_CANDIDATE
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_EXPECTED_ENV='cygwin'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
MAKE_EXPECTED_ENV='msys'
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment])
|
||||
fi
|
||||
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
|
||||
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
|
||||
else
|
||||
# Not relevant for non-Windows
|
||||
IS_MAKE_CORRECT_ENV=true
|
||||
fi
|
||||
if test "x$IS_MAKE_CORRECT_ENV" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
|
||||
else
|
||||
FOUND_MAKE=$MAKE_CANDIDATE
|
||||
BASIC_FIXUP_EXECUTABLE(FOUND_MAKE)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -330,7 +462,7 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
if test ! -f "$MAKE"; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
|
||||
fi
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=])
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.])
|
||||
fi
|
||||
@ -375,7 +507,7 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
|
||||
DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
|
||||
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
|
||||
|
||||
@ -389,102 +521,22 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rmdir $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
])
|
||||
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
# $1: variable to check
|
||||
# $2: executable name to print in warning (optional)
|
||||
AC_DEFUN([CHECK_NONEMPTY],
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
if test "x$2" = x; then
|
||||
PROG_NAME=translit($1,A-Z,a-z)
|
||||
else
|
||||
PROG_NAME=$2
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find $PROG_NAME!])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
])
|
||||
|
||||
# Does AC_PATH_PROG followed by CHECK_NONEMPTY.
|
||||
# Arguments as AC_PATH_PROG:
|
||||
# $1: variable to set
|
||||
# $2: executable name to look for
|
||||
AC_DEFUN([BASIC_REQUIRE_PROG],
|
||||
[
|
||||
AC_PATH_PROGS($1, $2)
|
||||
CHECK_NONEMPTY($1, $2)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
[
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
|
||||
# First are all the simple required tools.
|
||||
BASIC_REQUIRE_PROG(BASENAME, basename)
|
||||
BASIC_REQUIRE_PROG(CAT, cat)
|
||||
BASIC_REQUIRE_PROG(CHMOD, chmod)
|
||||
BASIC_REQUIRE_PROG(CMP, cmp)
|
||||
BASIC_REQUIRE_PROG(CP, cp)
|
||||
BASIC_REQUIRE_PROG(CPIO, cpio)
|
||||
BASIC_REQUIRE_PROG(CUT, cut)
|
||||
BASIC_REQUIRE_PROG(DATE, date)
|
||||
BASIC_REQUIRE_PROG(DF, df)
|
||||
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
|
||||
BASIC_REQUIRE_PROG(ECHO, echo)
|
||||
BASIC_REQUIRE_PROG(EXPR, expr)
|
||||
BASIC_REQUIRE_PROG(FILE, file)
|
||||
BASIC_REQUIRE_PROG(FIND, find)
|
||||
BASIC_REQUIRE_PROG(HEAD, head)
|
||||
BASIC_REQUIRE_PROG(LN, ln)
|
||||
BASIC_REQUIRE_PROG(LS, ls)
|
||||
BASIC_REQUIRE_PROG(MKDIR, mkdir)
|
||||
BASIC_REQUIRE_PROG(MV, mv)
|
||||
BASIC_REQUIRE_PROG(PRINTF, printf)
|
||||
BASIC_REQUIRE_PROG(SH, sh)
|
||||
BASIC_REQUIRE_PROG(SORT, sort)
|
||||
BASIC_REQUIRE_PROG(TAIL, tail)
|
||||
BASIC_REQUIRE_PROG(TAR, tar)
|
||||
BASIC_REQUIRE_PROG(TEE, tee)
|
||||
BASIC_REQUIRE_PROG(TOUCH, touch)
|
||||
BASIC_REQUIRE_PROG(TR, tr)
|
||||
BASIC_REQUIRE_PROG(UNIQ, uniq)
|
||||
BASIC_REQUIRE_PROG(UNZIP, unzip)
|
||||
BASIC_REQUIRE_PROG(WC, wc)
|
||||
BASIC_REQUIRE_PROG(XARGS, xargs)
|
||||
BASIC_REQUIRE_PROG(ZIP, zip)
|
||||
|
||||
# Then required tools that require some special treatment.
|
||||
AC_PROG_AWK
|
||||
CHECK_NONEMPTY(AWK)
|
||||
AC_PROG_GREP
|
||||
CHECK_NONEMPTY(GREP)
|
||||
AC_PROG_EGREP
|
||||
CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
CHECK_NONEMPTY(FGREP)
|
||||
AC_PROG_SED
|
||||
CHECK_NONEMPTY(SED)
|
||||
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
CHECK_NONEMPTY(NAWK)
|
||||
|
||||
BASIC_CHECK_GNU_MAKE
|
||||
|
||||
BASIC_REQUIRE_PROG(RM, rm)
|
||||
RM="$RM -f"
|
||||
|
||||
BASIC_CHECK_FIND_DELETE
|
||||
AC_SUBST(FIND_DELETE)
|
||||
|
||||
# These tools might not be installed by default,
|
||||
# need hint on how to install them.
|
||||
BASIC_REQUIRE_PROG(UNZIP, unzip)
|
||||
BASIC_REQUIRE_PROG(ZIP, zip)
|
||||
|
||||
# Non-required basic tools
|
||||
|
||||
AC_PATH_PROG(THEPWDCMD, pwd)
|
||||
AC_PATH_PROG(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
# List shared lib dependencies is used for
|
||||
@ -497,52 +549,17 @@ if test "x$OTOOL" = "x"; then
|
||||
OTOOL="true"
|
||||
fi
|
||||
AC_PATH_PROGS(READELF, [readelf greadelf])
|
||||
AC_PATH_PROGS(OBJDUMP, [objdump gobjdump])
|
||||
AC_PATH_PROG(HG, hg)
|
||||
])
|
||||
AC_PATH_PROG(STAT, stat)
|
||||
AC_PATH_PROG(TIME, time)
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE],
|
||||
[
|
||||
# When using cygwin, 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 uncygdrive.exe.
|
||||
UNCYGDRIVE=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if uncygdrive can be created])
|
||||
UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
|
||||
rm -f $OUTPUT_ROOT/uncygdrive*
|
||||
UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
|
||||
cd $OUTPUT_ROOT
|
||||
$CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
|
||||
cd $CURDIR
|
||||
|
||||
if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/uncygdrive1.log
|
||||
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
|
||||
fi
|
||||
AC_MSG_RESULT([$UNCYGDRIVE])
|
||||
AC_MSG_CHECKING([if uncygdrive.exe works])
|
||||
cd $OUTPUT_ROOT
|
||||
$UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
|
||||
cd $CURDIR
|
||||
if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/uncygdrive2.log
|
||||
AC_MSG_ERROR([Uncygdrive did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
|
||||
# The path to uncygdrive to use should be Unix-style
|
||||
UNCYGDRIVE="$OUTPUT_ROOT/uncygdrive.exe"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
fi
|
||||
|
||||
AC_SUBST(UNCYGDRIVE)
|
||||
])
|
||||
|
||||
|
||||
# Check if build directory is on local disk.
|
||||
# Check if build directory is on local disk. If not possible to determine,
|
||||
# we prefer to claim it's local.
|
||||
# Argument 1: directory to test
|
||||
# Argument 2: what to do if it is on local disk
|
||||
# Argument 3: what to do otherwise (remote disk or failure)
|
||||
@ -550,11 +567,26 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if $DF -l $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
if test "x$DF" = x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# msys does not have df; use Windows "net use" instead.
|
||||
IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
|
||||
if test "x$IS_NETWORK_DISK" = x; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
# No df here, say it's local
|
||||
$2
|
||||
fi
|
||||
else
|
||||
if $DF -l $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
|
406
common/autoconf/basics_windows.m4
Normal file
406
common/autoconf/basics_windows.m4
Normal file
@ -0,0 +1,406 @@
|
||||
#
|
||||
# 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
|
||||
])
|
||||
|
||||
|
3
common/autoconf/build-aux/config.guess
vendored
3
common/autoconf/build-aux/config.guess
vendored
@ -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"
|
||||
|
File diff suppressed because it is too large
Load Diff
175
common/autoconf/configure
vendored
175
common/autoconf/configure
vendored
@ -1,4 +1,32 @@
|
||||
#!/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".
|
||||
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
|
||||
}
|
||||
|
||||
# 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
|
||||
exit 1
|
||||
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.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
@ -356,38 +339,6 @@ AC_SUBST(CACERTS_FILE)
|
||||
COMPRESS_JARS=false
|
||||
|
||||
AC_SUBST(COMPRESS_JARS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we compile JFR
|
||||
# default no, except for on closed-jdk
|
||||
#
|
||||
ENABLE_JFR=no
|
||||
|
||||
# Is the JFR source present
|
||||
|
||||
#
|
||||
# For closed default is yes
|
||||
#
|
||||
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
|
||||
|
||||
AC_SUBST(ENABLE_JFR)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
|
||||
@ -409,6 +360,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 +390,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 +426,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 +440,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 +455,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 +481,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@
|
||||
@ -289,7 +294,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 +304,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 +322,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 +332,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 +405,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 +429,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 +465,7 @@ SORT:=@SORT@
|
||||
TAR:=@TAR@
|
||||
TAIL:=@TAIL@
|
||||
TEE:=@TEE@
|
||||
TIME:=@TIME@
|
||||
TR:=@TR@
|
||||
TOUCH:=@TOUCH@
|
||||
WC:=@WC@
|
||||
@ -468,9 +473,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 +484,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 +494,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
|
||||
|
@ -23,111 +23,67 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
# $1 = compiler to test (CC or CXX)
|
||||
# $2 = human readable name of compiler (C or C++)
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
|
||||
[
|
||||
COMPILER=[$]$1
|
||||
COMPILER_NAME=$2
|
||||
|
||||
# Check if the VS env variables were setup prior to running configure.
|
||||
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
||||
# the set env variables into the spec file.
|
||||
SETUPDEVENV="# No special vars"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# Store path to cygwin link.exe to help excluding it when searching for
|
||||
# VS linker.
|
||||
AC_PATH_PROG(CYGWIN_LINK, link)
|
||||
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
|
||||
"$CYGWIN_LINK" --version > /dev/null
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
|
||||
COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
|
||||
$ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
|
||||
if test $? -ne 0; then
|
||||
GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
|
||||
|
||||
AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler.])
|
||||
AC_MSG_NOTICE([The result from running with -V was: "$COMPILER_VERSION_TEST" and with --version: "$GCC_VERSION_TEST"])
|
||||
AC_MSG_ERROR([Sun Studio compiler is required. Try setting --with-tools-dir.])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
# This might be the VS linker. Don't exclude it later on.
|
||||
CYGWIN_LINK=""
|
||||
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*@<:@ ,\t@:>@$COMPILER_NAME@<:@ ,\t@:>@\(@<:@1-9@:>@\.@<:@0-9@:>@@<:@0-9@:>@*\).*/\1/p"`
|
||||
COMPILER_VENDOR="Sun Studio"
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# First line typically looks something like:
|
||||
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
|
||||
COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
|
||||
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"`
|
||||
COMPILER_VENDOR="Microsoft CL.EXE"
|
||||
COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
|
||||
if test "x$COMPILER_CPU_TEST" != "x80x86"; then
|
||||
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "80x86".])
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
||||
if test "x$COMPILER_CPU_TEST" != "xx64"; then
|
||||
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "x64".])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
|
||||
# Check that this is likely to be GCC.
|
||||
$COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler.])
|
||||
AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"])
|
||||
AC_MSG_ERROR([GCC compiler is required. Try setting --with-tools-dir.])
|
||||
fi
|
||||
|
||||
# If vcvarsall.bat has been run, then VCINSTALLDIR is set.
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
# No further setup is needed. The build will happen from this kind
|
||||
# of shell.
|
||||
SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
|
||||
# Make sure to remind you, if you forget to run make from a cygwin bash shell
|
||||
# that is spawned "bash -l" from a VS command prompt.
|
||||
CHECK_FOR_VCINSTALLDIR=yes
|
||||
AC_MSG_CHECKING([if you are running from within a VS command prompt])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
# Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
|
||||
SEARCH_ROOT="$VS100COMNTOOLS"
|
||||
else
|
||||
VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
|
||||
SEARCH_ROOT="$PROGRAMFILES"
|
||||
fi
|
||||
VCPATH=`dirname "$VARSBAT"`
|
||||
VCPATH=`cygpath -w "$VCPATH"`
|
||||
if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
|
||||
AC_MSG_CHECKING([if we can find the VS installation])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
|
||||
fi
|
||||
case "$OPENJDK_TARGET_CPU" in
|
||||
x86)
|
||||
VARSBAT_ARCH=x86
|
||||
;;
|
||||
x86_64)
|
||||
VARSBAT_ARCH=amd64
|
||||
;;
|
||||
esac
|
||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||
cd $OUTPUT_ROOT
|
||||
bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
|
||||
cd $CURDIR
|
||||
if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
|
||||
AC_MSG_CHECKING([if we can extract the needed env variables])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
|
||||
fi
|
||||
# Now set all paths and other env variables. This will allow the rest of
|
||||
# the configure script to find and run the compiler in the proper way.
|
||||
. $OUTPUT_ROOT/localdevenv.sh
|
||||
AC_MSG_CHECKING([if we can find the VS installation])
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
AC_MSG_RESULT([$VCINSTALLDIR])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
|
||||
fi
|
||||
CHECK_FOR_VCINSTALLDIR=no
|
||||
SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
|
||||
# First line typically looks something like:
|
||||
# gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
|
||||
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/p"`
|
||||
COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) @<:@1-9@:>@@<:@0-9.@:>@*/\1/p"`
|
||||
fi
|
||||
# This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
|
||||
$1_VERSION="$COMPILER_VERSION"
|
||||
# This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
|
||||
$1_VENDOR="$COMPILER_VENDOR"
|
||||
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll],
|
||||
[copy this msvcr100.dll into the built JDK])])
|
||||
if test "x$with_msvcr100dll" != x; then
|
||||
MSVCR100DLL="$with_msvcr100dll"
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
|
||||
else
|
||||
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
|
||||
if test "x$MSVCR100DLL" = x; then
|
||||
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR100DLL" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find msvcr100.dll !])
|
||||
fi
|
||||
AC_MSG_RESULT([$MSVCR100DLL])
|
||||
SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SETUPDEVENV)
|
||||
AC_SUBST(CHECK_FOR_VCINSTALLDIR)
|
||||
AC_SUBST(MSVCR100DLL)
|
||||
AC_MSG_NOTICE([Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
|
||||
[
|
||||
###############################################################################
|
||||
@ -151,8 +107,67 @@ AC_SUBST(LD_OUT_OPTION)
|
||||
AC_SUBST(AR_OUT_OPTION)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_PATHS],
|
||||
# $1 = compiler to test (CC or CXX)
|
||||
# $2 = human readable name of compiler (C or C++)
|
||||
# $3 = list of compiler names to search for
|
||||
AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
[
|
||||
COMPILER_NAME=$2
|
||||
|
||||
# Do a first initial attempt at searching the list of compiler names.
|
||||
# AC_PATH_PROGS can't be run multiple times with the same variable,
|
||||
# so create a new name for this run.
|
||||
AC_PATH_PROGS(POTENTIAL_$1, $3)
|
||||
$1=$POTENTIAL_$1
|
||||
|
||||
if test "x$[$]$1" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE($1)
|
||||
AC_MSG_CHECKING([resolved symbolic links for $1])
|
||||
TEST_COMPILER="[$]$1"
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER)
|
||||
AC_MSG_RESULT([$TEST_COMPILER])
|
||||
AC_MSG_CHECKING([if $1 is disguised ccache])
|
||||
|
||||
COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
|
||||
if test "x$COMPILER_BASENAME" = "xccache"; then
|
||||
AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler])
|
||||
# We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
|
||||
# We want to control ccache invocation ourselves, so ignore this cc and try
|
||||
# searching again.
|
||||
|
||||
# Remove the path to the fake ccache cc from the PATH
|
||||
RETRY_COMPILER_SAVED_PATH="$PATH"
|
||||
COMPILER_DIRNAME=`$DIRNAME [$]$1`
|
||||
PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
|
||||
|
||||
# Try again looking for our compiler
|
||||
AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3)
|
||||
BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1)
|
||||
PATH="$RETRY_COMPILER_SAVED_PATH"
|
||||
|
||||
AC_MSG_CHECKING([for resolved symbolic links for $1])
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1)
|
||||
AC_MSG_RESULT([$PROPER_COMPILER_$1])
|
||||
$1="$PROPER_COMPILER_$1"
|
||||
else
|
||||
AC_MSG_RESULT([no, keeping $1])
|
||||
$1="$TEST_COMPILER"
|
||||
fi
|
||||
TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
fi
|
||||
|
||||
AC_SUBST(MSVCR_DLL)
|
||||
|
||||
# If --build AND --host is set, then the configure script will find any
|
||||
# cross compilation tools in the PATH. Cross compilation tools
|
||||
# follows the cross compilation standard where they are prefixed with ${host}.
|
||||
@ -171,11 +186,11 @@ if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
|
||||
# to wait until they are properly discovered.
|
||||
AC_PATH_PROGS(BUILD_CC, [cl cc gcc])
|
||||
SET_FULL_PATH(BUILD_CC)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
|
||||
AC_PATH_PROGS(BUILD_CXX, [cl CC g++])
|
||||
SET_FULL_PATH(BUILD_CXX)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
|
||||
AC_PATH_PROG(BUILD_LD, ld)
|
||||
SET_FULL_PATH(BUILD_LD)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_LD)
|
||||
fi
|
||||
AC_SUBST(BUILD_CC)
|
||||
AC_SUBST(BUILD_CXX)
|
||||
@ -218,36 +233,40 @@ if test "x$TOOLS_DIR" != x; then
|
||||
PATH=$TOOLS_DIR:$PATH
|
||||
fi
|
||||
|
||||
|
||||
### Locate C compiler (CC)
|
||||
|
||||
# gcc is almost always present, but on Windows we
|
||||
# prefer cl.exe and on Solaris we prefer CC.
|
||||
# Thus test for them in this order.
|
||||
AC_PROG_CC([cl cc gcc])
|
||||
if test "x$CC" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find a compiler. $HELP_MSG])
|
||||
fi
|
||||
if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
# Do not use cc on MacOSX use gcc instead.
|
||||
CC="gcc"
|
||||
fi
|
||||
SET_FULL_PATH(CC)
|
||||
|
||||
AC_PROG_CXX([cl CC g++])
|
||||
if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
# The found CC, even though it seems to be a g++ derivate, cannot compile
|
||||
# c++ code. Override.
|
||||
CXX="g++"
|
||||
fi
|
||||
SET_FULL_PATH(CXX)
|
||||
|
||||
if test "x$CXX" = x || test "x$CC" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ])
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Do not probe for cc on MacOSX.
|
||||
COMPILER_CHECK_LIST="cl gcc"
|
||||
else
|
||||
COMPILER_CHECK_LIST="cl cc gcc"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
|
||||
# Now that we have resolved CC ourself, let autoconf have it's go at it
|
||||
AC_PROG_CC([$CC])
|
||||
|
||||
### Locate C++ compiler (CXX)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Do not probe for CC on MacOSX.
|
||||
COMPILER_CHECK_LIST="cl g++"
|
||||
else
|
||||
COMPILER_CHECK_LIST="cl CC g++"
|
||||
fi
|
||||
TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
|
||||
# Now that we have resolved CXX ourself, let autoconf have it's go at it
|
||||
AC_PROG_CXX([$CXX])
|
||||
|
||||
### Locate other tools
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
AC_PROG_OBJC
|
||||
SET_FULL_PATH(OBJC)
|
||||
BASIC_FIXUP_EXECUTABLE(OBJC)
|
||||
else
|
||||
OBJC=
|
||||
fi
|
||||
@ -270,20 +289,26 @@ AC_SUBST(LDCXX)
|
||||
# Linking C++ executables.
|
||||
AC_SUBST(LDEXECXX)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
SET_FULL_PATH(AR)
|
||||
BASIC_FIXUP_EXECUTABLE(AR)
|
||||
fi
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ARFLAGS="-r"
|
||||
else
|
||||
ARFLAGS=""
|
||||
fi
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
# For hotspot, we need these in Windows mixed path; other platforms keep them the same
|
||||
HOTSPOT_CXX="$CXX"
|
||||
HOTSPOT_LD="$LD"
|
||||
AC_SUBST(HOTSPOT_CXX)
|
||||
AC_SUBST(HOTSPOT_LD)
|
||||
|
||||
COMPILER_NAME=gcc
|
||||
COMPILER_TYPE=CC
|
||||
AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
|
||||
AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
|
||||
# For now, assume that we are always compiling using cl.exe.
|
||||
CC_OUT_OPTION=-Fo
|
||||
EXE_OUT_OPTION=-out:
|
||||
@ -294,7 +319,7 @@ AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
|
||||
AC_CHECK_PROG([WINLD], [link],[link],,, [$CYGWIN_LINK])
|
||||
# Since we must ignore the first found link, WINLD will contain
|
||||
# the full path to the link.exe program.
|
||||
SET_FULL_PATH_SPACESAFE([WINLD])
|
||||
BASIC_FIXUP_EXECUTABLE(WINLD)
|
||||
printf "Windows linker was found at $WINLD\n"
|
||||
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
|
||||
"$WINLD" --version > /dev/null
|
||||
@ -310,12 +335,25 @@ AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
|
||||
LDEXECXX="$WINLD"
|
||||
|
||||
AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
|
||||
SET_FULL_PATH_SPACESAFE([MT])
|
||||
BASIC_FIXUP_EXECUTABLE(MT)
|
||||
# The resource compiler
|
||||
AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
|
||||
SET_FULL_PATH_SPACESAFE([RC])
|
||||
BASIC_FIXUP_EXECUTABLE(RC)
|
||||
|
||||
RC_FLAGS="-nologo /l 0x409 /r"
|
||||
# For hotspot, we need these in Windows mixed path,
|
||||
# so rewrite them all. Need added .exe suffix.
|
||||
HOTSPOT_CXX="$CXX.exe"
|
||||
HOTSPOT_LD="$LD.exe"
|
||||
HOTSPOT_MT="$MT.exe"
|
||||
HOTSPOT_RC="$RC.exe"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_CXX)
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_LD)
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_MT)
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_RC)
|
||||
AC_SUBST(HOTSPOT_MT)
|
||||
AC_SUBST(HOTSPOT_RC)
|
||||
|
||||
RC_FLAGS="-nologo -l 0x409 -r"
|
||||
AS_IF([test "x$VARIANT" = xOPT], [
|
||||
RC_FLAGS="$RC_FLAGS -d NDEBUG"
|
||||
])
|
||||
@ -333,12 +371,12 @@ AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
|
||||
|
||||
# lib.exe is used to create static libraries.
|
||||
AC_CHECK_PROG([WINAR], [lib],[lib],,,)
|
||||
SET_FULL_PATH_SPACESAFE([WINAR])
|
||||
BASIC_FIXUP_EXECUTABLE(WINAR)
|
||||
AR="$WINAR"
|
||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
||||
|
||||
AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
|
||||
SET_FULL_PATH_SPACESAFE([DUMPBIN])
|
||||
BASIC_FIXUP_EXECUTABLE(DUMPBIN)
|
||||
|
||||
COMPILER_TYPE=CL
|
||||
CCXXFLAGS="$CCXXFLAGS -nologo"
|
||||
@ -347,10 +385,10 @@ AC_SUBST(RC_FLAGS)
|
||||
AC_SUBST(COMPILER_TYPE)
|
||||
|
||||
AC_PROG_CPP
|
||||
SET_FULL_PATH(CPP)
|
||||
BASIC_FIXUP_EXECUTABLE(CPP)
|
||||
|
||||
AC_PROG_CXXCPP
|
||||
SET_FULL_PATH(CXXCPP)
|
||||
BASIC_FIXUP_EXECUTABLE(CXXCPP)
|
||||
|
||||
if test "x$COMPILE_TYPE" != "xcross"; then
|
||||
# If we are not cross compiling, use the same compilers for
|
||||
@ -373,43 +411,44 @@ if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
fi
|
||||
|
||||
# Find the right assembler.
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
AC_PATH_PROG(AS, as)
|
||||
SET_FULL_PATH(AS)
|
||||
BASIC_FIXUP_EXECUTABLE(AS)
|
||||
else
|
||||
AS="$CC -c"
|
||||
fi
|
||||
AC_SUBST(AS)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
AC_PATH_PROGS(NM, [gnm nm])
|
||||
SET_FULL_PATH(NM)
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
AC_PATH_PROG(STRIP, strip)
|
||||
SET_FULL_PATH(STRIP)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
AC_PATH_PROG(MCS, mcs)
|
||||
SET_FULL_PATH(MCS)
|
||||
elif test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
BASIC_FIXUP_EXECUTABLE(MCS)
|
||||
elif test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
AC_CHECK_TOOL(NM, nm)
|
||||
SET_FULL_PATH(NM)
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
AC_CHECK_TOOL(STRIP, strip)
|
||||
SET_FULL_PATH(STRIP)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
fi
|
||||
|
||||
###
|
||||
#
|
||||
# Check for objcopy
|
||||
#
|
||||
# but search for gobjcopy first...
|
||||
# since I on solaris found a broken objcopy...buhh
|
||||
#
|
||||
AC_PATH_TOOL(OBJCOPY, gobjcopy)
|
||||
if test "x$OBJCOPY" = x; then
|
||||
AC_PATH_TOOL(OBJCOPY, objcopy)
|
||||
# objcopy is used for moving debug symbols to separate files when
|
||||
# full debug symbols are enabled.
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
|
||||
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
fi
|
||||
|
||||
AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
|
||||
if test "x$OBJDUMP" != x; then
|
||||
# Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
|
||||
BASIC_FIXUP_EXECUTABLE(OBJDUMP)
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
AC_PATH_PROG(LIPO, lipo)
|
||||
SET_FULL_PATH(LIPO)
|
||||
BASIC_FIXUP_EXECUTABLE(LIPO)
|
||||
fi
|
||||
|
||||
# Restore old path without tools dir
|
||||
@ -449,7 +488,7 @@ if test "x$GCC" = xyes; then
|
||||
POST_STRIP_CMD="$STRIP -g"
|
||||
|
||||
# Linking is different on MacOSX
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Might change in the future to clang.
|
||||
COMPILER_NAME=gcc
|
||||
SHARED_LIBRARY='lib[$]1.dylib'
|
||||
@ -463,7 +502,7 @@ if test "x$GCC" = xyes; then
|
||||
POST_STRIP_CMD="$STRIP -S"
|
||||
fi
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
|
||||
COMPILER_NAME=ossc
|
||||
PICFLAG="-KPIC"
|
||||
@ -487,7 +526,7 @@ else
|
||||
POST_STRIP_CMD="$STRIP -x"
|
||||
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
|
||||
fi
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# If it is not gcc, then assume it is the MS Visual Studio compiler
|
||||
COMPILER_NAME=cl
|
||||
PICFLAG=""
|
||||
@ -626,6 +665,11 @@ case $COMPILER_TYPE in
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" = xsparc; then
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
|
||||
fi
|
||||
|
||||
case $OPENJDK_TARGET_CPU_ARCH in
|
||||
x86)
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
|
||||
@ -642,8 +686,6 @@ case $COMPILER_TYPE in
|
||||
fi
|
||||
;;
|
||||
sparc)
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
|
||||
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
|
||||
@ -759,7 +801,7 @@ case $COMPILER_NAME in
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
|
||||
case $OPENJDK_TARGET_CPU_ARCH in
|
||||
x86 )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -Di386"
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
|
||||
;;
|
||||
esac
|
||||
@ -859,7 +901,7 @@ CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
|
||||
# libraries will link to whatever is in memory. Yuck.
|
||||
#
|
||||
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
|
||||
if test "x$COMPILER_TYPE" = xCL; then
|
||||
if test "x$COMPILER_NAME" = xcl; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
|
||||
@ -875,19 +917,23 @@ if test "x$COMPILER_TYPE" = xCL; then
|
||||
fi
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
|
||||
else
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both, why?
|
||||
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
|
||||
if test -n "$HAS_GNU_HASH"; then
|
||||
# And since we now know that the linker is gnu, then add -z defs, to forbid
|
||||
# undefined symbols in object files.
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
|
||||
if test "x$DEBUG_LEVEL" == "xrelease"; then
|
||||
# When building release libraries, tell the linker optimize them.
|
||||
# Should this be supplied to the OSS linker as well?
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
|
||||
if test "x$COMPILER_NAME" = xgcc; then
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both, why?
|
||||
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
|
||||
if test -n "$HAS_GNU_HASH"; then
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# And since we now know that the linker is gnu, then add -z defs, to forbid
|
||||
# undefined symbols in object files.
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
|
||||
if test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
# When building release libraries, tell the linker optimize them.
|
||||
# Should this be supplied to the OSS linker as well?
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
|
||||
|
258
common/autoconf/toolchain_windows.m4
Normal file
258
common/autoconf/toolchain_windows.m4
Normal file
@ -0,0 +1,258 @@
|
||||
#
|
||||
# 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([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
[
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
VS100BASE="$1"
|
||||
METHOD="$2"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
|
||||
if test -d "$VS100BASE"; then
|
||||
if test -f "$VS100BASE/$VCVARSFILE"; then
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
|
||||
VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
|
||||
else
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
[
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
WIN_SDK_BASE="$1"
|
||||
METHOD="$2"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
if test -d "$WIN_SDK_BASE"; then
|
||||
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
VS_ENV_ARGS="/x86"
|
||||
else
|
||||
VS_ENV_ARGS="/x64"
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
VCVARSFILE="vc/bin/vcvars32.bat"
|
||||
else
|
||||
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
|
||||
fi
|
||||
|
||||
VS_ENV_CMD=""
|
||||
VS_ENV_ARGS=""
|
||||
if test "x$with_toolsdir" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
|
||||
fi
|
||||
|
||||
if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
|
||||
# Having specified an argument which is incorrect will produce an instant failure;
|
||||
# we should not go on looking
|
||||
AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
|
||||
AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
|
||||
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
|
||||
fi
|
||||
|
||||
if test "x$ProgramW6432" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
fi
|
||||
if test "x$PROGRAMW6432" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
fi
|
||||
if test "x$PROGRAMFILES" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
|
||||
fi
|
||||
if test "x$PROGRAMFILES" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name])
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name])
|
||||
])
|
||||
|
||||
# Check if the VS env variables were setup prior to running configure.
|
||||
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
||||
# the set env variables into the spec file.
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
[
|
||||
# Store path to cygwin link.exe to help excluding it when searching for
|
||||
# VS linker. This must be done before changing the PATH when looking for VS.
|
||||
AC_PATH_PROG(CYGWIN_LINK, link)
|
||||
if test "x$CYGWIN_LINK" != x; then
|
||||
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
|
||||
"$CYGWIN_LINK" --version > /dev/null
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
# This might be the VS linker. Don't exclude it later on.
|
||||
CYGWIN_LINK=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# First-hand choice is to locate and run the vsvars bat file.
|
||||
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE
|
||||
if test "x$VS_ENV_CMD" != x; then
|
||||
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
||||
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||
|
||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
|
||||
cd $OUTPUT_ROOT
|
||||
# FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
|
||||
# to autoconf standards.
|
||||
|
||||
#----
|
||||
|
||||
# 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.
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
_vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
|
||||
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
|
||||
_dosbash=`cygpath -a -w -s \`which bash\`.*`
|
||||
else
|
||||
_dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
|
||||
_dosbash=`cmd //c echo \`which bash\``
|
||||
fi
|
||||
|
||||
# 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 $VS_ENV_ARGS" >> localdevenvtmp.bat
|
||||
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
|
||||
|
||||
# Now execute the newly created bat file.
|
||||
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys
|
||||
cmd /c localdevenvtmp.bat | cat
|
||||
|
||||
# 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
|
||||
|
||||
# cleanup
|
||||
$RM localdevenvtmp*
|
||||
#----
|
||||
cd $CURDIR
|
||||
if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||
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
|
||||
|
||||
# Now set all paths and other env variables. This will allow the rest of
|
||||
# the configure script to find and run the compiler in the proper way.
|
||||
AC_MSG_NOTICE([Setting extracted environment variables])
|
||||
. $OUTPUT_ROOT/localdevenv.sh
|
||||
else
|
||||
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
|
||||
fi
|
||||
|
||||
# At this point, we should have corrent variables in the environment, or we can't continue.
|
||||
AC_MSG_CHECKING([for Visual Studio variables])
|
||||
|
||||
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
|
||||
if test "x$INCLUDE" = x || test "x$LIB" = x; then
|
||||
AC_MSG_RESULT([present but broken])
|
||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
VS_INCLUDE="$INCLUDE"
|
||||
VS_LIB="$LIB"
|
||||
VS_PATH="$PATH"
|
||||
AC_SUBST(VS_INCLUDE)
|
||||
AC_SUBST(VS_LIB)
|
||||
AC_SUBST(VS_PATH)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
|
||||
AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
|
||||
else
|
||||
AC_MSG_NOTICE([Running the extraction script failed.])
|
||||
fi
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
|
||||
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
|
||||
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
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
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
|
||||
fi
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find msvcr100.dll !])
|
||||
fi
|
||||
AC_MSG_RESULT([$MSVCR_DLL])
|
||||
BASIC_FIXUP_PATH(MSVCR_DLL)
|
||||
])
|
@ -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"
|
||||
|
1220
common/bin/compare.sh
Normal file
1220
common/bin/compare.sh
Normal file
File diff suppressed because it is too large
Load Diff
935
common/bin/compare_exceptions.sh.incl
Normal file
935
common/bin/compare_exceptions.sh.incl
Normal file
@ -0,0 +1,935 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# This script is not to be run as stand-alone, it should be included from
|
||||
# compare.sh.
|
||||
|
||||
##########################################################################################
|
||||
# Check that we are run via inclusion from compare.sh and not as stand-alone.
|
||||
if [ -z "$COMPARE_EXCEPTIONS_INCLUDE" ]; then
|
||||
echo "Error: This script should not be run as stand-alone. It is included by compare.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Diff exceptions
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/i386/client/libjvm.so
|
||||
./jre/lib/i386/libattach.so
|
||||
./jre/lib/i386/libdt_socket.so
|
||||
./jre/lib/i386/libhprof.so
|
||||
./jre/lib/i386/libinstrument.so
|
||||
./jre/lib/i386/libjava_crw_demo.so
|
||||
./jre/lib/i386/libjsdt.so
|
||||
./jre/lib/i386/libmanagement.so
|
||||
./jre/lib/i386/libnpt.so
|
||||
./jre/lib/i386/libverify.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/amd64/libattach.so
|
||||
./jre/lib/amd64/libdt_socket.so
|
||||
./jre/lib/amd64/libhprof.so
|
||||
./jre/lib/amd64/libinstrument.so
|
||||
./jre/lib/amd64/libjava_crw_demo.so
|
||||
./jre/lib/amd64/libjsdt.so
|
||||
./jre/lib/amd64/libjsig.so
|
||||
./jre/lib/amd64/libmanagement.so
|
||||
./jre/lib/amd64/libnpt.so
|
||||
./jre/lib/amd64/libsaproc.so
|
||||
./jre/lib/amd64/libverify.so
|
||||
./jre/lib/amd64/server/libjsig.so
|
||||
./jre/lib/amd64/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/i386/jexec
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/i386/client/libjvm.so
|
||||
./jre/lib/i386/libsaproc.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/i386/client/libjvm.so
|
||||
./jre/lib/i386/jli/libjli.so
|
||||
./jre/lib/i386/libJdbcOdbc.so
|
||||
./jre/lib/i386/libattach.so
|
||||
./jre/lib/i386/libawt.so
|
||||
./jre/lib/i386/libawt_headless.so
|
||||
./jre/lib/i386/libawt_xawt.so
|
||||
./jre/lib/i386/libdcpr.so
|
||||
./jre/lib/i386/libdt_socket.so
|
||||
./jre/lib/i386/libfontmanager.so
|
||||
./jre/lib/i386/libhprof.so
|
||||
./jre/lib/i386/libinstrument.so
|
||||
./jre/lib/i386/libj2gss.so
|
||||
./jre/lib/i386/libj2pcsc.so
|
||||
./jre/lib/i386/libj2pkcs11.so
|
||||
./jre/lib/i386/libj2ucrypto.so
|
||||
./jre/lib/i386/libjaas_unix.so
|
||||
./jre/lib/i386/libjava.so
|
||||
./jre/lib/i386/libjava_crw_demo.so
|
||||
./jre/lib/i386/libjawt.so
|
||||
./jre/lib/i386/libjdwp.so
|
||||
./jre/lib/i386/libjfr.so
|
||||
./jre/lib/i386/libjpeg.so
|
||||
./jre/lib/i386/libjsdt.so
|
||||
./jre/lib/i386/libjsound.so
|
||||
./jre/lib/i386/libkcms.so
|
||||
./jre/lib/i386/liblcms.so
|
||||
./jre/lib/i386/libmanagement.so
|
||||
./jre/lib/i386/libmlib_image.so
|
||||
./jre/lib/i386/libnet.so
|
||||
./jre/lib/i386/libnio.so
|
||||
./jre/lib/i386/libnpt.so
|
||||
./jre/lib/i386/libsctp.so
|
||||
./jre/lib/i386/libsplashscreen.so
|
||||
./jre/lib/i386/libsunec.so
|
||||
./jre/lib/i386/libsunwjdga.so
|
||||
./jre/lib/i386/libt2k.so
|
||||
./jre/lib/i386/libunpack.so
|
||||
./jre/lib/i386/libverify.so
|
||||
./jre/lib/i386/libzip.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/unpack200
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
./jre/bin/unpack200
|
||||
./jre/lib/i386/jexec
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/amd64/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/amd64/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/amd64/libhprof.so
|
||||
./demo/jvmti/minst/lib/amd64/libminst.so
|
||||
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/amd64/libwaiters.so
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/amd64/server/libjvm.so
|
||||
./jre/lib/amd64/libsaproc.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/amd64/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/amd64/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/amd64/libhprof.so
|
||||
./demo/jvmti/minst/lib/amd64/libminst.so
|
||||
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/amd64/libwaiters.so
|
||||
./jre/lib/amd64/jli/libjli.so
|
||||
./jre/lib/amd64/libJdbcOdbc.so
|
||||
./jre/lib/amd64/libattach.so
|
||||
./jre/lib/amd64/libawt.so
|
||||
./jre/lib/amd64/libawt_headless.so
|
||||
./jre/lib/amd64/libawt_xawt.so
|
||||
./jre/lib/amd64/libdcpr.so
|
||||
./jre/lib/amd64/libdt_socket.so
|
||||
./jre/lib/amd64/libfontmanager.so
|
||||
./jre/lib/amd64/libhprof.so
|
||||
./jre/lib/amd64/libinstrument.so
|
||||
./jre/lib/amd64/libj2gss.so
|
||||
./jre/lib/amd64/libj2pcsc.so
|
||||
./jre/lib/amd64/libj2pkcs11.so
|
||||
./jre/lib/amd64/libj2ucrypto.so
|
||||
./jre/lib/amd64/libjaas_unix.so
|
||||
./jre/lib/amd64/libjava.so
|
||||
./jre/lib/amd64/libjava_crw_demo.so
|
||||
./jre/lib/amd64/libjawt.so
|
||||
./jre/lib/amd64/libjdwp.so
|
||||
./jre/lib/amd64/libjfr.so
|
||||
./jre/lib/amd64/libjpeg.so
|
||||
./jre/lib/amd64/libjsdt.so
|
||||
./jre/lib/amd64/libjsound.so
|
||||
./jre/lib/amd64/libkcms.so
|
||||
./jre/lib/amd64/liblcms.so
|
||||
./jre/lib/amd64/libmanagement.so
|
||||
./jre/lib/amd64/libmlib_image.so
|
||||
./jre/lib/amd64/libnet.so
|
||||
./jre/lib/amd64/libnio.so
|
||||
./jre/lib/amd64/libnpt.so
|
||||
./jre/lib/amd64/libsctp.so
|
||||
./jre/lib/amd64/libsplashscreen.so
|
||||
./jre/lib/amd64/libsunec.so
|
||||
./jre/lib/amd64/libsunwjdga.so
|
||||
./jre/lib/amd64/libt2k.so
|
||||
./jre/lib/amd64/libunpack.so
|
||||
./jre/lib/amd64/libverify.so
|
||||
./jre/lib/amd64/libzip.so
|
||||
./jre/lib/amd64/server/64/libjvm_db.so
|
||||
./jre/lib/amd64/server/64/libjvm_dtrace.so
|
||||
./bin/amd64/appletviewer
|
||||
./bin/amd64/extcheck
|
||||
./bin/amd64/idlj
|
||||
./bin/amd64/jar
|
||||
./bin/amd64/jarsigner
|
||||
./bin/amd64/java
|
||||
./bin/amd64/javac
|
||||
./bin/amd64/javadoc
|
||||
./bin/amd64/javah
|
||||
./bin/amd64/javap
|
||||
./bin/amd64/jcmd
|
||||
./bin/amd64/jconsole
|
||||
./bin/amd64/jdb
|
||||
./bin/amd64/jhat
|
||||
./bin/amd64/jinfo
|
||||
./bin/amd64/jmap
|
||||
./bin/amd64/jps
|
||||
./bin/amd64/jrunscript
|
||||
./bin/amd64/jsadebugd
|
||||
./bin/amd64/jstack
|
||||
./bin/amd64/jstat
|
||||
./bin/amd64/jstatd
|
||||
./bin/amd64/keytool
|
||||
./bin/amd64/native2ascii
|
||||
./bin/amd64/orbd
|
||||
./bin/amd64/pack200
|
||||
./bin/amd64/policytool
|
||||
./bin/amd64/rmic
|
||||
./bin/amd64/rmid
|
||||
./bin/amd64/rmiregistry
|
||||
./bin/amd64/schemagen
|
||||
./bin/amd64/serialver
|
||||
./bin/amd64/servertool
|
||||
./bin/amd64/tnameserv
|
||||
./bin/amd64/unpack200
|
||||
./bin/amd64/wsgen
|
||||
./bin/amd64/wsimport
|
||||
./bin/amd64/xjc
|
||||
./jre/bin/amd64/java
|
||||
./jre/bin/amd64/keytool
|
||||
./jre/bin/amd64/orbd
|
||||
./jre/bin/amd64/pack200
|
||||
./jre/bin/amd64/policytool
|
||||
./jre/bin/amd64/rmid
|
||||
./jre/bin/amd64/rmiregistry
|
||||
./jre/bin/amd64/servertool
|
||||
./jre/bin/amd64/tnameserv
|
||||
./jre/bin/amd64/unpack200
|
||||
./jre/lib/amd64/jexec
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparc" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/sparc/jexec
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/sparc/client/64/libjvm_db.so
|
||||
./jre/lib/sparc/client/64/libjvm_dtrace.so
|
||||
./jre/lib/sparc/client/libjsig.so
|
||||
./jre/lib/sparc/client/libjvm.so
|
||||
./jre/lib/sparc/client/libjvm_db.so
|
||||
./jre/lib/sparc/client/libjvm_dtrace.so
|
||||
./jre/lib/sparc/libjsig.so
|
||||
./jre/lib/sparc/libsaproc.so
|
||||
./jre/lib/sparc/server/64/libjvm_db.so
|
||||
./jre/lib/sparc/server/64/libjvm_dtrace.so
|
||||
./jre/lib/sparc/server/libjsig.so
|
||||
./jre/lib/sparc/server/libjvm.so
|
||||
./jre/lib/sparc/server/libjvm_db.so
|
||||
./jre/lib/sparc/server/libjvm_dtrace.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/sparc/client/libjvm.so
|
||||
./jre/lib/sparc/jli/libjli.so
|
||||
./jre/lib/sparc/libJdbcOdbc.so
|
||||
./jre/lib/sparc/libattach.so
|
||||
./jre/lib/sparc/libawt.so
|
||||
./jre/lib/sparc/libawt_headless.so
|
||||
./jre/lib/sparc/libawt_xawt.so
|
||||
./jre/lib/sparc/libdcpr.so
|
||||
./jre/lib/sparc/libdt_socket.so
|
||||
./jre/lib/sparc/libfontmanager.so
|
||||
./jre/lib/sparc/libhprof.so
|
||||
./jre/lib/sparc/libinstrument.so
|
||||
./jre/lib/sparc/libj2gss.so
|
||||
./jre/lib/sparc/libj2pcsc.so
|
||||
./jre/lib/sparc/libj2pkcs11.so
|
||||
./jre/lib/sparc/libj2ucrypto.so
|
||||
./jre/lib/sparc/libjaas_unix.so
|
||||
./jre/lib/sparc/libjava.so
|
||||
./jre/lib/sparc/libjava_crw_demo.so
|
||||
./jre/lib/sparc/libjawt.so
|
||||
./jre/lib/sparc/libjdwp.so
|
||||
./jre/lib/sparc/libjfr.so
|
||||
./jre/lib/sparc/libjpeg.so
|
||||
./jre/lib/sparc/libjsdt.so
|
||||
./jre/lib/sparc/libjsound.so
|
||||
./jre/lib/sparc/libkcms.so
|
||||
./jre/lib/sparc/liblcms.so
|
||||
./jre/lib/sparc/libmanagement.so
|
||||
./jre/lib/sparc/libmlib_image.so
|
||||
./jre/lib/sparc/libmlib_image_v.so
|
||||
./jre/lib/sparc/libnet.so
|
||||
./jre/lib/sparc/libnio.so
|
||||
./jre/lib/sparc/libnpt.so
|
||||
./jre/lib/sparc/libsctp.so
|
||||
./jre/lib/sparc/libsplashscreen.so
|
||||
./jre/lib/sparc/libsunec.so
|
||||
./jre/lib/sparc/libsunwjdga.so
|
||||
./jre/lib/sparc/libt2k.so
|
||||
./jre/lib/sparc/libunpack.so
|
||||
./jre/lib/sparc/libverify.so
|
||||
./jre/lib/sparc/libzip.so
|
||||
./jre/lib/sparc/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/unpack200
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
./jre/bin/unpack200
|
||||
./jre/lib/sparc/jexec
|
||||
"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
# Some numbers differ randomly.
|
||||
DIS_DIFF_FILTER="$SED -e s/\$[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].\)[0-9a-f][0-9a-f]/\1<NUM>/g -e s/\(%g1,.0x\)[0-9a-f]*\(,.%g1\)/\1<HEX>\2/g -e s/\(!.\)[0-9a-f]*\(.<SUNWprivate_1.1+0x\)[0-9a-f]*/\1<NUM>\2<HEX>/g"
|
||||
|
||||
# Some xor instructions end up with different args in the lib but not in the object files.
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/sparcv9/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/sparcv9/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/sparcv9/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/sparcv9/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/sparcv9/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/sparcv9/libhprof.so
|
||||
./demo/jvmti/minst/lib/sparcv9/libminst.so
|
||||
./demo/jvmti/mtrace/lib/sparcv9/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/sparcv9/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
./jre/lib/sparcv9/libjsig.so
|
||||
./jre/lib/sparcv9/libsaproc.so
|
||||
./jre/lib/sparcv9/server/libjvm.so
|
||||
./jre/lib/sparcv9/server/libjvm_dtrace.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/sparcv9/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/sparcv9/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/sparcv9/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/sparcv9/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/sparcv9/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/sparcv9/libhprof.so
|
||||
./demo/jvmti/minst/lib/sparcv9/libminst.so
|
||||
./demo/jvmti/mtrace/lib/sparcv9/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/sparcv9/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
./jre/lib/sparcv9/client/libjvm.so
|
||||
./jre/lib/sparcv9/jli/libjli.so
|
||||
./jre/lib/sparcv9/libJdbcOdbc.so
|
||||
./jre/lib/sparcv9/libattach.so
|
||||
./jre/lib/sparcv9/libawt.so
|
||||
./jre/lib/sparcv9/libawt_headless.so
|
||||
./jre/lib/sparcv9/libawt_xawt.so
|
||||
./jre/lib/sparcv9/libdcpr.so
|
||||
./jre/lib/sparcv9/libdt_socket.so
|
||||
./jre/lib/sparcv9/libfontmanager.so
|
||||
./jre/lib/sparcv9/libhprof.so
|
||||
./jre/lib/sparcv9/libinstrument.so
|
||||
./jre/lib/sparcv9/libj2gss.so
|
||||
./jre/lib/sparcv9/libj2pcsc.so
|
||||
./jre/lib/sparcv9/libj2pkcs11.so
|
||||
./jre/lib/sparcv9/libj2ucrypto.so
|
||||
./jre/lib/sparcv9/libjaas_unix.so
|
||||
./jre/lib/sparcv9/libjava.so
|
||||
./jre/lib/sparcv9/libjava_crw_demo.so
|
||||
./jre/lib/sparcv9/libjawt.so
|
||||
./jre/lib/sparcv9/libjdwp.so
|
||||
./jre/lib/sparcv9/libjfr.so
|
||||
./jre/lib/sparcv9/libjpeg.so
|
||||
./jre/lib/sparcv9/libjsdt.so
|
||||
./jre/lib/sparcv9/libjsound.so
|
||||
./jre/lib/sparcv9/libkcms.so
|
||||
./jre/lib/sparcv9/liblcms.so
|
||||
./jre/lib/sparcv9/libmanagement.so
|
||||
./jre/lib/sparcv9/libmlib_image.so
|
||||
./jre/lib/sparcv9/libmlib_image_v.so
|
||||
./jre/lib/sparcv9/libnet.so
|
||||
./jre/lib/sparcv9/libnio.so
|
||||
./jre/lib/sparcv9/libnpt.so
|
||||
./jre/lib/sparcv9/libsctp.so
|
||||
./jre/lib/sparcv9/libsplashscreen.so
|
||||
./jre/lib/sparcv9/libsunec.so
|
||||
./jre/lib/sparcv9/libsunwjdga.so
|
||||
./jre/lib/sparcv9/libt2k.so
|
||||
./jre/lib/sparcv9/libunpack.so
|
||||
./jre/lib/sparcv9/libverify.so
|
||||
./jre/lib/sparcv9/libzip.so
|
||||
./jre/lib/sparcv9/server/libjvm.so
|
||||
./bin/sparcv9/appletviewer
|
||||
./bin/sparcv9/extcheck
|
||||
./bin/sparcv9/idlj
|
||||
./bin/sparcv9/jar
|
||||
./bin/sparcv9/jarsigner
|
||||
./bin/sparcv9/java
|
||||
./bin/sparcv9/javac
|
||||
./bin/sparcv9/javadoc
|
||||
./bin/sparcv9/javah
|
||||
./bin/sparcv9/javap
|
||||
./bin/sparcv9/jcmd
|
||||
./bin/sparcv9/jconsole
|
||||
./bin/sparcv9/jdb
|
||||
./bin/sparcv9/jhat
|
||||
./bin/sparcv9/jinfo
|
||||
./bin/sparcv9/jmap
|
||||
./bin/sparcv9/jps
|
||||
./bin/sparcv9/jrunscript
|
||||
./bin/sparcv9/jsadebugd
|
||||
./bin/sparcv9/jstack
|
||||
./bin/sparcv9/jstat
|
||||
./bin/sparcv9/jstatd
|
||||
./bin/sparcv9/keytool
|
||||
./bin/sparcv9/native2ascii
|
||||
./bin/sparcv9/orbd
|
||||
./bin/sparcv9/pack200
|
||||
./bin/sparcv9/policytool
|
||||
./bin/sparcv9/rmic
|
||||
./bin/sparcv9/rmid
|
||||
./bin/sparcv9/rmiregistry
|
||||
./bin/sparcv9/schemagen
|
||||
./bin/sparcv9/serialver
|
||||
./bin/sparcv9/servertool
|
||||
./bin/sparcv9/tnameserv
|
||||
./bin/sparcv9/unpack200
|
||||
./bin/sparcv9/wsgen
|
||||
./bin/sparcv9/wsimport
|
||||
./bin/sparcv9/xjc
|
||||
./jre/bin/sparcv9/java
|
||||
./jre/bin/sparcv9/keytool
|
||||
./jre/bin/sparcv9/orbd
|
||||
./jre/bin/sparcv9/pack200
|
||||
./jre/bin/sparcv9/policytool
|
||||
./jre/bin/sparcv9/rmid
|
||||
./jre/bin/sparcv9/rmiregistry
|
||||
./jre/bin/sparcv9/servertool
|
||||
./jre/bin/sparcv9/tnameserv
|
||||
./jre/bin/sparcv9/unpack200
|
||||
"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
# Some numbers differ randomly.
|
||||
DIS_DIFF_FILTER="$SED -e s/\$[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(%g1,.0x\)[0-9a-f]*\(,.%g1\)/\1<HEX>\2/g -e s/\(!.\)[0-9a-f]*\(.<SUNWprivate_1.1+0x\)[0-9a-f]*/\1<NUM>\2<HEX>/g"
|
||||
|
||||
# Some xor instructions end up with different args in the lib but not in the object files.
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
|
||||
# Probably should add all libs here
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jvmti/gctest/lib/gctest.dll
|
||||
./demo/jvmti/heapTracker/lib/heapTracker.dll
|
||||
./demo/jvmti/minst/lib/minst.dll
|
||||
./jre/bin/attach.dll
|
||||
./jre/bin/java_crw_demo.dll
|
||||
./jre/bin/jsoundds.dll
|
||||
./bin/appletviewer.exe
|
||||
./bin/extcheck.exe
|
||||
./bin/idlj.exe
|
||||
./bin/jar.exe
|
||||
./bin/jarsigner.exe
|
||||
./bin/java-rmi.exe
|
||||
./bin/java.exe
|
||||
./bin/javac.exe
|
||||
./bin/javadoc.exe
|
||||
./bin/javah.exe
|
||||
./bin/javap.exe
|
||||
./bin/javaw.exe
|
||||
./bin/jcmd.exe
|
||||
./bin/jconsole.exe
|
||||
./bin/jdb.exe
|
||||
./bin/jhat.exe
|
||||
./bin/jinfo.exe
|
||||
./bin/jmap.exe
|
||||
./bin/jps.exe
|
||||
./bin/jrunscript.exe
|
||||
./bin/jsadebugd.exe
|
||||
./bin/jstack.exe
|
||||
./bin/jstat.exe
|
||||
./bin/jstatd.exe
|
||||
./bin/keytool.exe
|
||||
./bin/kinit.exe
|
||||
./bin/klist.exe
|
||||
./bin/ktab.exe
|
||||
./bin/native2ascii.exe
|
||||
./bin/orbd.exe
|
||||
./bin/pack200.exe
|
||||
./bin/policytool.exe
|
||||
./bin/rmic.exe
|
||||
./bin/rmid.exe
|
||||
./bin/rmiregistry.exe
|
||||
./bin/schemagen.exe
|
||||
./bin/serialver.exe
|
||||
./bin/servertool.exe
|
||||
./bin/tnameserv.exe
|
||||
./bin/unpack200.exe
|
||||
./bin/wsgen.exe
|
||||
./bin/wsimport.exe
|
||||
./bin/xjc.exe
|
||||
./jre/bin/java-rmi.exe
|
||||
./jre/bin/java.exe
|
||||
./jre/bin/javaw.exe
|
||||
./jre/bin/keytool.exe
|
||||
./jre/bin/kinit.exe
|
||||
./jre/bin/klist.exe
|
||||
./jre/bin/ktab.exe
|
||||
./jre/bin/orbd.exe
|
||||
./jre/bin/pack200.exe
|
||||
./jre/bin/policytool.exe
|
||||
./jre/bin/rmid.exe
|
||||
./jre/bin/rmiregistry.exe
|
||||
./jre/bin/servertool.exe
|
||||
./jre/bin/tnameserv.exe
|
||||
./jre/bin/unpack200.exe
|
||||
"
|
||||
|
||||
# On windows, there are unavoidable allignment issues making
|
||||
# a perfect disasm diff impossible. Filter out the following:
|
||||
# * Random parts of C++ symbols (this is a bit greedy, but does the trick)
|
||||
# @XXXXX
|
||||
# * Hexadecimal addresses that are sometimes alligned differently.
|
||||
# * Dates in version strings XXXX_XX_XX.
|
||||
DIS_DIFF_FILTER="$SED -e s/[@?][A-Z0-9_]\{1,25\}/<SYM>/g -e s/^.\{2,2\}[0-9A-F]\{16,16\}.\{2,2\}//g -e s/[0-9A-F]\{4,16\}h/<HEXSTR>/g -e s/_[0-9]\{4,4\}_[0-9][0-9]_[0-9][0-9]/<DATE>/g"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
ACCEPTED_JARZIP_CONTENTS="
|
||||
/META-INF/INDEX.LIST
|
||||
"
|
||||
|
||||
KNOWN_BIN_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
./jre/lib/libsaproc.dylib
|
||||
./jre/lib/server/libjvm.dylib
|
||||
"
|
||||
|
||||
KNOWN_SIZE_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_SYM_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_ELF_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_DIS_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
fi
|
@ -1,335 +0,0 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# MANUAL
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image
|
||||
#
|
||||
# Compare the directory structure.
|
||||
# Compare the filenames in the directories.
|
||||
# Compare the contents of the zip archives
|
||||
# Compare the contents of the jar archives
|
||||
# Compare the native libraries
|
||||
# Compare the native executables
|
||||
# Compare the remaining files
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]
|
||||
#
|
||||
# Compare only the selected subset of the images.
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar
|
||||
#
|
||||
# Compare only the CodePointIM.jar file
|
||||
# Can be used to compare zips, libraries and executables.
|
||||
#
|
||||
|
||||
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image"
|
||||
echo ""
|
||||
echo "Compare the directory structure."
|
||||
echo "Compare the filenames in the directories."
|
||||
echo "Compare the contents of the zip archives"
|
||||
echo "Compare the contents of the jar archives"
|
||||
echo "Compare the native libraries"
|
||||
echo "Compare the native executables"
|
||||
echo "Compare the remaining files"
|
||||
echo ""
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
|
||||
echo ""
|
||||
echo "Compare only the selected subset of the images."
|
||||
echo ""
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
|
||||
echo ""
|
||||
echo "Compare only the CodePointIM.jar file"
|
||||
echo "Can be used to compare zips, libraries and executables."
|
||||
exit 10
|
||||
fi
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
CMD="$3"
|
||||
|
||||
DIFF_RESULT=0
|
||||
|
||||
CMP_ZIPS=false
|
||||
CMP_JARS=false
|
||||
CMP_LIBS=false
|
||||
CMP_EXECS=false
|
||||
CMP_OTHER=false
|
||||
|
||||
FILTER="cat"
|
||||
|
||||
if [ -n "$CMD" ]; then
|
||||
case "$CMD" in
|
||||
zips)
|
||||
CMP_ZIPS=true
|
||||
;;
|
||||
jars)
|
||||
CMP_JARS=true
|
||||
;;
|
||||
libs)
|
||||
CMP_LIBS=true
|
||||
;;
|
||||
execs)
|
||||
CMP_EXECS=true
|
||||
;;
|
||||
other)
|
||||
CMP_OTHER=true
|
||||
;;
|
||||
*)
|
||||
CMP_ZIPS=true
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
CMP_OTHER=true
|
||||
FILTER="grep $3"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
CMP_ZIPS=true
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
CMP_OTHER=true
|
||||
fi
|
||||
|
||||
DIFFJARZIP="/bin/bash `dirname $0`/diffjarzip.sh"
|
||||
DIFFLIB="/bin/bash `dirname $0`/difflib.sh"
|
||||
DIFFEXEC="/bin/bash `dirname $0`/diffexec.sh"
|
||||
export COMPARE_ROOT=/tmp/cimages.$USER
|
||||
mkdir -p $COMPARE_ROOT
|
||||
|
||||
# Load the correct exception list.
|
||||
case "`uname -s`" in
|
||||
Linux)
|
||||
. `dirname $0`/exception_list_linux
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo Comparing $OLD to $NEW
|
||||
echo
|
||||
|
||||
(cd $OLD && find . -type d | sort > $COMPARE_ROOT/from_dirs)
|
||||
(cd $NEW && find . -type d | sort > $COMPARE_ROOT/to_dirs)
|
||||
|
||||
echo -n Directory structure...
|
||||
if diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs > /dev/null; then
|
||||
echo Identical!
|
||||
else
|
||||
echo Differences found.
|
||||
DIFF_RESULT=1
|
||||
# Differences in directories found.
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
|
||||
fi
|
||||
fi
|
||||
|
||||
(cd $OLD && find . -type f | sort > $COMPARE_ROOT/from_files)
|
||||
(cd $NEW && find . -type f | sort > $COMPARE_ROOT/to_files)
|
||||
|
||||
echo -n File names...
|
||||
if diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files > /dev/null; then
|
||||
echo Identical!
|
||||
else
|
||||
echo Differences found.
|
||||
DIFF_RESULT=1
|
||||
# Differences in directories found.
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo "$ONLY_OLD" | sed 's|< ./| |g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo "$ONLY_NEW" | sed 's|> ./| |g'
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n Permissions...
|
||||
found=""
|
||||
for f in `cd $OLD && find . -type f`
|
||||
do
|
||||
if [ ! -f ${OLD}/$f ]; then continue; fi
|
||||
if [ ! -f ${NEW}/$f ]; then continue; fi
|
||||
OP=`ls -l ${OLD}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
NP=`ls -l ${NEW}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
if [ "$OP" != "$NP" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\told: ${OP} new: ${NP}\t$f\n"
|
||||
fi
|
||||
|
||||
OF=`cd ${OLD} && file $f`
|
||||
NF=`cd ${NEW} && file $f`
|
||||
if [ "$f" = "./src.zip" ]
|
||||
then
|
||||
if [ "`echo $OF | grep -ic zip`" -gt 0 -a "`echo $NF | grep -ic zip`" -gt 0 ]
|
||||
then
|
||||
# the way we produces zip-files make it so that directories are stored in old file
|
||||
# but not in new (only files with full-path)
|
||||
# this makes file-5.09 report them as different
|
||||
continue;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OF" != "$NF" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\tFILE: old: ${OF} new: ${NF}\t$f\n"
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
|
||||
GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" ! -name "*.diz" \
|
||||
| grep -v "./bin/" | sort | $FILTER)
|
||||
echo General files...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
if [ -e $NEW/$f ]; then
|
||||
DIFF_OUT=$(diff $OLD/$f $NEW/$f 2>&1)
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ "x$CMP_ZIPS" == "xtrue" ]; then
|
||||
ZIPS=$(cd $OLD && find . -type f -name "*.zip" | sort | $FILTER)
|
||||
|
||||
if [ -n "$ZIPS" ]; then
|
||||
echo Zip files...
|
||||
|
||||
for f in $ZIPS
|
||||
do
|
||||
$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW
|
||||
if [ "$?" != "0" ]; then
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$CMP_JARS" == "xtrue" ]; then
|
||||
JARS=$(cd $OLD && find . -type f -name "*.jar" -o -name "ct.sym" | sort | $FILTER)
|
||||
|
||||
if [ -n "$JARS" ]; then
|
||||
echo Jar files...
|
||||
|
||||
for f in $JARS
|
||||
do
|
||||
DIFFJAR_OUTPUT=`$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW`
|
||||
DIFFJAR_RESULT=$?
|
||||
if [ "$DIFFJAR_RESULT" != "0" ]; then
|
||||
for diff in $LIST_DIFF_JAR; do
|
||||
DIFFJAR_OUTPUT=`echo "$DIFFJAR_OUTPUT" | grep -v "$diff"`
|
||||
done
|
||||
if [ "`echo "$DIFFJAR_OUTPUT" | grep -v "Differing files in"`" != "" ]; then
|
||||
DIFF_RESULT=1
|
||||
echo "$DIFFJAR_OUTPUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$FILTER" != "xcat" ]; then
|
||||
VIEW=view
|
||||
else
|
||||
VIEW=
|
||||
fi
|
||||
|
||||
if [ "x$CMP_LIBS" == "xtrue" ]; then
|
||||
LIBS=$(cd $OLD && find . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | sort | $FILTER)
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
echo Libraries...
|
||||
for f in $LIBS
|
||||
do
|
||||
DIFFLIB_OUTPUT=`$DIFFLIB $OLD/$f $NEW/$f $OLD $NEW $VIEW`
|
||||
DIFFLIB_RESULT=$?
|
||||
if [ "$DIFFLIB_RESULT" = "0" ]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
elif [ "$DIFFLIB_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
elif [ "$DIFFLIB_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
else
|
||||
echo "$DIFFLIB_OUTPUT"
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$CMP_EXECS" == "xtrue" ]; then
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
EXECS=$(cd $OLD && find . -type f -name '*.exe' | sort | $FILTER)
|
||||
else
|
||||
EXECS=$(cd $OLD && find . -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' \) | sort | $FILTER)
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$EXECS" ]; then
|
||||
echo Executables...
|
||||
|
||||
for f in $EXECS
|
||||
do
|
||||
DIFFEXEC_OUTPUT=`$DIFFEXEC $OLD/$f $NEW/$f $OLD $NEW $VIEW`
|
||||
DIFFEXEC_RESULT=$?
|
||||
if [ "$DIFFEXEC_RESULT" = "0" ]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
elif [ "$DIFFEXEC_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
elif [ "$DIFFEXEC_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
else
|
||||
echo "$DIFFEXEC_OUTPUT"
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $DIFF_RESULT
|
@ -1,186 +0,0 @@
|
||||
#!/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 [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two executables. Return codes:"
|
||||
echo "0 - no diff"
|
||||
echo "1 - Identical symbols AND size, BUT not bytewise identical"
|
||||
echo "2 - Identical symbols BUT NEW size"
|
||||
echo "3 - Differences, content BUT SAME size"
|
||||
echo "4 - Differences, content AND size"
|
||||
echo "10 - Could not perform diff"
|
||||
echo "Use 'quiet' to disable any output."
|
||||
echo "Syntax: $0 file1 file2 [quiet]"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which nm`" ]; then
|
||||
NM=nm
|
||||
elif [ -f "`which gnm`" ]; then
|
||||
NM=gnm
|
||||
else
|
||||
echo "No nm command found"
|
||||
exit 10
|
||||
fi
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
VIEW=
|
||||
# You can do export DIFF=meld to view
|
||||
# any differences using meld instead.
|
||||
if [ -n "$DIFF" ]; then
|
||||
DIFF="$DIFF"
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
|
||||
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ "x$5" == "xview" ]; then VIEW=view; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ "x$3" == "xview" ]; then VIEW=view; fi
|
||||
fi
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
echo Identical: $OLD_NAME
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old
|
||||
NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new
|
||||
|
||||
mkdir -p $(dirname $OLD_SYMBOLS)
|
||||
mkdir -p $(dirname $NEW_SYMBOLS)
|
||||
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
|
||||
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
|
||||
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
|
||||
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
|
||||
else
|
||||
# Strip the addresses, just compare the ordering of the symbols.
|
||||
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
|
||||
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
|
||||
# But store the full information for easy diff access.
|
||||
$NM $OLD > $OLD_SYMBOLS.full
|
||||
$NM $NEW > $NEW_SYMBOLS.full
|
||||
fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
|
||||
fi
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
||||
|
@ -1,155 +0,0 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# Simple tool to diff two jar or zip files. It unpacks the jar/zip files and
|
||||
# reports if files differs and if files are new or missing.
|
||||
# Assumes gnu diff.
|
||||
|
||||
# There are a few source files that have DOS line endings in the
|
||||
# jaxp/jaxws source drops, when the sources were added to the repository
|
||||
# the source files were converted to UNIX line endings.
|
||||
# For now we ignore these differences.
|
||||
DIFF_FLAGS="--strip-trailing-cr"
|
||||
#set -x
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two jar/zip files. Return codes: 0 - no diff, 1 - diff, 2 - couldn't perform diff"
|
||||
echo "Syntax: $0 old_archive new_archive [old_root new_root]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 2
|
||||
fi
|
||||
|
||||
IGNORES="cat"
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ $# == 5 ]; then IGNORES="$5"; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ $# == 3 ]; then IGNORES="$3"; fi
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which gdiff`" ]; then
|
||||
DIFF=gdiff
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
|
||||
OLD_SUFFIX="${OLD##*.}"
|
||||
NEW_SUFFIX="${NEW##*.}"
|
||||
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "zip" ] && [ "$OLD_SUFFIX" != "jar" ] && [ "$OLD_SUFFIX" != "sym" ]; then
|
||||
echo The files have to be zip, jar or sym! They are $OLD_SUFFIX
|
||||
exit 2
|
||||
fi
|
||||
|
||||
UNARCHIVE="unzip -q"
|
||||
|
||||
TYPE="$OLD_SUFFIX"
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Not quite identical, the might still contain the same data.
|
||||
# Unpack the jar/zip files in temp dirs
|
||||
if test "x$COMPARE_ROOT" == "x"; then
|
||||
COMPARE_ROOT=/tmp/compare_root.$$
|
||||
REMOVE_COMPARE_ROOT=true
|
||||
fi
|
||||
OLD_TEMPDIR=$COMPARE_ROOT/$OLD_NAME.old
|
||||
NEW_TEMPDIR=$COMPARE_ROOT/$NEW_NAME.new
|
||||
mkdir -p $OLD_TEMPDIR
|
||||
mkdir -p $NEW_TEMPDIR
|
||||
(cd $OLD_TEMPDIR && rm -rf * ; $UNARCHIVE $OLD)
|
||||
(cd $NEW_TEMPDIR && rm -rf * ; $UNARCHIVE $NEW)
|
||||
|
||||
ONLY1=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR")
|
||||
|
||||
if [ -n "$ONLY1" ]; then
|
||||
echo " Only the OLD $OLD_NAME contains:"
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR" \
|
||||
| sed "s|Only in $OLD_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
ONLY2=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR")
|
||||
|
||||
if [ -n "$ONLY2" ]; then
|
||||
echo " Only the NEW $NEW_NAME contains:"
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR" \
|
||||
| sed "s|Only in $NEW_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
DIFFTEXT="/bin/bash `dirname $0`/difftext.sh"
|
||||
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep differ | cut -f 2,4 -d ' ' | \
|
||||
awk "{ print \"$DIFFTEXT \"\$1\" \"\$2 }" > $COMPARE_ROOT/diffing
|
||||
|
||||
/bin/bash $COMPARE_ROOT/diffing > $COMPARE_ROOT/diffs
|
||||
|
||||
if [ -s "$COMPARE_ROOT/diffs" ]; then
|
||||
echo " Differing files in $OLD_NAME"
|
||||
cat $COMPARE_ROOT/diffs | grep differ | $IGNORES | cut -f 2 -d ' ' | \
|
||||
sed "s|$OLD_TEMPDIR| |g"
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
|
||||
if [ "x$REMOVE_COMPARE_ROOT" == xtrue ]; then
|
||||
rm -rf $REMOVE_COMPARE_ROOT
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
@ -1,207 +0,0 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# Simple tool to diff two shared libraries.
|
||||
# Criterias: two shared libraries are considered equal if:
|
||||
# the file sizes are the same AND the symbols outputs from the nm command are equal
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two shared libs. Return codes:"
|
||||
echo "0 - no diff"
|
||||
echo "1 - Identical symbols AND size, BUT not bytewise identical"
|
||||
echo "2 - Identical symbols BUT NEW size"
|
||||
echo "3 - Differences, content BUT SAME size"
|
||||
echo "4 - Differences, content AND size"
|
||||
echo "10 - Could not perform diff"
|
||||
echo "Use 'quiet' to disable any output."
|
||||
echo "Syntax: $0 file1 file2 [quiet]"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which gnm`" ]; then
|
||||
NM=gnm
|
||||
# Jonas 2012-05-29: solaris native nm produces radically different output than gnm
|
||||
# so if using that...we need different filter than "cut -f 2-"
|
||||
#
|
||||
elif [ -f "`which nm`" ]; then
|
||||
NM=nm
|
||||
else
|
||||
echo "No nm command found"
|
||||
exit 10
|
||||
fi
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
VIEW=
|
||||
# You can do export DIFF=meld to view
|
||||
# any differences using meld instead.
|
||||
if [ -n "$DIFF" ]; then
|
||||
DIFF="$DIFF"
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
|
||||
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ "x$5" == "xview" ]; then VIEW=view; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ "x$3" == "xview" ]; then VIEW=view; fi
|
||||
fi
|
||||
|
||||
OLD_SUFFIX="${OLD##*.}"
|
||||
NEW_SUFFIX="${NEW##*.}"
|
||||
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "so" ] && [ "$OLD_SUFFIX" != "dylib" ] && [ "$OLD_SUFFIX" != "dll" ]; then
|
||||
echo The files have to be .so, .dylib or .dll! They are $OLD_SUFFIX
|
||||
exit 10
|
||||
fi
|
||||
|
||||
TYPE="$OLD_SUFFIX"
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
echo Identical: $OLD_NAME
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SYMBOLS=$COMPARE_ROOT/nm.$OLD_NAME.old
|
||||
NEW_SYMBOLS=$COMPARE_ROOT/nm.$NEW_NAME.new
|
||||
|
||||
mkdir -p $(dirname $OLD_SYMBOLS)
|
||||
mkdir -p $(dirname $NEW_SYMBOLS)
|
||||
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
|
||||
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
|
||||
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
|
||||
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
|
||||
else
|
||||
# Strip the addresses, just compare the ordering of the symbols.
|
||||
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
|
||||
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
|
||||
# But store the full information for easy diff access.
|
||||
$NM $OLD > $OLD_SYMBOLS.full
|
||||
$NM $NEW > $NEW_SYMBOLS.full
|
||||
fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
|
||||
fi
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
||||
|
@ -1,157 +0,0 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# The difftext.sh knows how to compare text files and
|
||||
# ignore some specific differences.
|
||||
# When difftext.sh is called, we already know that the
|
||||
# files differ. But if the tests below trigger, then
|
||||
# we ignore differences caused by:
|
||||
#
|
||||
# Timestamps in Java sources generated by idl2java
|
||||
# Sorting order and cleanup style in .properties files.
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
SUF="${OLD##*.}"
|
||||
TMP=1
|
||||
if test "x$SUF" == "xjava"; then
|
||||
TMP=$(LANG=C diff $OLD $NEW | \
|
||||
grep '^[<>]' | \
|
||||
sed '/[<>] \* from.*\.idl/d' | \
|
||||
sed '/[<>] \*.*201[12].*/d' | \
|
||||
sed '/\/\/ Generated from input file.*/d' | \
|
||||
sed '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' | \
|
||||
sed '/\/\/ java GenerateCharacter.*/d')
|
||||
fi
|
||||
if test "x$SUF" == "xproperties"; then
|
||||
cat $OLD | sed -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003A/\x3A/g' \
|
||||
-e 's/\\u006B/\x6B/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00A0/\xA0/g' \
|
||||
-e 's/\\u00A3/\xA3/g' \
|
||||
-e 's/\\u00B0/\xB0/g' \
|
||||
-e 's/\\u00B7/\xB7/g' \
|
||||
-e 's/\\u00BA/\xBA/g' \
|
||||
-e 's/\\u00BF/\xBF/g' \
|
||||
-e 's/\\u00C0/\xC0/g' \
|
||||
-e 's/\\u00C1/\xC1/g' \
|
||||
-e 's/\\u00C2/\xC2/g' \
|
||||
-e 's/\\u00C4/\xC4/g' \
|
||||
-e 's/\\u00C5/\xC5/g' \
|
||||
-e 's/\\u00C8/\xC8/g' \
|
||||
-e 's/\\u00C9/\xC9/g' \
|
||||
-e 's/\\u00CA/\xCA/g' \
|
||||
-e 's/\\u00CD/\xCD/g' \
|
||||
-e 's/\\u00CE/\xCE/g' \
|
||||
-e 's/\\u00D3/\xD3/g' \
|
||||
-e 's/\\u00D4/\xD4/g' \
|
||||
-e 's/\\u00D6/\xD6/g' \
|
||||
-e 's/\\u00DA/\xDA/g' \
|
||||
-e 's/\\u00DC/\xDC/g' \
|
||||
-e 's/\\u00DD/\xDD/g' \
|
||||
-e 's/\\u00DF/\xDF/g' \
|
||||
-e 's/\\u00E0/\xE0/g' \
|
||||
-e 's/\\u00E1/\xE1/g' \
|
||||
-e 's/\\u00E2/\xE2/g' \
|
||||
-e 's/\\u00E3/\xE3/g' \
|
||||
-e 's/\\u00E4/\xE4/g' \
|
||||
-e 's/\\u00E5/\xE5/g' \
|
||||
-e 's/\\u00E6/\xE6/g' \
|
||||
-e 's/\\u00E7/\xE7/g' \
|
||||
-e 's/\\u00E8/\xE8/g' \
|
||||
-e 's/\\u00E9/\xE9/g' \
|
||||
-e 's/\\u00EA/\xEA/g' \
|
||||
-e 's/\\u00EB/\xEB/g' \
|
||||
-e 's/\\u00EC/\xEC/g' \
|
||||
-e 's/\\u00ED/\xED/g' \
|
||||
-e 's/\\u00EE/\xEE/g' \
|
||||
-e 's/\\u00EF/\xEF/g' \
|
||||
-e 's/\\u00F1/\xF1/g' \
|
||||
-e 's/\\u00F2/\xF2/g' \
|
||||
-e 's/\\u00F3/\xF3/g' \
|
||||
-e 's/\\u00F4/\xF4/g' \
|
||||
-e 's/\\u00F5/\xF5/g' \
|
||||
-e 's/\\u00F6/\xF6/g' \
|
||||
-e 's/\\u00F9/\xF9/g' \
|
||||
-e 's/\\u00FA/\xFA/g' \
|
||||
-e 's/\\u00FC/\xFC/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003f/\x3f/g' \
|
||||
-e 's/\\u006f/\x6f/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00a0/\xa0/g' \
|
||||
-e 's/\\u00a3/\xa3/g' \
|
||||
-e 's/\\u00b0/\xb0/g' \
|
||||
-e 's/\\u00ba/\xba/g' \
|
||||
-e 's/\\u00bf/\xbf/g' \
|
||||
-e 's/\\u00c1/\xc1/g' \
|
||||
-e 's/\\u00c4/\xc4/g' \
|
||||
-e 's/\\u00c5/\xc5/g' \
|
||||
-e 's/\\u00c8/\xc8/g' \
|
||||
-e 's/\\u00c9/\xc9/g' \
|
||||
-e 's/\\u00ca/\xca/g' \
|
||||
-e 's/\\u00cd/\xcd/g' \
|
||||
-e 's/\\u00d6/\xd6/g' \
|
||||
-e 's/\\u00dc/\xdc/g' \
|
||||
-e 's/\\u00dd/\xdd/g' \
|
||||
-e 's/\\u00df/\xdf/g' \
|
||||
-e 's/\\u00e0/\xe0/g' \
|
||||
-e 's/\\u00e1/\xe1/g' \
|
||||
-e 's/\\u00e2/\xe2/g' \
|
||||
-e 's/\\u00e3/\xe3/g' \
|
||||
-e 's/\\u00e4/\xe4/g' \
|
||||
-e 's/\\u00e5/\xe5/g' \
|
||||
-e 's/\\u00e7/\xe7/g' \
|
||||
-e 's/\\u00e8/\xe8/g' \
|
||||
-e 's/\\u00e9/\xe9/g' \
|
||||
-e 's/\\u00ea/\xea/g' \
|
||||
-e 's/\\u00eb/\xeb/g' \
|
||||
-e 's/\\u00ec/\xec/g' \
|
||||
-e 's/\\u00ed/\xed/g' \
|
||||
-e 's/\\u00ee/\xee/g' \
|
||||
-e 's/\\u00ef/\xef/g' \
|
||||
-e 's/\\u00f0/\xf0/g' \
|
||||
-e 's/\\u00f1/\xf1/g' \
|
||||
-e 's/\\u00f2/\xf2/g' \
|
||||
-e 's/\\u00f3/\xf3/g' \
|
||||
-e 's/\\u00f4/\xf4/g' \
|
||||
-e 's/\\u00f5/\xf5/g' \
|
||||
-e 's/\\u00f6/\xf6/g' \
|
||||
-e 's/\\u00f7/\xf7/g' \
|
||||
-e 's/\\u00f8/\xf8/g' \
|
||||
-e 's/\\u00f9/\xf9/g' \
|
||||
-e 's/\\u00fa/\xfa/g' \
|
||||
-e 's/\\u00fc/\xfc/g' \
|
||||
-e 's/\\u00ff/\xff/g' \
|
||||
| sed -e '/^#/d' -e '/^$/d' \
|
||||
-e :a -e '/\\$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
-e 's/\\=/=/' | LANG=C sort > $OLD.cleaned
|
||||
TMP=$(LANG=C diff $OLD.cleaned $NEW)
|
||||
fi
|
||||
if test -n "$TMP"; then
|
||||
echo Files $OLD and $NEW differ
|
||||
fi
|
@ -1,114 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# List of files inside jar archives that are ok if they differ.
|
||||
LIST_DIFF_JAR="
|
||||
/sun/misc/Version.class
|
||||
/sun/tools/jconsole/Version.class
|
||||
/com/sun/tools/javac/resources/version.class
|
||||
/com/sun/tools/javah/resources/version.class
|
||||
/com/sun/tools/javap/resources/version.class
|
||||
"
|
||||
|
||||
# List of binaries that only need to match symbols
|
||||
LIST_DIFF_SIZE="
|
||||
jre/lib/amd64/libfontmanager.so
|
||||
jre/lib/amd64/libjdwp.so
|
||||
jre/lib/amd64/libt2k.so
|
||||
bin/unpack200
|
||||
jre/bin/unpack200
|
||||
jre/lib/amd64/libjsig.debuginfo
|
||||
jre/lib/amd64/libsaproc.debuginfo
|
||||
jre/lib/amd64/server/libjvm.debuginfo
|
||||
"
|
||||
|
||||
# List of binares that need to match both symbols and size
|
||||
LIST_DIFF_BYTE="
|
||||
jre/lib/amd64/libdt_socket.so
|
||||
jre/lib/amd64/libattach.so
|
||||
jre/lib/amd64/libjaas_unix.so
|
||||
jre/lib/amd64/libjawt.so
|
||||
jre/lib/amd64/libjpeg.so
|
||||
jre/lib/amd64/libjsdt.so
|
||||
jre/lib/amd64/libjsig.so
|
||||
jre/lib/amd64/libsaproc.so
|
||||
jre/lib/amd64/libsctp.so
|
||||
jre/lib/amd64/libsunec.so
|
||||
jre/lib/amd64/libunpack.so
|
||||
jre/lib/amd64/libverify.so
|
||||
jre/lib/amd64/libzip.so
|
||||
jre/lib/amd64/server/libjsig.so
|
||||
jre/lib/amd64/server/libjvm.so
|
||||
jre/lib/amd64/liblcms.so
|
||||
demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
demo/jvmti/hprof/lib/libhprof.so
|
||||
demo/jvmti/minst/lib/libminst.so
|
||||
demo/jvmti/mtrace/lib/libmtrace.so
|
||||
demo/jvmti/waiters/lib/libwaiters.so
|
||||
bin/appletviewer
|
||||
bin/extcheck
|
||||
bin/idlj
|
||||
bin/jar
|
||||
bin/jarsigner
|
||||
bin/java
|
||||
bin/javac
|
||||
bin/javadoc
|
||||
bin/javah
|
||||
bin/javap
|
||||
bin/jcmd
|
||||
bin/jconsole
|
||||
bin/jdb
|
||||
bin/jhat
|
||||
bin/jinfo
|
||||
bin/jmap
|
||||
bin/jps
|
||||
bin/jrunscript
|
||||
bin/jsadebugd
|
||||
bin/jstack
|
||||
bin/jstat
|
||||
bin/jstatd
|
||||
bin/keytool
|
||||
bin/native2ascii
|
||||
bin/orbd
|
||||
bin/pack200
|
||||
bin/policytool
|
||||
bin/rmic
|
||||
bin/rmid
|
||||
bin/rmiregistry
|
||||
bin/schemagen
|
||||
bin/serialver
|
||||
bin/servertool
|
||||
bin/tnameserv
|
||||
bin/wsgen
|
||||
bin/wsimport
|
||||
bin/xjc
|
||||
jre/bin/java
|
||||
jre/bin/keytool
|
||||
jre/bin/orbd
|
||||
jre/bin/pack200
|
||||
jre/bin/policytool
|
||||
jre/bin/rmid
|
||||
jre/bin/rmiregistry
|
||||
jre/bin/servertool
|
||||
jre/bin/tnameserv
|
||||
"
|
@ -1,53 +0,0 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
# cleanup
|
||||
rm -f localdevenvtmp*
|
@ -1,4 +1,4 @@
|
||||
#!/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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/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.
|
||||
|
47
common/bin/shell-tracer.sh
Normal file
47
common/bin/shell-tracer.sh
Normal file
@ -0,0 +1,47 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# 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.
|
||||
|
||||
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
|
@ -36,9 +36,12 @@ include MakeBase.gmk
|
||||
default: all
|
||||
|
||||
# Get all files except .hg in the hotspot directory.
|
||||
HOTSPOT_FILES := $(shell $(FIND) $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
|
||||
HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
|
||||
|
||||
# The old build creates hotspot output dir before calling hotspot and
|
||||
# not doing it breaks builds on msys.
|
||||
$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
|
||||
@$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
|
||||
$(TOUCH) $@
|
||||
|
||||
|
@ -59,7 +59,7 @@ define add_idl_package
|
||||
$(MKDIR) -p $3/$$($4_TMPDIR)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
$(MKDIR) -p $(dir $5)
|
||||
$(ECHO) Compiling IDL $(patsubst $2/%,%,$4)
|
||||
$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
|
||||
$8 -td $3/$$($4_TMPDIR) \
|
||||
-i $2/org/omg/CORBA \
|
||||
-i $2/org/omg/PortableInterceptor \
|
||||
@ -79,15 +79,9 @@ define SetupIdlCompilation
|
||||
# param 1 is for example BUILD_IDLS
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
|
||||
|
||||
# Remove any relative addressing in the paths.
|
||||
$1_SRC := $$(abspath $$($1_SRC))
|
||||
|
@ -50,27 +50,17 @@ define SetupJavaCompiler
|
||||
# FLAGS:=Flags to be supplied to javac
|
||||
# SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
|
||||
# SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupJavaCompiler($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 SetupJavaCompiler, please update JavaCompilation.gmk))
|
||||
|
||||
ifeq ($$(ENABLE_SJAVAC),yes)
|
||||
# The port file contains the tcp/ip on which the server listens
|
||||
# and the cookie necessary to talk to the server.
|
||||
$1_JAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
|
||||
# You can use a different JVM to run the background javac server.
|
||||
ifeq ($$($1_SERVER_JVM),)
|
||||
# It defaults to the same JVM that is used to start the javac command.
|
||||
$1_SERVER_JVM:=$$($1_JVM)
|
||||
endif
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=-XDserver:portfile=$$($1_JAVAC_PORTFILE),poolsize=$(SJAVAC_SERVER_CORES),id=$1,javac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_JAVAC))))
|
||||
# The port file contains the tcp/ip on which the server listens
|
||||
# and the cookie necessary to talk to the server.
|
||||
$1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
|
||||
# You can use a different JVM to run the background javac server.
|
||||
ifeq ($$($1_SERVER_JVM),)
|
||||
# It defaults to the same JVM that is used to start the javac command.
|
||||
$1_SERVER_JVM:=$$($1_JVM)
|
||||
endif
|
||||
endef
|
||||
|
||||
@ -92,19 +82,11 @@ define SetupArchive
|
||||
# added to the archive.
|
||||
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
|
||||
# CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
|
||||
# NOTE: $2 is dependencies, not a named argument!
|
||||
$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(findstring $(LOG),debug trace), $(info *[2] <dependencies> = $(strip $2)))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
|
||||
|
||||
$1_JARMAIN:=$(strip $$($1_JARMAIN))
|
||||
@ -125,16 +107,28 @@ define SetupArchive
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),\
|
||||
$$(addprefix $$(src)/,$$($1_INCLUDES)))
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
# If there are a lot of include patterns, output to file to shorten command lines
|
||||
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
|
||||
$1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
|
||||
else
|
||||
$$(shell $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
endif
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
|
||||
$1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,\
|
||||
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
# If there are a lot of include patterns, output to file to shorten command lines
|
||||
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
|
||||
else
|
||||
$$(shell $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
endif
|
||||
endif
|
||||
|
||||
# Check if this jar needs to have its index generated.
|
||||
@ -149,11 +143,13 @@ define SetupArchive
|
||||
ifneq (,$2)
|
||||
$1_DEPS:=$2
|
||||
else
|
||||
$1_DEPS:=$$(foreach src,$$($1_SRCS),$$(shell ($(FIND) $$(src) -type f \
|
||||
-a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$(addprefix $$(src)/,$$($1_EXTRA_FILES)))))
|
||||
# The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command
|
||||
# lines, but not here for use in make dependencies.
|
||||
$1_DEPS:=$$(shell $(FIND) $$($1_SRCS) -type f -a \( $$($1_FIND_PATTERNS) \) \
|
||||
$$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES)) \
|
||||
$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_DEPS+=$$(foreach src,$$($1_SRCS),$$(shell $(FIND) $$(src)/META-INF -type f 2> /dev/null))
|
||||
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null))
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -161,34 +157,39 @@ define SetupArchive
|
||||
|
||||
# The capture contents macro finds all files (matching the patterns, typically
|
||||
# .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
|
||||
$1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > $$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
$1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
|
||||
$(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) && )
|
||||
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE))
|
||||
endif
|
||||
# The capture deletes macro finds all deleted files and concatenates them. The resulting file
|
||||
# tells us what to remove from the jar-file.
|
||||
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) &&)
|
||||
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
|
||||
# The update contents macro updates the jar file with the previously capture contents.
|
||||
$1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
if [ -s _the.$$($1_JARNAME)_contents ]; then \
|
||||
$(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
|
||||
$(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
|
||||
fi) &&)
|
||||
fi) $$(NEWLINE))
|
||||
# The s-variants of the above macros are used when the jar is created from scratch.
|
||||
$1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
|
||||
$$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS),\
|
||||
($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
endif
|
||||
$1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) &&)
|
||||
(cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this jar.
|
||||
$1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
|
||||
@ -208,38 +209,32 @@ define SetupArchive
|
||||
# Here is the rule that creates/updates the jar file.
|
||||
$$($1_JAR) : $$($1_DEPS)
|
||||
$(MKDIR) -p $$($1_BIN)
|
||||
if [ -n "$$($1_MANIFEST)" ]; then \
|
||||
$$(if $$($1_MANIFEST),\
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE); \
|
||||
else \
|
||||
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$(strip $$($1_JARMAIN))" ]; then \
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$($1_EXTRA_MANIFEST_ATTR)" ]; then \
|
||||
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
+if [ -s $$@ ]; then \
|
||||
$(ECHO) Modifying $$($1_NAME) && \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
|
||||
,\
|
||||
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
|
||||
$$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE))
|
||||
$$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE))
|
||||
$$(if $$(wildcard $$@),\
|
||||
$(ECHO) Modifying $$($1_NAME) $$(NEWLINE)\
|
||||
$$($1_CAPTURE_CONTENTS) \
|
||||
$$($1_CAPTURE_METAINF) \
|
||||
$(RM) $$($1_DELETES_FILE) && \
|
||||
$(RM) $$($1_DELETES_FILE) $$(NEWLINE)\
|
||||
$$($1_CAPTURE_DELETES) \
|
||||
$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) && \
|
||||
$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE)\
|
||||
if [ -s $$($1_DELETESS_FILE) ]; then \
|
||||
$(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
|
||||
$(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
|
||||
fi && \
|
||||
$$($1_UPDATE_CONTENTS) true && \
|
||||
$$($1_JARINDEX) && true ; \
|
||||
else \
|
||||
$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) && \
|
||||
fi $$(NEWLINE) \
|
||||
$$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
|
||||
$$($1_JARINDEX) && true \
|
||||
,\
|
||||
$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
|
||||
$$($1_SCAPTURE_CONTENTS) \
|
||||
$$($1_SCAPTURE_METAINF) \
|
||||
$$($1_SUPDATE_CONTENTS) \
|
||||
$$($1_JARINDEX) && true ; \
|
||||
fi;
|
||||
$$($1_JARINDEX) && true )
|
||||
|
||||
endef
|
||||
|
||||
@ -247,15 +242,9 @@ define SetupZipArchive
|
||||
# param 1 is for example ZIP_MYSOURCE
|
||||
# param 2,3,4,5,6,7,8,9 are named args.
|
||||
# SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupZipArchive($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 SetupZipArchive, please update JavaCompilation.gmk))
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
@ -274,7 +263,7 @@ define SetupZipArchive
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
|
||||
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRC))
|
||||
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
|
||||
endif
|
||||
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this zip.
|
||||
@ -288,7 +277,7 @@ define SetupZipArchive
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Updating $$($1_NAME)
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES)))) ;) true
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))))$$(NEWLINE)) true
|
||||
$(TOUCH) $$@
|
||||
endef
|
||||
|
||||
@ -324,7 +313,7 @@ define add_file_to_copy_and_clean
|
||||
$$($1_BIN)$$($2_TARGET) : $2
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
| $(SED) -f "$(SRC_ROOT)/common/bin/unicode2x.sed" \
|
||||
| $(SED) -f "$(SRC_ROOT)/common/makefiles/support/unicode2x.sed" \
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$$$$//' \
|
||||
@ -364,36 +353,27 @@ define SetupJavaCompilation
|
||||
# Its only here until we cleanup some nasty source code pasta in the jdk.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependecy
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupJavaCompilation($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 SetupJavaCompilation, please update JavaCompilation.gmk))
|
||||
|
||||
# Extract the info from the java compiler setup.
|
||||
$1_REMOTE := $$($$($1_SETUP)_REMOTE)
|
||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
||||
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
|
||||
ifeq ($$($1_JAVAC),)
|
||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
||||
endif
|
||||
$1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
|
||||
$1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
|
||||
|
||||
# Handle addons and overrides.
|
||||
$1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
|
||||
# Make sure the dirs exist.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
# Find all files in the source trees.
|
||||
$1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(foreach i,$$($1_SRC),$$(shell $(FIND) $$i -type f)))
|
||||
$1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(shell $(FIND) $$($1_SRC) -type f))
|
||||
# Extract the java files.
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
$1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
|
||||
@ -428,7 +408,7 @@ define SetupJavaCompilation
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_COPY_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_COPY))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_COPIES := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i \( $$($1_COPY_PATTERN) \) -a -type f))
|
||||
$1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
|
||||
# Copy these explicitly
|
||||
$1_ALL_COPIES += $$($1_COPY_FILES)
|
||||
# Copy must also respect filters.
|
||||
@ -442,7 +422,7 @@ define SetupJavaCompilation
|
||||
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
|
||||
endif
|
||||
# All files below META-INF are always copied.
|
||||
$1_ALL_COPIES += $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i/META-INF -type f 2> /dev/null))
|
||||
$1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
|
||||
ifneq (,$$($1_ALL_COPIES))
|
||||
# Yep, there are files to be copied!
|
||||
$1_ALL_COPY_TARGETS:=
|
||||
@ -456,7 +436,7 @@ define SetupJavaCompilation
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_CLEAN_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_CLEAN))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_CLEANS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i \( $$($1_CLEAN_PATTERN) \) -a -type f))
|
||||
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
|
||||
# Copy and clean must also respect filters.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
|
||||
@ -482,30 +462,59 @@ define SetupJavaCompilation
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Create a sed expression to remove the source roots and to replace / with .
|
||||
# and remove .java at the end.
|
||||
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
||||
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Using sjavac to compile.
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
|
||||
|
||||
# Create SJAVAC variable,
|
||||
# expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar"
|
||||
# and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main"
|
||||
$1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main
|
||||
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),poolsize=$(SJAVAC_SERVER_CORES),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
|
||||
$$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
|
||||
$(ECHO) Compiling $1
|
||||
$$($1_JVM) $$(word 1,$$($1_JAVAC)) com.sun.tools.sjavac.Main \
|
||||
$$($1_REMOTE) $$($1_SJAVAC_ARGS) --permit-unidentified-artifacts -mfl $$($1_BIN)/_the.batch.tmp \
|
||||
$$($1_JVM) $$($1_SJAVAC) \
|
||||
$$($1_REMOTE) $$($1_SJAVAC_ARGS) \
|
||||
--permit-unidentified-artifacts \
|
||||
--permit-sources-without-package \
|
||||
--compare-found-sources $$($1_BIN)/_the.batch.tmp \
|
||||
$$($1_FLAGS) \
|
||||
-implicit:none -d $$($1_BIN) $$($1_HEADERS_ARG)
|
||||
else
|
||||
# Using plain javac to batch compile everything.
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
|
||||
|
||||
# When buliding in batch, put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS).tmp
|
||||
|
||||
$$($1_HEADERS)/_the.headers: $$($1_BIN)/_the.batch
|
||||
$(MKDIR) -p $$(@D)
|
||||
for f in `ls $$($1_HEADERS).tmp`; do \
|
||||
if [ ! -f "$$($1_HEADERS)/$$$$f" ] || [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).tmp/$$$$f`" != "" ]; then \
|
||||
$(CP) -f $$($1_HEADERS).tmp/$$$$f $$($1_HEADERS)/$$$$f; \
|
||||
fi; \
|
||||
done
|
||||
$(RM) -r $$($1_HEADERS).tmp
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_HEADERS)/_the.headers
|
||||
endif
|
||||
|
||||
# When not using sjavac, pass along all sources to javac using an @file.
|
||||
$$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
@ -516,6 +525,7 @@ define SetupJavaCompilation
|
||||
-implicit:none -sourcepath "$$($1_SRCROOTSC)" \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
|
||||
$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
|
||||
|
||||
endif
|
||||
|
||||
# Check if a jar file was specified, then setup the rules for the jar.
|
||||
|
208
common/makefiles/Main.gmk
Normal file
208
common/makefiles/Main.gmk
Normal file
@ -0,0 +1,208 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
|
||||
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
||||
# Include the corresponding custom file, if present.
|
||||
-include $(CUSTOM_MAKE_DIR)/Main.gmk
|
||||
|
||||
### Clean up from previous run
|
||||
|
||||
# Remove any build.log from a previous run, if they exist
|
||||
ifneq (,$(BUILD_LOG))
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
endif
|
||||
$(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
|
||||
endif
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
ifneq (,$(SJAVAC_SERVER_DIR))
|
||||
$(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
|
||||
endif
|
||||
|
||||
# Reset the build timers.
|
||||
$(eval $(call ResetAllTimers))
|
||||
|
||||
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
|
||||
# hence this workaround.
|
||||
ifeq ($(JOBS),)
|
||||
JOBS=$(NUM_CORES)
|
||||
endif
|
||||
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
|
||||
|
||||
### Main targets
|
||||
|
||||
all: jdk
|
||||
|
||||
start-make:
|
||||
@$(call AtMakeStart)
|
||||
|
||||
langtools: langtools-only
|
||||
langtools-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildLangtools.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
corba: langtools corba-only
|
||||
corba-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildCorba.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
jaxp: langtools jaxp-only
|
||||
jaxp-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxp.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
jaxws: langtools jaxp jaxws-only
|
||||
jaxws-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
hotspot: hotspot-only
|
||||
hotspot-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
jdk: langtools hotspot corba jaxp jaxws jdk-only
|
||||
jdk-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
|
||||
@$(call TargetExit)
|
||||
|
||||
demos: jdk demos-only
|
||||
demos-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
|
||||
@$(call TargetExit)
|
||||
|
||||
images: source-tips demos images-only
|
||||
images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
|
||||
@$(call TargetExit)
|
||||
|
||||
overlay-images: source-tips demos overlay-images-only
|
||||
overlay-images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
|
||||
@$(call TargetExit)
|
||||
|
||||
bundles: images bundles-only
|
||||
bundles-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk bundles)
|
||||
@$(call TargetExit)
|
||||
|
||||
install: images install-only
|
||||
install-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
|
||||
@$(call TargetExit)
|
||||
|
||||
docs: jdk docs-only
|
||||
docs-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
|
||||
@$(call TargetExit)
|
||||
|
||||
bootcycle-images:
|
||||
@$(ECHO) Boot cycle build step 1: Building the JDK image normally
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
|
||||
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
|
||||
|
||||
test: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call TargetExit)
|
||||
|
||||
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
||||
# used to track the exact sources used to build that image.
|
||||
source-tips: $(OUTPUT_ROOT)/source_tips
|
||||
$(OUTPUT_ROOT)/source_tips: FRC
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(RM) $@
|
||||
@$(if $(HG),$(call GetSourceTips),$(ECHO) "hg not installed" > $@)
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
|
||||
@$(ECHO) Cleaned all build artifacts.
|
||||
|
||||
# Remove everything, including configure configuration.
|
||||
# If the output directory was created by configure and now becomes empty, remove it as well.
|
||||
# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
|
||||
dist-clean: clean
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp)
|
||||
@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
|
||||
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
|
||||
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
|
||||
else \
|
||||
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
|
||||
fi \
|
||||
)
|
||||
@$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
|
||||
clean-langtools:
|
||||
$(call CleanComponent,langtools)
|
||||
clean-corba:
|
||||
$(call CleanComponent,corba)
|
||||
clean-jaxp:
|
||||
$(call CleanComponent,jaxp)
|
||||
clean-jaxws:
|
||||
$(call CleanComponent,jaxws)
|
||||
clean-hotspot:
|
||||
$(call CleanComponent,hotspot)
|
||||
clean-jdk:
|
||||
$(call CleanComponent,jdk)
|
||||
clean-images:
|
||||
$(call CleanComponent,images)
|
||||
clean-overlay-images:
|
||||
$(call CleanComponent,overlay-images)
|
||||
clean-bootcycle-build:
|
||||
$(call CleanComponent,bootcycle-build)
|
||||
|
||||
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
|
||||
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
|
||||
.PHONY: all test clean dist-clean bootcycle-images start-make
|
||||
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
|
||||
FRC: # Force target
|
@ -33,129 +33,13 @@
|
||||
ifndef _MAKEBASE_GMK
|
||||
_MAKEBASE_GMK := 1
|
||||
|
||||
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
|
||||
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Please upgrade to 3.81 or newer.)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(CYGPATH))
|
||||
# Cygwin styff, if needed but most is going to be
|
||||
# done in configure!
|
||||
ifeq (yes,$(CHECK_FOR_VCINSTALLDIR))
|
||||
ifeq (,$(VCINSTALLDIR))
|
||||
$(info Could not find compiler paths!)
|
||||
$(info You probably configured the build from within a)
|
||||
$(info VS command prompt, but you are not using such a)
|
||||
$(info prompt right now.)
|
||||
$(info If you instead run configure from a plain cygwin shell, it)
|
||||
$(info will attempt to setup VS for you! Please try that.)
|
||||
$(error Giving up for now.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# The build times report is turned off by setting REPORT_BUILD_TIMES to nothing.
|
||||
# This is necessary for the target clean which will erase the
|
||||
# directories where the buildtimes are stored.
|
||||
REPORT_BUILD_TIMES=1
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(MKDIR) -p $(BUILDTIMESDIR)
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
endef
|
||||
|
||||
# Indicate that we started to build a sub repository and record starting time.
|
||||
define MakeStart
|
||||
$(call RecordStartTime,$1)
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n\n" \
|
||||
"########################################################################" \
|
||||
"########################################################################" \
|
||||
"Entering $1 for target(s) $2" \
|
||||
"########################################################################"
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
|
||||
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
|
||||
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
|
||||
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$1
|
||||
endef
|
||||
|
||||
# Check if the current target is the final target, as specified by
|
||||
# the user on the command line. If so, call PrintEndMessage.
|
||||
define CheckIfFinished
|
||||
$(if $(filter $@,$(MAKECMDGOALS)),$(call PrintEndMessage))
|
||||
# If no taget is given, "all" is default. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(MAKECMDGOALS),,$(if $(filter $@,all),$(call PrintEndMessage)))
|
||||
endef
|
||||
|
||||
# Indicate that we are done.
|
||||
# Record ending time and print out the total time it took to build.
|
||||
define MakeFinish
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,$1),)
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "%s\n##### %-60.60s #####\n%s\n##### %-60.60s #####\n%s\n\n" \
|
||||
"########################################################################" \
|
||||
"Leaving $1 for target(s) $2" \
|
||||
"########################################################################" \
|
||||
$(if $(REPORT_BUILD_TIMES),"Build time `$(CAT) $(BUILDTIMESDIR)/build_time_diff_$1` for target(s) $2","") \
|
||||
"########################################################################"
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
"$1" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
endef
|
||||
|
||||
define ResetTimers
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
endef
|
||||
|
||||
define StartTimer
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
|
||||
define StopTimer
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtRootMakeStart
|
||||
$(if $(findstring --jobserver,$(MAKEFLAGS)), $(error make -j is not supported, use make JOBS=n))
|
||||
$(call PrintStartMessage)
|
||||
$(call StartTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtRootMakeEnd
|
||||
$(call StopTimer)
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# If the variable that you want to send to stdout for piping into a file or otherwise,
|
||||
# is potentially long, for example the a list of file paths, eg a list of all package directories.
|
||||
# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
|
||||
# calls as well as use compression on recurrent file paths segments, to get around the potential
|
||||
# command line length problem that exists in cygwin and other shells.
|
||||
compress_pre:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.pre))
|
||||
compress_post:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.post))
|
||||
compress_pre:=$(strip $(shell $(CAT) $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-pre-compress.incl))
|
||||
compress_post:=$(strip $(shell $(CAT) $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-post-compress.incl))
|
||||
compress_paths=$(compress_pre)\
|
||||
$(subst $(SRC_ROOT),X97,\
|
||||
$(subst $(OUTPUT_ROOT),X98,\
|
||||
@ -163,7 +47,7 @@ $(subst X,X00,\
|
||||
$(subst $(SPACE),\n,$(strip $1)))))\
|
||||
$(compress_post)
|
||||
|
||||
decompress_paths=sed -f $(SRC_ROOT)/common/makefiles/uncompress.sed -e 's|X99|\\n|g' \
|
||||
decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
|
||||
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
|
||||
-e 's|X00|X|g' | tr '\n' '$2'
|
||||
|
||||
@ -384,14 +268,67 @@ $(ECHO) $1/$(HGTIP_FILENAME)
|
||||
endef
|
||||
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
ifeq ($$(LOG), trace)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
# For each target executed, will print
|
||||
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
|
||||
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin).
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL)
|
||||
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
|
||||
endif
|
||||
# Never remove warning messages; this is just for completeness
|
||||
LOG_WARN=
|
||||
ifneq ($$(findstring $$(LOG),info debug trace),)
|
||||
LOG_INFO=
|
||||
else
|
||||
LOG_INFO=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG),debug trace),)
|
||||
LOG_DEBUG=
|
||||
else
|
||||
LOG_DEBUG=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG),trace),)
|
||||
LOG_TRACE=
|
||||
else
|
||||
LOG_TRACE=> /dev/null
|
||||
endif
|
||||
endef
|
||||
|
||||
# Make sure logging is setup for everyone that includes MakeBase.gmk.
|
||||
$(eval $(call SetupLogging))
|
||||
|
||||
# This is to be called by all SetupFoo macros
|
||||
define LogSetupMacroEntry
|
||||
$(if $(26),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
|
||||
$(if $(findstring $(LOG),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
|
||||
endef
|
||||
|
||||
# Make directory without forking mkdir if not needed
|
||||
define MakeDir
|
||||
ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
|
||||
$$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
|
||||
endif
|
||||
endef
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) '$@'
|
||||
$(CP) -f -r -P '$<' '$(@D)'
|
||||
endef
|
||||
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -fpRP '$<' '$@'
|
||||
endef
|
||||
else
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -fP '$<' '$@'
|
||||
endef
|
||||
endif
|
||||
|
||||
endif # _MAKEBASE_GMK
|
||||
|
@ -45,13 +45,130 @@ MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VA
|
||||
list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
|
||||
list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
|
||||
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# Global targets are possible to run either with or without a SPEC. The prototypical
|
||||
# global target is "help".
|
||||
global_targets=help configure
|
||||
|
||||
##############################
|
||||
# Functions
|
||||
##############################
|
||||
|
||||
define fatal-error
|
||||
define CheckEnvironment
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
|
||||
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
|
||||
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
|
||||
)
|
||||
endef
|
||||
|
||||
### Functions for timers
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(MKDIR) -p $(BUILDTIMESDIR)
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
|
||||
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
|
||||
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
|
||||
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$1
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
endef
|
||||
|
||||
define ResetAllTimers
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
endef
|
||||
|
||||
define StartGlobalTimer
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
|
||||
define StopGlobalTimer
|
||||
$(call RecordEndTime,TOTAL)
|
||||
endef
|
||||
|
||||
### Functions for managing makefile structure (start/end of makefile and individual targets)
|
||||
|
||||
# Do not indent this function, this will add whitespace at the start which the caller won't handle
|
||||
define GetRealTarget
|
||||
$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),all))
|
||||
endef
|
||||
|
||||
# Do not indent this function, this will add whitespace at the start which the caller won't handle
|
||||
define LastGoal
|
||||
$(strip $(lastword $(call GetRealTarget)))
|
||||
endef
|
||||
|
||||
# Check if the current target is the final target, as specified by
|
||||
# the user on the command line. If so, call AtRootMakeEnd.
|
||||
define CheckIfMakeAtEnd
|
||||
# Check if the current target is the last goal
|
||||
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If the target is 'foo-only', check if our goal was stated as 'foo'
|
||||
$(if $(filter $(patsubst %-only,%,$@),$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If no goal is given, 'all' is default, but the last target executed for all is 'jdk-only'. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(subst all,,$(call LastGoal)),,$(if $(filter $@,jdk-only),$(call AtMakeEnd)))
|
||||
endef
|
||||
|
||||
# Hook to be called when starting to execute a top-level target
|
||||
define TargetEnter
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
|
||||
$(call RecordStartTime,$(patsubst %-only,%,$@))
|
||||
endef
|
||||
|
||||
# Hook to be called when finish executing a top-level target
|
||||
define TargetExit
|
||||
$(call RecordEndTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d " "`"
|
||||
$(call CheckIfMakeAtEnd)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtMakeStart
|
||||
$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
|
||||
$(call CheckEnvironment)
|
||||
@$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
|
||||
@$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
|
||||
$(call StartGlobalTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtMakeEnd
|
||||
$(if $(SJAVAC_SERVER_DIR),@$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
$(call StopGlobalTimer)
|
||||
$(call ReportBuildTimes)
|
||||
@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
|
||||
$(call CheckEnvironment)
|
||||
endef
|
||||
|
||||
### Functions for parsing and setting up make options from command-line
|
||||
|
||||
define FatalError
|
||||
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
|
||||
$$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
|
||||
$$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
|
||||
endef
|
||||
|
||||
define ParseLogLevel
|
||||
@ -80,14 +197,14 @@ define ParseLogLevel
|
||||
ifeq ($$(LOG),warn)
|
||||
VERBOSE=-s
|
||||
else ifeq ($$(LOG),info)
|
||||
VERBOSE=
|
||||
VERBOSE=-s
|
||||
else ifeq ($$(LOG),debug)
|
||||
VERBOSE=
|
||||
else ifeq ($$(LOG),trace)
|
||||
VERBOSE=-d -p
|
||||
VERBOSE=
|
||||
else
|
||||
$$(info Error: LOG must be one of: warn, info, debug or trace.)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
else
|
||||
ifneq ($$(LOG),)
|
||||
@ -95,108 +212,84 @@ define ParseLogLevel
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
# TODO: Fix duplication in MakeBase.gmk
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
endif
|
||||
endef
|
||||
|
||||
define ParseConfAndSpec
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(eval $$(call fatal-error))
|
||||
ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
|
||||
# If we only have global targets, no need to bother with SPEC or CONF
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
endif
|
||||
# ... OK, we're satisfied, we'll use this SPEC later on
|
||||
else
|
||||
# Find all spec.gmk files in the build output directory
|
||||
output_dir=$$(root_dir)/build
|
||||
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
|
||||
ifeq ($$(all_spec_files),)
|
||||
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
# Extract the configuration names from the path
|
||||
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
|
||||
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# User have given a CONF= argument.
|
||||
ifeq ($$(CONF),)
|
||||
# If given CONF=, match all configurations
|
||||
matching_confs=$$(strip $$(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
|
||||
endif
|
||||
ifeq ($$(matching_confs),)
|
||||
$$(info No configurations found matching CONF=$$(CONF))
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(eval $$(call fatal-error))
|
||||
else
|
||||
ifeq ($$(words $$(matching_confs)),1)
|
||||
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
else
|
||||
$$(info Building the following configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
|
||||
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
|
||||
# ... OK, we're satisfied, we'll use this SPEC later on
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)),1)
|
||||
$$(info No CONF or SPEC given, but more than one spec.gmk found in $$(output_dir).)
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config> or SPEC=<specfile>)
|
||||
$$(eval $$(call fatal-error))
|
||||
# Find all spec.gmk files in the build output directory
|
||||
output_dir=$$(root_dir)/build
|
||||
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
|
||||
ifeq ($$(all_spec_files),)
|
||||
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
# Extract the configuration names from the path
|
||||
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPEC=$$(strip $$(all_spec_files))
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# User have given a CONF= argument.
|
||||
ifeq ($$(CONF),)
|
||||
# If given CONF=, match all configurations
|
||||
matching_confs=$$(strip $$(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
|
||||
endif
|
||||
ifeq ($$(matching_confs),)
|
||||
$$(info No configurations found matching CONF=$$(CONF))
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(eval $$(call FatalError))
|
||||
else
|
||||
ifeq ($$(words $$(matching_confs)),1)
|
||||
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
else
|
||||
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
|
||||
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)),1)
|
||||
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPEC=$$(strip $$(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define CheckEnvironment
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
|
||||
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
|
||||
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
|
||||
)
|
||||
endef
|
||||
|
||||
define PrintStartMessage
|
||||
$(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
|
||||
$(call CheckEnvironment)
|
||||
@$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
|
||||
endef
|
||||
|
||||
define PrintEndMessage
|
||||
@$(ECHO) "Finished building OpenJDK for target '$@'"
|
||||
$(call CheckEnvironment)
|
||||
endef
|
||||
### Convenience functions from Main.gmk
|
||||
|
||||
# Cleans the component given as $1
|
||||
define CleanComponent
|
||||
|
@ -24,13 +24,24 @@
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
all:
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j. Recursively called makefiles will not be
|
||||
# affected, however. This is required for correct dependency management.
|
||||
.NOTPARALLEL:
|
||||
|
||||
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
|
||||
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
|
||||
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
|
||||
endif
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
@ -43,202 +54,32 @@ root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
|
||||
include $(dir $(makefile_path))/MakeHelpers.gmk
|
||||
|
||||
$(eval $(call ParseLogLevel))
|
||||
$(eval $(call SetupLogging))
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
ifneq ($(words $(SPEC)),1)
|
||||
### We have multiple configurations to build, call make repeatedly
|
||||
all clean dist-clean:
|
||||
langtools corba jaxp jaxws hotspot jdk images overlay-images install:
|
||||
langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only:
|
||||
clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images:
|
||||
# Now determine if we have zero, one or several configurations to build.
|
||||
ifeq ($(SPEC),)
|
||||
# Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
|
||||
else
|
||||
ifeq ($(words $(SPEC)),1)
|
||||
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
|
||||
include $(dir $(makefile_path))/Main.gmk
|
||||
else
|
||||
# We are building multiple configurations.
|
||||
# First, find out the valid targets
|
||||
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
|
||||
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
|
||||
all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
|
||||
$(MAKE) -p -q -f $(makefile_path) SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
|
||||
|
||||
.PHONY: all clean dist-clean
|
||||
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
|
||||
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
|
||||
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images
|
||||
|
||||
else
|
||||
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
|
||||
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
||||
### Clean up from previous run
|
||||
|
||||
# Remove any build.log from a previous run, if they exist
|
||||
ifneq (,$(BUILD_LOG))
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
endif
|
||||
endif
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
ifneq (,$(SJAVAC_SERVER_DIR))
|
||||
$(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
|
||||
endif
|
||||
# Clean out any notifications from the previous build.
|
||||
$(shell $(FIND) $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
|
||||
|
||||
# Reset the build timers.
|
||||
$(eval $(call ResetTimers))
|
||||
|
||||
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
|
||||
# hence this workaround.
|
||||
ifeq ($(JOBS),)
|
||||
JOBS=$(NUM_CORES)
|
||||
endif
|
||||
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
|
||||
|
||||
### Main targets
|
||||
|
||||
all: jdk
|
||||
@$(if $(SJAVAC_SERVER_DIR),$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
.PHONY: all
|
||||
|
||||
langtools: start-make langtools-only
|
||||
langtools-only:
|
||||
@$(call MakeStart,langtools,all)
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,langtools,all)
|
||||
|
||||
corba: langtools corba-only
|
||||
corba-only:
|
||||
@$(call MakeStart,corba,all)
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,corba,all)
|
||||
|
||||
jaxp: langtools jaxp-only
|
||||
jaxp-only:
|
||||
@$(call MakeStart,jaxp,all)
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxp,all)
|
||||
|
||||
jaxws: langtools jaxp jaxws-only
|
||||
jaxws-only:
|
||||
@$(call MakeStart,jaxws,all)
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxws,all)
|
||||
|
||||
hotspot: langtools hotspot-only
|
||||
hotspot-only:
|
||||
@$(call MakeStart,hotspot,all)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
||||
@$(call MakeFinish,hotspot,all)
|
||||
|
||||
jdk: langtools corba jaxp jaxws hotspot jdk-only
|
||||
jdk-only:
|
||||
@$(call MakeStart,jdk,all)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(JDK_TARGET))
|
||||
@$(call MakeFinish,jdk,all)
|
||||
|
||||
images: source-tips start-make jdk langtools corba jaxp jaxws hotspot images-only
|
||||
images-only:
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) images)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(if $(SJAVAC_SERVER_DIR),$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
overlay-images: source-tips start-make jdk langtools corba jaxp jaxws hotspot overlay-images-only
|
||||
overlay-images-only:
|
||||
@$(call MakeStart,jdk-overlay-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) overlay-images)
|
||||
@$(call MakeFinish,jdk-overlay-images,$@)
|
||||
@$(if $(SJAVAC_SERVER_DIR),$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
install: source-tips start-make jdk langtools corba jaxp jaxws hotspot install-only
|
||||
install-only:
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) install)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(if $(SJAVAC_SERVER_DIR),$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
docs: start-make jdk docs-only
|
||||
docs-only:
|
||||
@$(call MakeStart,docs,$@)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
|
||||
@$(call MakeFinish,docs,$@)
|
||||
@$(if $(SJAVAC_SERVER_DIR),$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
|
||||
.PHONY: langtools corba jaxp jaxws hotspot jdk images install
|
||||
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only install-only
|
||||
|
||||
start-make:
|
||||
@$(call AtRootMakeStart)
|
||||
.PHONY: start-make
|
||||
|
||||
bootcycle-images:
|
||||
@$(ECHO) Boot cycle build step 1: Building the JDK image normally
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
|
||||
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
|
||||
|
||||
test: start-make
|
||||
@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call MakeFinish,test,$(if $(TEST),$(TEST),all))
|
||||
@$(call AtRootMakeEnd)
|
||||
.PHONY: test
|
||||
|
||||
|
||||
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
||||
# used to track the exact sources used to build that image.
|
||||
source-tips: $(OUTPUT_ROOT)/source_tips
|
||||
$(OUTPUT_ROOT)/source_tips: FRC
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(RM) $@
|
||||
@$(call GetSourceTips)
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-bootcycle-build
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log*)
|
||||
@$(ECHO) Cleaned everything except the build configuration.
|
||||
.PHONY: clean
|
||||
|
||||
# Remove everything, you have to rerun configure.
|
||||
dist-clean:
|
||||
@$(RM) -r $(OUTPUT_ROOT)
|
||||
@$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
.PHONY: dist-clean
|
||||
|
||||
clean-langtools:
|
||||
$(call CleanComponent,langtools)
|
||||
clean-corba:
|
||||
$(call CleanComponent,corba)
|
||||
clean-jaxp:
|
||||
$(call CleanComponent,jaxp)
|
||||
clean-jaxws:
|
||||
$(call CleanComponent,jaxws)
|
||||
clean-hotspot:
|
||||
$(call CleanComponent,hotspot)
|
||||
clean-jdk:
|
||||
$(call CleanComponent,jdk)
|
||||
clean-images:
|
||||
$(call CleanComponent,images)
|
||||
clean-bootcycle-build:
|
||||
$(call CleanComponent,bootcycle-build)
|
||||
|
||||
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images
|
||||
|
||||
endif
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||
# If you addd more global targets, please update the fatal-error macro.
|
||||
# If you addd more global targets, please update the variable global_targets in MakeHelpers.
|
||||
|
||||
help:
|
||||
$(info )
|
||||
@ -258,7 +99,7 @@ help:
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
$(info )
|
||||
$(info Targets for specific components)
|
||||
$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk or images))
|
||||
$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
|
||||
$(info . make <component> # Build <component> and everything it depends on. )
|
||||
$(info . make <component>-only # Build <component> only, without dependencies. This)
|
||||
$(info . # is faster but can result in incorrect build results!)
|
||||
@ -272,7 +113,7 @@ help:
|
||||
$(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
||||
$(info . # Available log levels are:)
|
||||
$(info . # 'warn' (default), 'info', 'debug' and 'trace')
|
||||
$(info . # To see executed command lines, use LOG=info)
|
||||
$(info . # To see executed command lines, use LOG=debug)
|
||||
$(info )
|
||||
$(info . make JOBS=<n> # Run <n> parallel make jobs)
|
||||
$(info . # Note that -jN does not work as expected!)
|
||||
@ -280,5 +121,11 @@ help:
|
||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||
$(info . # make test TEST="jdk_lang jdk_net")
|
||||
$(info )
|
||||
.PHONY: help
|
||||
FRC: # Force target
|
||||
|
||||
configure:
|
||||
@$(SHELL) $(root_dir)/configure $(CONFIGURE_ARGS)
|
||||
@echo ====================================================
|
||||
@echo "Note: This is a non-recommended way of running configure."
|
||||
@echo "Instead, run 'sh configure' in the top-level directory"
|
||||
|
||||
.PHONY: help configure
|
||||
|
@ -32,10 +32,10 @@ ifeq (,$(_MAKEBASE_GMK))
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
COMPILING_MSG=echo Compiling $1
|
||||
LINKING_MSG=echo Linking $1
|
||||
LINKING_EXE_MSG=echo Linking executable $1
|
||||
ARCHIVING_MSG=echo Archiving $1
|
||||
COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
|
||||
LINKING_MSG=echo $(LOG_INFO) "Linking $1"
|
||||
LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
|
||||
ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
|
||||
else
|
||||
COMPILING_MSG=
|
||||
LINKING_MSG=
|
||||
@ -94,7 +94,7 @@ define add_native_source
|
||||
|
||||
$$($1_$2_OBJ) : $2
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
$$(call COMPILING_MSG,$2,$$($1_TARGET))
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
endif
|
||||
ifeq ($(COMPILER_TYPE),CL)
|
||||
@ -129,30 +129,8 @@ define SetupNativeCompilation
|
||||
# CC the compiler to use, default is $(CC)
|
||||
# LDEXE the linker to use for linking executables, default is $(LDEXE)
|
||||
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
$(if $(16),$1_$(strip $(16)))
|
||||
$(if $(17),$1_$(strip $(17)))
|
||||
$(if $(18),$1_$(strip $(18)))
|
||||
$(if $(19),$1_$(strip $(19)))
|
||||
$(if $(20),$1_$(strip $(20)))
|
||||
$(if $(21),$1_$(strip $(21)))
|
||||
$(if $(22),$1_$(strip $(22)))
|
||||
$(if $(23),$1_$(strip $(23)))
|
||||
$(if $(24),$1_$(strip $(24)))
|
||||
$(if $(25),$1_$(strip $(25)))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25))
|
||||
$(if $(26),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
|
||||
|
||||
ifneq (,$$($1_BIN))
|
||||
@ -236,9 +214,9 @@ define SetupNativeCompilation
|
||||
$$(error You have to specify LANG for native compilation $1)
|
||||
endif
|
||||
ifeq (C,$$($1_LANG))
|
||||
ifeq ($$($1_LDEXE),)
|
||||
ifeq ($$($1_LDEXE),)
|
||||
$1_LDEXE:=$(LDEXE)
|
||||
endif
|
||||
endif
|
||||
$1_LD:=$(LD)
|
||||
else
|
||||
ifeq (C++,$$($1_LANG))
|
||||
@ -254,9 +232,11 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
# Make sure the dirs exist.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
|
||||
$$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
|
||||
|
||||
# Find all files in the source trees. Sort to remove duplicates.
|
||||
$1_ALL_SRCS := $$(sort $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f)))
|
||||
$1_ALL_SRCS := $$(sort $$(shell $(FIND) $$($1_SRC) -type f))
|
||||
# Extract the C/C++ files.
|
||||
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
@ -291,7 +271,9 @@ define SetupNativeCompilation
|
||||
# Are there too many object files on disk? Perhaps because some source file was removed?
|
||||
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
|
||||
# Clean out the superfluous object files.
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
ifneq ($$($1_SUPERFLUOUS_OBJS),)
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
|
||||
$1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
|
||||
@ -358,11 +340,6 @@ define SetupNativeCompilation
|
||||
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
|
||||
endif
|
||||
|
||||
# Now create a list of the packages that are about to compile. Used when sending source
|
||||
# in a batch to the compiler.
|
||||
$$(shell $(RM) $$($1_OBJECT_DIR)/_the.list_of_sources)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_OBJECT_DIR)/_the.list_of_sources))
|
||||
|
||||
# Now call add_native_source for each source file we are going to compile.
|
||||
$$(foreach p,$$($1_SRCS),\
|
||||
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
|
||||
@ -385,8 +362,6 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
# mapfile doesnt seem to be implemented on macosx (yet??)
|
||||
ifneq ($(OPENJDK_TARGET_CPU),ppc)
|
||||
ifneq ($(OPENJDK_TARGET_CPU),arm)
|
||||
ifneq ($(OPENJDK_TARGET_OS),macosx)
|
||||
ifneq ($(OPENJDK_TARGET_OS),windows)
|
||||
$1_REAL_MAPFILE:=$$($1_MAPFILE)
|
||||
@ -401,8 +376,6 @@ define SetupNativeCompilation
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
|
||||
# for LDFLAGS and LDFLAGS_SUFFIX
|
||||
@ -445,9 +418,9 @@ define SetupNativeCompilation
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
@ -523,9 +496,9 @@ define SetupNativeCompilation
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
@ -564,7 +537,7 @@ define SetupNativeCompilation
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
|
||||
$$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
ifneq (,$$($1_GEN_MANIFEST))
|
||||
$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1
|
||||
$(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
|
||||
endif
|
||||
|
||||
endif
|
||||
|
@ -34,16 +34,9 @@ define SetupRMICompilation
|
||||
# RUN_IIOP:=Set to run rmic with -iiop
|
||||
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
|
||||
# KEEP_GENERATED:=Set to keep generated sources around
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
|
||||
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupRMICompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
|
||||
|
||||
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
|
||||
|
||||
@ -86,12 +79,12 @@ define SetupRMICompilation
|
||||
$$($1_DEP_FILE): $$($1_CLASS_FILES)
|
||||
$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
|
||||
if [ "x$$($1_ARGS)" != "x" ]; then \
|
||||
$(ECHO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
fi;
|
||||
if [ "x$$($1_ARGS2)" != "x" ]; then \
|
||||
$(ECHO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
fi;
|
||||
|
@ -1 +1 @@
|
||||
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
|
||||
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
|
@ -1 +1 @@
|
||||
$(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,
|
||||
$(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,
|
@ -58,7 +58,7 @@ int is_cygdrive_here(int pos, char *in, int len)
|
||||
* Works in place since drive letter is always
|
||||
* shorter than /cygdrive/
|
||||
*/
|
||||
char *replace_cygdrive(char *in)
|
||||
char *replace_cygdrive_cygwin(char *in)
|
||||
{
|
||||
int len = strlen(in);
|
||||
char *out = malloc(len+1);
|
||||
@ -119,6 +119,61 @@ char *replace_substring(char *in, char *sub, char *rep)
|
||||
return out;
|
||||
}
|
||||
|
||||
char* msys_path_list; // @-separated list of paths prefix to look for
|
||||
char* msys_path_list_end; // Points to last \0 in msys_path_list.
|
||||
|
||||
void setup_msys_path_list(char* argument)
|
||||
{
|
||||
char* p;
|
||||
char* drive_letter_pos;
|
||||
|
||||
msys_path_list = strdup(&argument[2]);
|
||||
msys_path_list_end = &msys_path_list[strlen(msys_path_list)];
|
||||
|
||||
// Convert all at-sign (@) in path list to \0.
|
||||
// @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
p = msys_path_list;
|
||||
do {
|
||||
if (p[1] == ':') {
|
||||
// msys has mangled our path list, restore it from c:/... to /c/...
|
||||
drive_letter_pos = p+1;
|
||||
*drive_letter_pos = *p;
|
||||
*p = '/';
|
||||
}
|
||||
|
||||
// Look for an @ in the list
|
||||
p = strchr(p, '@');
|
||||
if (p != NULL) {
|
||||
*p = '\0';
|
||||
p++;
|
||||
}
|
||||
} while (p != NULL);
|
||||
}
|
||||
|
||||
char *replace_cygdrive_msys(char *in)
|
||||
{
|
||||
char* str;
|
||||
char* prefix;
|
||||
char* p;
|
||||
|
||||
str = strdup(in);
|
||||
|
||||
// For each prefix in the path list, search for it and replace /c/... with c:/...
|
||||
for (prefix = msys_path_list; prefix < msys_path_list_end && prefix != NULL; prefix += strlen(prefix)+1) {
|
||||
p=str;
|
||||
while ((p = strstr(p, prefix))) {
|
||||
char* drive_letter = p+1;
|
||||
*p = *drive_letter;
|
||||
*drive_letter = ':';
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char*(*replace_cygdrive)(char *in) = NULL;
|
||||
|
||||
char *files_to_delete[1024];
|
||||
int num_files_to_delete = 0;
|
||||
|
||||
@ -158,7 +213,7 @@ char *fix_at_file(char *in)
|
||||
|
||||
atout = fopen(name, "w");
|
||||
if (atout == NULL) {
|
||||
fprintf(stderr, "Could open temporary file for writing! %s\n", name);
|
||||
fprintf(stderr, "Could not open temporary file for writing! %s\n", name);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@ -167,7 +222,13 @@ char *fix_at_file(char *in)
|
||||
append(&buffer, &buflen, &used, block, blocklen);
|
||||
}
|
||||
buffer[used] = 0;
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath input from @-file %s: %s\n", &in[1], buffer);
|
||||
}
|
||||
fixed = replace_cygdrive(buffer);
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath converted to @-file %s is: %s\n", name, fixed);
|
||||
}
|
||||
fwrite(fixed, strlen(fixed), 1, atout);
|
||||
fclose(atin);
|
||||
fclose(atout);
|
||||
@ -194,12 +255,31 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
DWORD exitCode;
|
||||
|
||||
if (argc<2) {
|
||||
fprintf(stderr, "Usage: uncygdrive.exe /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
|
||||
if (argc<3 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
|
||||
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
line = replace_cygdrive(strstr(GetCommandLine(), argv[1]));
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath input line >%s<\n", strstr(GetCommandLine(), argv[1]));
|
||||
}
|
||||
|
||||
if (argv[1][1] == 'c' && argv[1][2] == '\0') {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "using cygwin mode\n");
|
||||
}
|
||||
replace_cygdrive = replace_cygdrive_cygwin;
|
||||
} else if (argv[1][1] == 'm') {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "using msys mode, with path list: %s\n", &argv[1][2]);
|
||||
}
|
||||
setup_msys_path_list(argv[1]);
|
||||
replace_cygdrive = replace_cygdrive_msys;
|
||||
} else {
|
||||
fprintf(stderr, "Unknown mode: %s\n", argv[1]);
|
||||
exit(-1);
|
||||
}
|
||||
line = replace_cygdrive(strstr(GetCommandLine(), argv[2]));
|
||||
|
||||
for (i=1; i<argc; ++i) {
|
||||
if (argv[i][0] == '@') {
|
||||
@ -210,8 +290,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (getenv("DEBUG_UNCYGDRIVE") != NULL) {
|
||||
fprintf(stderr, "uncygdrive >%s<\n", line);
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath converted line >%s<\n", line);
|
||||
}
|
||||
|
||||
ZeroMemory(&si,sizeof(si));
|
||||
@ -238,9 +318,9 @@ int main(int argc, char **argv)
|
||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
||||
GetExitCodeProcess(pi.hProcess,&exitCode);
|
||||
|
||||
if (getenv("DEBUG_UNCYGDRIVE") != NULL) {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
for (i=0; i<num_files_to_delete; ++i) {
|
||||
fprintf(stderr, "Not deleting temporary uncygdrive file %s\n",
|
||||
fprintf(stderr, "Not deleting temporary fixpath file %s\n",
|
||||
files_to_delete[i]);
|
||||
}
|
||||
}
|
29
configure
vendored
Normal file
29
configure
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# This is a thin wrapper which will call the real configure script, and
|
||||
# make sure that is called using bash.
|
||||
|
||||
this_script_dir=`dirname $0`
|
||||
bash $this_script_dir/common/autoconf/configure "$@"
|
Loading…
Reference in New Issue
Block a user