8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
authorerikj
Fri, 08 Jul 2016 08:55:54 +0200
changeset 39384 adde8cb7d01b
parent 39383 a62d88d56a71
child 39387 4aec4f659343
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed Reviewed-by: dholmes, prr
common/autoconf/generated-configure.sh
common/autoconf/hotspot.m4
common/autoconf/jdk-options.m4
common/autoconf/libraries.m4
common/autoconf/spec.gmk.in
make/CompileJavaModules.gmk
make/Images.gmk
make/Javadoc.gmk
--- a/common/autoconf/generated-configure.sh	Thu Jul 07 18:34:58 2016 +0000
+++ b/common/autoconf/generated-configure.sh	Fri Jul 08 08:55:54 2016 +0200
@@ -976,7 +976,6 @@
 DEBUG_LEVEL
 HOTSPOT_DEBUG_LEVEL
 JDK_VARIANT
-SET_OPENJDK
 USERNAME
 CANONICAL_TOPDIR
 ORIGINAL_TOPDIR
@@ -5095,7 +5094,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1467223237
+DATE_WHEN_GENERATED=1467960715
 
 ###############################################################################
 #
@@ -16592,41 +16591,17 @@
 fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
-$as_echo_n "checking for presence of closed sources... " >&6; }
-  if test -d "$SRC_ROOT/jdk/src/closed"; then
-    CLOSED_SOURCE_PRESENT=yes
-  else
-    CLOSED_SOURCE_PRESENT=no
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
-$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
-$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
-  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
-$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
-
-  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
-    OPENJDK=true
-    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
-$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
-    fi
-  else
-    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
-      OPENJDK=true
-    else
-      OPENJDK=false
-    fi
-  fi
-
-  if test "x$OPENJDK" = "xtrue"; then
-    SET_OPENJDK="OPENJDK=true"
-  fi
-
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
+$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
+$as_echo "$enable_openjdk_only" >&6; }
+  if test "x$enable_openjdk_only" = "xyes"; then
+    SUPPRESS_CUSTOM_EXTENSIONS="true"
+  elif test "x$enable_openjdk_only" = "xno"; then
+    SUPPRESS_CUSTOM_EXTENSIONS="false"
+  else
+    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
+  fi
 
   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
   # the IncludeCustomExtension macro.
@@ -53313,11 +53288,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
 $as_echo "no, forced" >&6; }
   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
-    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
-      INCLUDE_DTRACE=false
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
-$as_echo "no, non-open linux build" >&6; }
-    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
+    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
       INCLUDE_DTRACE=false
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
 $as_echo "no, missing dependencies" >&6; }
@@ -53596,11 +53567,9 @@
     NEEDS_LIB_CUPS=true
   fi
 
-  # Check if freetype is needed
-  if test "x$OPENJDK" = "xtrue"; then
+  # A custom hook may have set this already
+  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
     NEEDS_LIB_FREETYPE=true
-  else
-    NEEDS_LIB_FREETYPE=false
   fi
 
   # Check if alsa is needed
--- a/common/autoconf/hotspot.m4	Thu Jul 07 18:34:58 2016 +0000
+++ b/common/autoconf/hotspot.m4	Fri Jul 08 08:55:54 2016 +0200
@@ -161,10 +161,7 @@
     INCLUDE_DTRACE=false
     AC_MSG_RESULT([no, forced])
   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
-    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
-      INCLUDE_DTRACE=false
-      AC_MSG_RESULT([no, non-open linux build])
-    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
+    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
       INCLUDE_DTRACE=false
       AC_MSG_RESULT([no, missing dependencies])
     else
--- a/common/autoconf/jdk-options.m4	Thu Jul 07 18:34:58 2016 +0000
+++ b/common/autoconf/jdk-options.m4	Fri Jul 08 08:55:54 2016 +0200
@@ -117,36 +117,15 @@
   AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
       [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
 
-  AC_MSG_CHECKING([for presence of closed sources])
-  if test -d "$SRC_ROOT/jdk/src/closed"; then
-    CLOSED_SOURCE_PRESENT=yes
+  AC_MSG_CHECKING([if custom source is suppressed (openjdk-only)])
+  AC_MSG_RESULT([$enable_openjdk_only])
+  if test "x$enable_openjdk_only" = "xyes"; then
+    SUPPRESS_CUSTOM_EXTENSIONS="true"
+  elif test "x$enable_openjdk_only" = "xno"; then
+    SUPPRESS_CUSTOM_EXTENSIONS="false"
   else
-    CLOSED_SOURCE_PRESENT=no
+    AC_MSG_ERROR([Invalid value for --enable-openjdk-only: $enable_openjdk_only])
   fi
-  AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
-
-  AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)])
-  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
-  AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE])
-
-  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
-    OPENJDK=true
-    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
-      AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
-    fi
-  else
-    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
-      OPENJDK=true
-    else
-      OPENJDK=false
-    fi
-  fi
-
-  if test "x$OPENJDK" = "xtrue"; then
-    SET_OPENJDK="OPENJDK=true"
-  fi
-
-  AC_SUBST(SET_OPENJDK)
 
   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
   # the IncludeCustomExtension macro.
--- a/common/autoconf/libraries.m4	Thu Jul 07 18:34:58 2016 +0000
+++ b/common/autoconf/libraries.m4	Fri Jul 08 08:55:54 2016 +0200
@@ -59,11 +59,9 @@
     NEEDS_LIB_CUPS=true
   fi
 
-  # Check if freetype is needed
-  if test "x$OPENJDK" = "xtrue"; then
+  # A custom hook may have set this already
+  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
     NEEDS_LIB_FREETYPE=true
-  else
-    NEEDS_LIB_FREETYPE=false
   fi
 
   # Check if alsa is needed
--- a/common/autoconf/spec.gmk.in	Thu Jul 07 18:34:58 2016 +0000
+++ b/common/autoconf/spec.gmk.in	Fri Jul 08 08:55:54 2016 +0200
@@ -108,7 +108,6 @@
 REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
 REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
 
-@SET_OPENJDK@
 LIBM:=@LIBM@
 LIBDL:=@LIBDL@
 
--- a/make/CompileJavaModules.gmk	Thu Jul 07 18:34:58 2016 +0000
+++ b/make/CompileJavaModules.gmk	Fri Jul 08 08:55:54 2016 +0200
@@ -205,11 +205,6 @@
   java.desktop_EXCLUDES += sun/applet
 endif
 
-# Why is this in the open source tree?
-ifdef OPENJDK
-  java.desktop_EXCLUDES += sun/dc
-endif
-
 # Used on windows and macosx
 ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
   java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
--- a/make/Images.gmk	Thu Jul 07 18:34:58 2016 +0000
+++ b/make/Images.gmk	Fri Jul 08 08:55:54 2016 +0200
@@ -207,12 +207,6 @@
       tnameserv.1 \
       unpack200.1
 
-  ifndef OPENJDK
-    ifneq ($(OPENJDK_TARGET_OS), solaris)
-      JRE_MAN_PAGES += javaws.1
-    endif
-  endif
-
   JDK_MAN_PAGES += \
       $(JRE_MAN_PAGES) \
       appletviewer.1 \
--- a/make/Javadoc.gmk	Thu Jul 07 18:34:58 2016 +0000
+++ b/make/Javadoc.gmk	Fri Jul 08 08:55:54 2016 +0200
@@ -290,19 +290,15 @@
 
 # Common javadoc options used by all bundles
 
-ifdef OPENJDK
-  ADDITIONAL_JAVADOCFLAGS = \
-      -Xdocrootparent $(DOCS_BASE_URL)
-else
-  ADDITIONAL_JAVADOCFLAGS =
-endif
+# This flag may be overridden from a custom makefile
+DOCROOTPARENT_FLAG = -Xdocrootparent $(DOCS_BASE_URL)
 
 define COMMON_JAVADOCFLAGS
     $(call OptionOnly,-XDignore.symbol.file=true) ; \
     $(call OptionOnly,-quiet) ; \
     $(call OptionOnly,-use) ; \
     $(call OptionOnly,-keywords) ; \
-    $(call OptionOnly,$(ADDITIONAL_JAVADOCFLAGS))
+    $(call OptionOnly,$(DOCROOTPARENT_FLAG))
 endef
 
 # Common javadoc tags used by all bundles
@@ -1038,8 +1034,6 @@
 
 MGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extension
 MGMT2COREAPI := ../../$(JDKJRE2COREAPI)
-JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mib
-JVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/jdk.snmp/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
 MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
 MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
 MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
@@ -1063,11 +1057,6 @@
 # Run javadoc if the index file is out of date or missing
 $(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) $(COREAPI_INDEX_FILE)
 	$(prep-javadoc)
-	@if [ -f $(JVM_MIB_SRC) ] ; then \
-	  $(CP) $(JVM_MIB_SRC) $(@D)/.. ; \
-	else \
-	  $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \
-	fi
 	$(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
 	$(JAVADOC_CMD_SMALL) -d $(@D) \
 	    @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
@@ -1704,3 +1693,7 @@
 #############################################################
 .PHONY: all docs coredocs otherdocs \
      $(ALL_OTHER_TARGETS) zip-docs
+
+################################################################################
+
+$(eval $(call IncludeCustomExtension, , Javadoc-post.gmk))