8087193: Support building with devkits on Macosx
Reviewed-by: ihse
This commit is contained in:
parent
c8cd505356
commit
b0742f7a97
@ -436,7 +436,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
BASIC_PATH_PROGS(CYGPATH, cygpath)
|
||||
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
|
||||
BASIC_PATH_PROGS(DF, df)
|
||||
BASIC_PATH_PROGS(SETFILE, SetFile)
|
||||
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
|
||||
])
|
||||
|
||||
@ -574,10 +573,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# detect if Xcode is installed by running xcodebuild -version
|
||||
# If a devkit has been supplied, find xcodebuild in the toolchain_path.
|
||||
# If not, detect if Xcode is installed by running xcodebuild -version
|
||||
# if no Xcode installed, xcodebuild exits with 1
|
||||
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
|
||||
if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
# We need to use xcodebuild in the toolchain dir provided by the user, this will
|
||||
# fall back on the stub binary in /usr/bin/xcodebuild
|
||||
AC_PATH_PROG([XCODEBUILD], [xcodebuild], [/usr/bin/xcodebuild], [$TOOLCHAIN_PATH])
|
||||
@ -961,6 +961,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
BASIC_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
fi
|
||||
])
|
||||
|
||||
|
7
common/autoconf/build-aux/config.guess
vendored
7
common/autoconf/build-aux/config.guess
vendored
@ -86,4 +86,11 @@ if [ "x$OUT" = x ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cpu on Macosx when C preprocessor is not on the path
|
||||
echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
REAL_CPU=`uname -m`
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
echo $OUT
|
||||
|
@ -855,6 +855,7 @@ OS_VERSION_MINOR
|
||||
OS_VERSION_MAJOR
|
||||
PKG_CONFIG
|
||||
BASH_ARGS
|
||||
SETFILE
|
||||
CODESIGN
|
||||
XATTR
|
||||
DSYMUTIL
|
||||
@ -946,7 +947,6 @@ build_vendor
|
||||
build_cpu
|
||||
build
|
||||
CPIO
|
||||
SETFILE
|
||||
DF
|
||||
READLINK
|
||||
CYGPATH
|
||||
@ -1167,7 +1167,6 @@ SED
|
||||
CYGPATH
|
||||
READLINK
|
||||
DF
|
||||
SETFILE
|
||||
CPIO
|
||||
UNZIP
|
||||
ZIP
|
||||
@ -1180,6 +1179,7 @@ TIME
|
||||
DSYMUTIL
|
||||
XATTR
|
||||
CODESIGN
|
||||
SETFILE
|
||||
PKG_CONFIG
|
||||
JAVA
|
||||
JAVAC
|
||||
@ -2049,7 +2049,6 @@ Some influential environment variables:
|
||||
CYGPATH Override default value for CYGPATH
|
||||
READLINK Override default value for READLINK
|
||||
DF Override default value for DF
|
||||
SETFILE Override default value for SETFILE
|
||||
CPIO Override default value for CPIO
|
||||
UNZIP Override default value for UNZIP
|
||||
ZIP Override default value for ZIP
|
||||
@ -2062,6 +2061,7 @@ Some influential environment variables:
|
||||
DSYMUTIL Override default value for DSYMUTIL
|
||||
XATTR Override default value for XATTR
|
||||
CODESIGN Override default value for CODESIGN
|
||||
SETFILE Override default value for SETFILE
|
||||
PKG_CONFIG path to pkg-config utility
|
||||
JAVA Override default value for JAVA
|
||||
JAVAC Override default value for JAVAC
|
||||
@ -4364,7 +4364,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1433337614
|
||||
DATE_WHEN_GENERATED=1434614912
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -13055,192 +13055,6 @@ $as_echo "$tool_specified" >&6; }
|
||||
|
||||
|
||||
|
||||
# Publish this variable in the help.
|
||||
|
||||
|
||||
if test "x$SETFILE" = x; then
|
||||
# The variable is not set by user, try to locate tool using the code snippet
|
||||
for ac_prog in SetFile
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_SETFILE+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $SETFILE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
SETFILE=$ac_cv_path_SETFILE
|
||||
if test -n "$SETFILE"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
|
||||
$as_echo "$SETFILE" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$SETFILE" && break
|
||||
done
|
||||
|
||||
else
|
||||
# The variable is set, but is it from the command line or the environment?
|
||||
|
||||
# Try to remove the string !SETFILE! from our list.
|
||||
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
|
||||
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
|
||||
# If it failed, the variable was not from the command line. Ignore it,
|
||||
# but warn the user (except for BASH, which is always set by the calling BASH).
|
||||
if test "xSETFILE" != xBASH; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
|
||||
fi
|
||||
# Try to locate tool using the code snippet
|
||||
for ac_prog in SetFile
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_SETFILE+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $SETFILE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
SETFILE=$ac_cv_path_SETFILE
|
||||
if test -n "$SETFILE"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
|
||||
$as_echo "$SETFILE" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$SETFILE" && break
|
||||
done
|
||||
|
||||
else
|
||||
# If it succeeded, then it was overridden by the user. We will use it
|
||||
# for the tool.
|
||||
|
||||
# First remove it from the list of overridden variables, so we can test
|
||||
# for unknown variables in the end.
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
|
||||
|
||||
# Check if the provided tool contains a complete path.
|
||||
tool_specified="$SETFILE"
|
||||
tool_basename="${tool_specified##*/}"
|
||||
if test "x$tool_basename" = "x$tool_specified"; then
|
||||
# A command without a complete path is provided, search $PATH.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
|
||||
$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
|
||||
# Extract the first word of "$tool_basename", so it can be a program name with args.
|
||||
set dummy $tool_basename; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_SETFILE+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $SETFILE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
SETFILE=$ac_cv_path_SETFILE
|
||||
if test -n "$SETFILE"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
|
||||
$as_echo "$SETFILE" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "x$SETFILE" = x; then
|
||||
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
|
||||
$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
|
||||
$as_echo_n "checking for SETFILE... " >&6; }
|
||||
if test ! -x "$tool_specified"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
|
||||
$as_echo "$tool_specified" >&6; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Publish this variable in the help.
|
||||
|
||||
|
||||
@ -15140,10 +14954,11 @@ fi
|
||||
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# detect if Xcode is installed by running xcodebuild -version
|
||||
# If a devkit has been supplied, find xcodebuild in the toolchain_path.
|
||||
# If not, detect if Xcode is installed by running xcodebuild -version
|
||||
# if no Xcode installed, xcodebuild exits with 1
|
||||
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
|
||||
if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
# We need to use xcodebuild in the toolchain dir provided by the user, this will
|
||||
# fall back on the stub binary in /usr/bin/xcodebuild
|
||||
# Extract the first word of "xcodebuild", so it can be a program name with args.
|
||||
@ -19653,6 +19468,199 @@ $as_echo "no" >&6; }
|
||||
$as_echo "yes" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Publish this variable in the help.
|
||||
|
||||
|
||||
if test "x$SETFILE" = x; then
|
||||
# The variable is not set by user, try to locate tool using the code snippet
|
||||
for ac_prog in SetFile
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_SETFILE+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $SETFILE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
SETFILE=$ac_cv_path_SETFILE
|
||||
if test -n "$SETFILE"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
|
||||
$as_echo "$SETFILE" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$SETFILE" && break
|
||||
done
|
||||
|
||||
else
|
||||
# The variable is set, but is it from the command line or the environment?
|
||||
|
||||
# Try to remove the string !SETFILE! from our list.
|
||||
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
|
||||
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
|
||||
# If it failed, the variable was not from the command line. Ignore it,
|
||||
# but warn the user (except for BASH, which is always set by the calling BASH).
|
||||
if test "xSETFILE" != xBASH; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
|
||||
fi
|
||||
# Try to locate tool using the code snippet
|
||||
for ac_prog in SetFile
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_SETFILE+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $SETFILE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
SETFILE=$ac_cv_path_SETFILE
|
||||
if test -n "$SETFILE"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
|
||||
$as_echo "$SETFILE" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$SETFILE" && break
|
||||
done
|
||||
|
||||
else
|
||||
# If it succeeded, then it was overridden by the user. We will use it
|
||||
# for the tool.
|
||||
|
||||
# First remove it from the list of overridden variables, so we can test
|
||||
# for unknown variables in the end.
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
|
||||
|
||||
# Check if the provided tool contains a complete path.
|
||||
tool_specified="$SETFILE"
|
||||
tool_basename="${tool_specified##*/}"
|
||||
if test "x$tool_basename" = "x$tool_specified"; then
|
||||
# A command without a complete path is provided, search $PATH.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
|
||||
$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
|
||||
# Extract the first word of "$tool_basename", so it can be a program name with args.
|
||||
set dummy $tool_basename; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_SETFILE+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $SETFILE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
SETFILE=$ac_cv_path_SETFILE
|
||||
if test -n "$SETFILE"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
|
||||
$as_echo "$SETFILE" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test "x$SETFILE" = x; then
|
||||
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
|
||||
$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
|
||||
$as_echo_n "checking for SETFILE... " >&6; }
|
||||
if test ! -x "$tool_specified"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
|
||||
$as_echo "$tool_specified" >&6; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "x$SETFILE" = x; then
|
||||
as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
147
make/devkit/createMacosxDevkit.sh
Normal file
147
make/devkit/createMacosxDevkit.sh
Normal file
@ -0,0 +1,147 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 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 script copies part of an Xcode installer into a devkit suitable
|
||||
# for building OpenJDK and OracleJDK. The installation .dmg files for Xcode
|
||||
# and the aux tools need to be available.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
USAGE="$0 <Xcode.dmg> <XQuartz.dmg> [<auxtools.dmg>]"
|
||||
|
||||
if [ "$1" = "" ] || [ "$2" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XCODE_DMG="$1"
|
||||
XQUARTZ_DMG="$2"
|
||||
AUXTOOLS_DMG="$3"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
# Mount XCODE_DMG
|
||||
if [ -e "/Volumes/Xcode" ]; then
|
||||
hdiutil detach /Volumes/Xcode
|
||||
fi
|
||||
hdiutil attach $XCODE_DMG
|
||||
|
||||
# Find the version of Xcode
|
||||
XCODE_VERSION="$(/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version \
|
||||
| awk '/Xcode/ { print $2 }' )"
|
||||
|
||||
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-devkit"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Xcode version: $XCODE_VERSION"
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
################################################################################
|
||||
# Copy files to root
|
||||
mkdir -p $DEVKIT_ROOT
|
||||
if [ ! -d $DEVKIT_ROOT/Xcode.app ]; then
|
||||
echo "Copying Xcode.app..."
|
||||
cp -RH "/Volumes/Xcode/Xcode.app" $DEVKIT_ROOT/
|
||||
fi
|
||||
# Trim out some seemingly unneeded parts to save space.
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Applications
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/iPhone*
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Documentation
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/share/man
|
||||
if [ -e $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk ]; then
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/share/man
|
||||
fi
|
||||
|
||||
hdiutil detach /Volumes/Xcode
|
||||
|
||||
################################################################################
|
||||
# Copy Freetype into sysroot
|
||||
if [ -e "/Volumes/XQuartz-*" ]; then
|
||||
hdiutil detach /Volumes/XQuartz-*
|
||||
fi
|
||||
hdiutil attach $XQUARTZ_DMG
|
||||
|
||||
echo "Copying freetype..."
|
||||
rm -rf /tmp/XQuartz
|
||||
pkgutil --expand /Volumes/XQuartz-*/XQuartz.pkg /tmp/XQuartz/
|
||||
rm -rf /tmp/x11
|
||||
mkdir /tmp/x11
|
||||
cd /tmp/x11
|
||||
cat /tmp/XQuartz-*/x11.pkg/Payload | gunzip -dc |cpio -i
|
||||
|
||||
cp -RH opt/X11/include/freetype2 \
|
||||
$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/
|
||||
cp -RH opt/X11/include/ft2build.h \
|
||||
$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/
|
||||
cp -RH opt/X11/lib/libfreetype.* \
|
||||
$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/
|
||||
|
||||
cd -
|
||||
|
||||
hdiutil detach /Volumes/XQuartz-*
|
||||
|
||||
################################################################################
|
||||
# Optionally copy PackageMaker
|
||||
|
||||
if [ -e "$AUXTOOLS_DMG" ]; then
|
||||
if [ -e "/Volumes/Auxiliary Tools" ]; then
|
||||
hdiutil detach "/Volumes/Auxiliary Tools"
|
||||
fi
|
||||
hdiutil attach $AUXTOOLS_DMG
|
||||
|
||||
echo "Copying PackageMaker.app..."
|
||||
cp -RH "/Volumes/Auxiliary Tools/PackageMaker.app" $DEVKIT_ROOT/
|
||||
|
||||
hdiutil detach "/Volumes/Auxiliary Tools"
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
|
||||
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk\""
|
||||
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/PackageMaker.app/Contents/MacOS:\$DEVKIT_TOOLCHAIN_PATH\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle..."
|
||||
(cd $DEVKIT_ROOT && tar c - . | gzip - > "$DEVKIT_BUNDLE")
|
Loading…
Reference in New Issue
Block a user