< prev index next >

make/autoconf/basics.m4

Print this page
rev 52915 : 8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC
Reviewed-by: tbell, ysuenaga, andrew
rev 52923 : 8226346: Build better binary builders
Reviewed-by: andrew


 624   # was not available at that time.
 625   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
 626   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
 627     ORIGINAL_PATH="$REWRITTEN_PATH"
 628     AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
 629   fi
 630 
 631   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 632     PATH_SEP=";"
 633     BASIC_CHECK_PATHS_WINDOWS
 634   else
 635     PATH_SEP=":"
 636   fi
 637   AC_SUBST(PATH_SEP)
 638 
 639   # We get the top-level directory from the supporting wrappers.
 640   AC_MSG_CHECKING([for top-level directory])
 641   AC_MSG_RESULT([$TOPDIR])
 642   AC_SUBST(TOPDIR)
 643 







 644   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
 645   BASIC_FIXUP_PATH(CURDIR)
 646   BASIC_FIXUP_PATH(TOPDIR)
 647 
 648   # Locate the directory of this script.
 649   AUTOCONF_DIR=$TOPDIR/make/autoconf
 650 
 651   # Setup username (for use in adhoc version strings etc)
 652   # Outer [ ] to quote m4.
 653   [ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
 654   AC_SUBST(USERNAME)
 655 ])
 656 
 657 ###############################################################################
 658 # Evaluates platform specific overrides for devkit variables.
 659 # $1: Name of variable
 660 AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
 661 [
 662   if test "x[$]$1" = x; then
 663     eval $1="\${$1_${OPENJDK_TARGET_CPU}}"


 850 [
 851 
 852   AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
 853       [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
 854       [ CONF_NAME=${with_conf_name} ])
 855 
 856   # Test from where we are running configure, in or outside of src root.
 857   AC_MSG_CHECKING([where to store configuration])
 858   if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
 859       || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
 860       || test "x$CURDIR" = "x$TOPDIR/make" ; then
 861     # We are running configure from the src root.
 862     # Create a default ./build/target-variant-debuglevel output root.
 863     if test "x${CONF_NAME}" = x; then
 864       AC_MSG_RESULT([in default location])
 865       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
 866     else
 867       AC_MSG_RESULT([in build directory with custom name])
 868     fi
 869 
 870     if test "x$CUSTOM_ROOT" != x; then
 871       OUTPUTDIR="${CUSTOM_ROOT}/build/${CONF_NAME}"
 872     else
 873       OUTPUTDIR="${TOPDIR}/build/${CONF_NAME}"
 874     fi
 875     $MKDIR -p "$OUTPUTDIR"
 876     if test ! -d "$OUTPUTDIR"; then
 877       AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
 878     fi
 879   else
 880     # We are running configure from outside of the src dir.
 881     # Then use the current directory as output dir!
 882     # If configuration is situated in normal build directory, just use the build
 883     # directory name as configuration name, otherwise use the complete path.
 884     if test "x${CONF_NAME}" = x; then
 885       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
 886     fi
 887     OUTPUTDIR="$CURDIR"
 888     AC_MSG_RESULT([in current directory])
 889 
 890     # WARNING: This might be a bad thing to do. You need to be sure you want to
 891     # have a configuration in this directory. Do some sanity checks!
 892 
 893     if test ! -e "$OUTPUTDIR/spec.gmk"; then
 894       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for




 624   # was not available at that time.
 625   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
 626   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
 627     ORIGINAL_PATH="$REWRITTEN_PATH"
 628     AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
 629   fi
 630 
 631   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 632     PATH_SEP=";"
 633     BASIC_CHECK_PATHS_WINDOWS
 634   else
 635     PATH_SEP=":"
 636   fi
 637   AC_SUBST(PATH_SEP)
 638 
 639   # We get the top-level directory from the supporting wrappers.
 640   AC_MSG_CHECKING([for top-level directory])
 641   AC_MSG_RESULT([$TOPDIR])
 642   AC_SUBST(TOPDIR)
 643 
 644   if test "x$CUSTOM_ROOT" != x; then
 645     WORKSPACE_ROOT="${CUSTOM_ROOT}"
 646   else
 647     WORKSPACE_ROOT="${TOPDIR}"
 648   fi
 649   AC_SUBST(WORKSPACE_ROOT)
 650 
 651   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
 652   BASIC_FIXUP_PATH(CURDIR)
 653   BASIC_FIXUP_PATH(TOPDIR)
 654 
 655   # Locate the directory of this script.
 656   AUTOCONF_DIR=$TOPDIR/make/autoconf
 657 
 658   # Setup username (for use in adhoc version strings etc)
 659   # Outer [ ] to quote m4.
 660   [ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
 661   AC_SUBST(USERNAME)
 662 ])
 663 
 664 ###############################################################################
 665 # Evaluates platform specific overrides for devkit variables.
 666 # $1: Name of variable
 667 AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
 668 [
 669   if test "x[$]$1" = x; then
 670     eval $1="\${$1_${OPENJDK_TARGET_CPU}}"


 857 [
 858 
 859   AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
 860       [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
 861       [ CONF_NAME=${with_conf_name} ])
 862 
 863   # Test from where we are running configure, in or outside of src root.
 864   AC_MSG_CHECKING([where to store configuration])
 865   if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
 866       || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
 867       || test "x$CURDIR" = "x$TOPDIR/make" ; then
 868     # We are running configure from the src root.
 869     # Create a default ./build/target-variant-debuglevel output root.
 870     if test "x${CONF_NAME}" = x; then
 871       AC_MSG_RESULT([in default location])
 872       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
 873     else
 874       AC_MSG_RESULT([in build directory with custom name])
 875     fi
 876 
 877     OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"




 878     $MKDIR -p "$OUTPUTDIR"
 879     if test ! -d "$OUTPUTDIR"; then
 880       AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
 881     fi
 882   else
 883     # We are running configure from outside of the src dir.
 884     # Then use the current directory as output dir!
 885     # If configuration is situated in normal build directory, just use the build
 886     # directory name as configuration name, otherwise use the complete path.
 887     if test "x${CONF_NAME}" = x; then
 888       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
 889     fi
 890     OUTPUTDIR="$CURDIR"
 891     AC_MSG_RESULT([in current directory])
 892 
 893     # WARNING: This might be a bad thing to do. You need to be sure you want to
 894     # have a configuration in this directory. Do some sanity checks!
 895 
 896     if test ! -e "$OUTPUTDIR/spec.gmk"; then
 897       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for


< prev index next >