changeset 2550:e5c480ca7b29

8178965: Second part of JDK-8176785 Reviewed-by: erikj, mchung
author ihse
date Wed, 19 Apr 2017 10:58:18 +0200
parents 0bf994fa4ee5
children cfdfc9d56584
files common/autoconf/basics.m4 common/autoconf/generated-configure.sh common/autoconf/jdk-options.m4 common/autoconf/spec.gmk.in common/conf/jib-profiles.js
diffstat 5 files changed, 333 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/basics.m4	Wed Apr 19 10:44:40 2017 +0200
+++ b/common/autoconf/basics.m4	Wed Apr 19 10:58:18 2017 +0200
@@ -1095,6 +1095,7 @@
     OTOOL="true"
   fi
   BASIC_PATH_PROGS(READELF, [greadelf readelf])
+  BASIC_PATH_PROGS(DOT, dot)
   BASIC_PATH_PROGS(HG, hg)
   BASIC_PATH_PROGS(STAT, stat)
   BASIC_PATH_PROGS(TIME, time)
--- a/common/autoconf/generated-configure.sh	Wed Apr 19 10:44:40 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Wed Apr 19 10:58:18 2017 +0200
@@ -918,6 +918,7 @@
 INCLUDE_SA
 UNLIMITED_CRYPTO
 CACERTS_FILE
+ENABLE_FULL_DOCS
 ENABLE_HEADLESS_ONLY
 DEFAULT_MAKE_TARGET
 OS_VERSION_MICRO
@@ -935,6 +936,7 @@
 TIME
 STAT
 HG
+DOT
 READELF
 OTOOL
 LDD
@@ -1138,6 +1140,7 @@
 with_output_sync
 with_default_make_target
 enable_headless_only
+enable_full_docs
 with_cacerts_file
 enable_unlimited_crypto
 with_copyright_year
@@ -1290,6 +1293,7 @@
 LDD
 OTOOL
 READELF
+DOT
 HG
 STAT
 TIME
@@ -1970,6 +1974,7 @@
   --enable-debug          set the debug level to fastdebug (shorthand for
                           --with-debug-level=fastdebug) [disabled]
   --enable-headless-only  only build headless (no GUI) support [disabled]
+  --enable-full-docs      build complete documentation [disabled]
   --disable-unlimited-crypto
                           Disable unlimited crypto policy [enabled]
   --disable-keep-packaged-modules
@@ -2254,6 +2259,7 @@
   LDD         Override default value for LDD
   OTOOL       Override default value for OTOOL
   READELF     Override default value for READELF
+  DOT         Override default value for DOT
   HG          Override default value for HG
   STAT        Override default value for STAT
   TIME        Override default value for TIME
@@ -5174,7 +5180,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1490856742
+DATE_WHEN_GENERATED=1492592126
 
 ###############################################################################
 #
@@ -22473,6 +22479,203 @@
   # Publish this variable in the help.
 
 
+  if [ -z "${DOT+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in dot
+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_DOT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOT="$DOT" # 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_DOT="$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
+DOT=$ac_cv_path_DOT
+if test -n "$DOT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
+$as_echo "$DOT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$DOT" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !DOT! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
+    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 "xDOT" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in dot
+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_DOT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOT="$DOT" # 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_DOT="$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
+DOT=$ac_cv_path_DOT
+if test -n "$DOT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
+$as_echo "$DOT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$DOT" && 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 we try to supply an empty value
+      if test "x$DOT" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
+$as_echo_n "checking for DOT... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$DOT"
+        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 DOT=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool DOT=$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_DOT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOT="$DOT" # 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_DOT="$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
+DOT=$ac_cv_path_DOT
+if test -n "$DOT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
+$as_echo "$DOT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$DOT" = 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 DOT=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
+$as_echo_n "checking for DOT... " >&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 DOT=$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
+
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
   if [ -z "${HG+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in hg
@@ -24523,6 +24726,83 @@
 
 
 
+  # Should we build the complete docs, or just a lightweight version?
+  # Check whether --enable-full-docs was given.
+if test "${enable_full_docs+set}" = set; then :
+  enableval=$enable_full_docs;
+fi
+
+
+  # Verify dependencies
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
+$as_echo_n "checking for graphviz dot... " >&6; }
+  if test "x$DOT" != "x"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
+$as_echo "no, cannot generate full docs" >&6; }
+    FULL_DOCS_DEP_MISSING=true
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
+$as_echo_n "checking full docs... " >&6; }
+  if test "x$enable_full_docs" = xyes; then
+    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
+$as_echo "no, missing dependencies" >&6; }
+
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # dot is the help tag: freetype, cups, alsa etc
+  MISSING_DEPENDENCY=dot
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    cygwin_help $MISSING_DEPENDENCY
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    msys_help $MISSING_DEPENDENCY
+  else
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+      apt-get)
+        apt_help     $MISSING_DEPENDENCY ;;
+      yum)
+        yum_help     $MISSING_DEPENDENCY ;;
+      brew)
+        brew_help    $MISSING_DEPENDENCY ;;
+      port)
+        port_help    $MISSING_DEPENDENCY ;;
+      pkgutil)
+        pkgutil_help $MISSING_DEPENDENCY ;;
+      pkgadd)
+        pkgadd_help  $MISSING_DEPENDENCY ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+  fi
+
+      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
+    else
+      ENABLE_FULL_DOCS=true
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
+$as_echo "yes, forced" >&6; }
+    fi
+  elif test "x$enable_full_docs" = xno; then
+    ENABLE_FULL_DOCS=false
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
+$as_echo "no, forced" >&6; }
+  elif test "x$enable_full_docs" = x; then
+    ENABLE_FULL_DOCS=false
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, default" >&5
+$as_echo "no, default" >&6; }
+  else
+    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
+  fi
+
+
+
   # Choose cacerts source file
 
 # Check whether --with-cacerts-file was given.
--- a/common/autoconf/jdk-options.m4	Wed Apr 19 10:44:40 2017 +0200
+++ b/common/autoconf/jdk-options.m4	Wed Apr 19 10:58:18 2017 +0200
@@ -154,6 +154,41 @@
 
   AC_SUBST(ENABLE_HEADLESS_ONLY)
 
+  # Should we build the complete docs, or just a lightweight version?
+  AC_ARG_ENABLE([full-docs], [AS_HELP_STRING([--enable-full-docs],
+      [build complete documentation @<:@disabled@:>@])])
+
+  # Verify dependencies
+  AC_MSG_CHECKING([for graphviz dot])
+  if test "x$DOT" != "x"; then
+    AC_MSG_RESULT([yes])
+  else
+    AC_MSG_RESULT([no, cannot generate full docs])
+    FULL_DOCS_DEP_MISSING=true
+  fi
+
+  AC_MSG_CHECKING([full docs])
+  if test "x$enable_full_docs" = xyes; then
+    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
+      AC_MSG_RESULT([no, missing dependencies])
+      HELP_MSG_MISSING_DEPENDENCY([dot])
+      AC_MSG_ERROR([Cannot enable full docs with missing dependencies. See above. $HELP_MSG])
+    else
+      ENABLE_FULL_DOCS=true
+      AC_MSG_RESULT([yes, forced])
+    fi
+  elif test "x$enable_full_docs" = xno; then
+    ENABLE_FULL_DOCS=false
+    AC_MSG_RESULT([no, forced])
+  elif test "x$enable_full_docs" = x; then
+    ENABLE_FULL_DOCS=false
+    AC_MSG_RESULT([no, default])
+  else
+    AC_MSG_ERROR([--enable-full-docs can only take yes or no])
+  fi
+
+  AC_SUBST(ENABLE_FULL_DOCS)
+
   # Choose cacerts source file
   AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
       [specify alternative cacerts file])])
--- a/common/autoconf/spec.gmk.in	Wed Apr 19 10:44:40 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Wed Apr 19 10:58:18 2017 +0200
@@ -245,6 +245,8 @@
 # Only build headless support or not
 ENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@
 
+ENABLE_FULL_DOCS := @ENABLE_FULL_DOCS@
+
 # JDK_OUTPUTDIR specifies where a working jvm is built.
 # You can run $(JDK_OUTPUTDIR)/bin/java
 # Though the layout of the contents of $(JDK_OUTPUTDIR) is not
@@ -678,6 +680,7 @@
 READELF:=@READELF@
 EXPR:=@EXPR@
 FILE:=@FILE@
+DOT:=@DOT@
 HG:=@HG@
 OBJCOPY:=@OBJCOPY@
 SETFILE:=@SETFILE@
--- a/common/conf/jib-profiles.js	Wed Apr 19 10:44:40 2017 +0200
+++ b/common/conf/jib-profiles.js	Wed Apr 19 10:58:18 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -422,8 +422,9 @@
         "linux-x64": {
             target_os: "linux",
             target_cpu: "x64",
-            dependencies: ["devkit"],
-            configure_args: concat(common.configure_args_64bit, "--with-zlib=system"),
+            dependencies: ["devkit", "graphviz"],
+            configure_args: concat(common.configure_args_64bit,
+                "--enable-full-docs", "--with-zlib=system"),
             default_make_targets: ["docs-bundles"],
         },
 
@@ -964,7 +965,15 @@
             ext: "tar.gz",
             revision: "2.7.1-v120+1.0",
             module: "freetype-" + input.target_platform
-        }
+        },
+
+        graphviz: {
+            organization: common.organization,
+            ext: "tar.gz",
+            revision: "2.38.0-1+1.1",
+            module: "graphviz-" + input.target_platform,
+            configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot"
+        },
     };
 
     return dependencies;