< prev index next >

make/autoconf/basics.m4

Print this page

        

@@ -1,7 +1,7 @@
 #
-# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, 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

@@ -221,12 +221,10 @@
   if test "x[$]$1" != x; then
     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)
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
-      BASIC_FIXUP_PATH_WSL($1)
     else
       # We're on a unix platform. Hooray! :)
       path="[$]$1"
       has_space=`$ECHO "$path" | $GREP " "`
       if test "x$has_space" != x; then

@@ -270,12 +268,10 @@
   if test "x[$]$1" != x; then
     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)
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
-      BASIC_FIXUP_EXECUTABLE_WSL($1)
     else
       # We're on a unix platform. Hooray! :)
       # First separate the path from the arguments. This will split at the first
       # space.
       complete="[$]$1"

@@ -404,12 +400,10 @@
 ###############################################################################
 AC_DEFUN_ONCE([BASIC_INIT],
 [
   # Save the original command line. This is passed to us by the wrapper configure script.
   AC_SUBST(CONFIGURE_COMMAND_LINE)
-  # AUTOCONF might be set in the environment by the user. Preserve for "make reconfigure".
-  AC_SUBST(AUTOCONF)
   # Save the path variable before it gets changed
   ORIGINAL_PATH="$PATH"
   AC_SUBST(ORIGINAL_PATH)
   DATE_WHEN_CONFIGURED=`LANG=C date`
   AC_SUBST(DATE_WHEN_CONFIGURED)

@@ -611,25 +605,22 @@
   # Always use the bash builtin pwd to get uniform behavior.
   THEPWDCMD=pwd
 
   # These are not required on all platforms
   BASIC_PATH_PROGS(CYGPATH, cygpath)
-  BASIC_PATH_PROGS(WSLPATH, wslpath)
   BASIC_PATH_PROGS(DF, df)
   BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
   BASIC_PATH_PROGS(NICE, nice)
-
-  BASIC_PATH_PROGS(LSB_RELEASE, lsb_release)
-  BASIC_PATH_PROGS(CMD, [cmd.exe /mnt/c/Windows/System32/cmd.exe])
+  BASIC_PATH_PROGS(PANDOC, pandoc)
 ])
 
 ###############################################################################
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
 AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
 [
   # Save the current directory this script was started from
-  CONFIGURE_START_DIR="$PWD"
+  CURDIR="$PWD"
 
   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
   # was not available at that time.
   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`

@@ -638,27 +629,23 @@
     AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
   fi
 
   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
     PATH_SEP=";"
-    EXE_SUFFIX=".exe"
     BASIC_CHECK_PATHS_WINDOWS
   else
     PATH_SEP=":"
-    EXE_SUFFIX=""
   fi
   AC_SUBST(PATH_SEP)
-  AC_SUBST(EXE_SUFFIX)
 
   # We get the top-level directory from the supporting wrappers.
   AC_MSG_CHECKING([for top-level directory])
   AC_MSG_RESULT([$TOPDIR])
   AC_SUBST(TOPDIR)
-  AC_SUBST(CONFIGURE_START_DIR)
 
   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
-  BASIC_FIXUP_PATH(CONFIGURE_START_DIR)
+  BASIC_FIXUP_PATH(CURDIR)
   BASIC_FIXUP_PATH(TOPDIR)
 
   # Locate the directory of this script.
   AUTOCONF_DIR=$TOPDIR/make/autoconf
 

@@ -867,42 +854,40 @@
       [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.
   AC_MSG_CHECKING([where to store configuration])
-  if test "x$CONFIGURE_START_DIR" = "x$TOPDIR" \
-      || test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
-      || test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
-      || test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make" ; then
+  if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
+      || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
+      || test "x$CURDIR" = "x$TOPDIR/make" ; then
     # We are running configure from the src root.
     # Create a default ./build/target-variant-debuglevel output root.
     if test "x${CONF_NAME}" = x; then
       AC_MSG_RESULT([in default location])
       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
     else
       AC_MSG_RESULT([in build directory with custom name])
     fi
 
     if test "x$CUSTOM_ROOT" != x; then
-      WORKSPACE_ROOT="${CUSTOM_ROOT}"
+      OUTPUTDIR="${CUSTOM_ROOT}/build/${CONF_NAME}"
     else
-      WORKSPACE_ROOT="${TOPDIR}"
+      OUTPUTDIR="${TOPDIR}/build/${CONF_NAME}"
     fi
-    OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
     $MKDIR -p "$OUTPUTDIR"
     if test ! -d "$OUTPUTDIR"; then
       AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
     fi
   else
     # We are running configure from outside of the src dir.
     # Then use the current directory as output dir!
     # If configuration is situated in normal build directory, just use the build
     # directory name as configuration name, otherwise use the complete path.
     if test "x${CONF_NAME}" = x; then
-      CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
+      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
     fi
-    OUTPUTDIR="$CONFIGURE_START_DIR"
+    OUTPUTDIR="$CURDIR"
     AC_MSG_RESULT([in current directory])
 
     # WARNING: This might be a bad thing to do. You need to be sure you want to
     # have a configuration in this directory. Do some sanity checks!
 

@@ -918,18 +903,18 @@
               -e 's/confdefs.h//g' \
               -e 's/configure-support//g' \
               -e 's/ //g' \
           | $TR -d '\n'`
       if test "x$filtered_files" != x; then
-        AC_MSG_NOTICE([Current directory is $CONFIGURE_START_DIR.])
+        AC_MSG_NOTICE([Current directory is $CURDIR.])
         AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
         AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
         AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
         AC_MSG_NOTICE([seriously mess up just about everything.])
         AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
         AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
-        AC_MSG_ERROR([Will not continue creating configuration in $CONFIGURE_START_DIR])
+        AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
       fi
     fi
   fi
   AC_MSG_CHECKING([what configuration name to use])
   AC_MSG_RESULT([$CONF_NAME])

@@ -941,11 +926,10 @@
 
   SPEC="$OUTPUTDIR/spec.gmk"
   AC_SUBST(SPEC)
   AC_SUBST(CONF_NAME)
   AC_SUBST(OUTPUTDIR)
-  AC_SUBST(WORKSPACE_ROOT)
   AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
 
   # The spec.gmk file contains all variables for the make system.
   AC_CONFIG_FILES([$OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
   # The bootcycle-spec.gmk file contains support for boot cycle builds.

@@ -994,12 +978,10 @@
         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'
-          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
-            MAKE_EXPECTED_ENV='x86_64-.*-linux-gnu'
           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`

@@ -1187,11 +1169,10 @@
   BASIC_CHECK_GNU_MAKE
 
   BASIC_CHECK_FIND_DELETE
   BASIC_CHECK_TAR
   BASIC_CHECK_GREP
-  BASIC_SETUP_PANDOC
 
   # These tools might not be installed by default,
   # need hint on how to install them.
   BASIC_REQUIRE_PROGS(UNZIP, unzip)
   # Since zip uses "ZIP" as a environment variable for passing options, we need

@@ -1284,22 +1265,11 @@
       DF_LOCAL_ONLY_OPTION='-l'
     fi
     if $DF $DF_LOCAL_ONLY_OPTION $1 > /dev/null 2>&1; then
       $2
     else
-      # In WSL, local Windows drives are considered remote by df, but we are
-      # required to build into a directory accessible from windows, so consider
-      # them local here.
-      if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
-        if $DF $1 | $GREP -q "^[[A-Z]]:"; then
-          $2
-        else
-          $3
-        fi
-      else
-        $3
-      fi
+      $3
     fi
   fi
 ])
 
 ###############################################################################

@@ -1374,38 +1344,10 @@
   AC_SUBST(BASH_ARGS)
 ])
 
 ################################################################################
 #
-# Setup Pandoc
-#
-AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
-[
-  BASIC_PATH_PROGS(PANDOC, pandoc)
-
-  PANDOC_MARKDOWN_FLAG="markdown"
-  if test -n "$PANDOC"; then
-    AC_MSG_CHECKING(if the pandoc smart extension needs to be disabled for markdown)
-    if $PANDOC --list-extensions | $GREP -q '\+smart'; then
-      AC_MSG_RESULT([yes])
-      PANDOC_MARKDOWN_FLAG="markdown-smart"
-    else
-      AC_MSG_RESULT([no])
-    fi
-  fi
-
-  if test -n "$PANDOC"; then
-    ENABLE_PANDOC="true"
-  else
-    ENABLE_PANDOC="false"
-  fi
-  AC_SUBST(ENABLE_PANDOC)
-  AC_SUBST(PANDOC_MARKDOWN_FLAG)
-])
-
-################################################################################
-#
 # Default make target
 #
 AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
 [
   AC_ARG_WITH(default-make-target, [AS_HELP_STRING([--with-default-make-target],
< prev index next >