8044773: Refactor jdk.net API so that it can be moved out of the base module
authorchegar
Wed, 27 Apr 2016 20:35:23 +0100
changeset 37650 ef6c24163cb2
parent 37649 3809534d4531
child 37651 993399568864
8044773: Refactor jdk.net API so that it can be moved out of the base module Reviewed-by: alanb, erikj, mchung Contributed-by: Chris Hegarty <chris.hegarty@oracle.com>, Erik Joelsson <erik.joelsson@oracle.com>
make/GensrcModuleInfo.gmk
make/Javadoc.gmk
make/common/Modules.gmk
--- a/make/GensrcModuleInfo.gmk	Wed Apr 27 14:30:32 2016 +0200
+++ b/make/GensrcModuleInfo.gmk	Wed Apr 27 20:35:23 2016 +0100
@@ -78,21 +78,30 @@
   # let space represent new lines in the variable as $(shell) normalizes all
   # whitespace.
   $(foreach f, $(MOD_FILES), \
-    $(eval MOD_FILE_CONTENTS += $(shell $(GREP) -v ".\*" $f | $(TR) ' ' '/')))
+    $(eval MOD_FILE_CONTENTS += $(shell $(GREP) -v -e ".\*" -e "//" $f | $(TR) ' ' '/')))
+
+  # Separate the modifications into qualified exports and the rest
+  MODS_QUALIFIED_EXPORTS := $(call containing, /to/, $(MOD_FILE_CONTENTS))
+  MODS_REST := $(filter-out $(MODS_QUALIFIED_EXPORTS), $(MOD_FILE_CONTENTS))
 
   # Filter the contents for modules that are actually being built
   MODULES_FILTER := $(addprefix %/, $(addsuffix ;, $(ALL_MODULES)))
-  MODULES_FILTER += provides%
-  MODIFICATIONS := $(filter $(MODULES_FILTER), $(MOD_FILE_CONTENTS))
+  MODIFICATIONS := $(filter $(MODULES_FILTER), $(MODS_QUALIFIED_EXPORTS)) \
+      $(MODS_REST)
 
   # Convert the modification lines into arguments for the modification tool.
   # Filter out modifications for non existing to-modules.
   $(foreach line, $(MODIFICATIONS), \
     $(eval split_line := $(subst /,$(SPACE),$(line))) \
     $(eval command := $(word 1, $(split_line))) \
-    $(eval package := $(word 2, $(split_line))) \
+    $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \
     $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \
-    $(eval ARGS += -$(command) $(package)/$(to_module)))
+    $(if $(to_module), \
+      $(eval ARGS += -$(command) $(package)/$(to_module)) \
+    , \
+      $(eval ARGS += -$(command) $(package)) \
+    ) \
+  )
 
   ifneq ($(ARGS), )
     $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java: \
--- a/make/Javadoc.gmk	Wed Apr 27 14:30:32 2016 +0200
+++ b/make/Javadoc.gmk	Wed Apr 27 20:35:23 2016 +0100
@@ -1580,7 +1580,7 @@
 JDKNET_PACKAGES_FILE = $(DOCSTMPDIR)/jdknet.packages
 
 # The modules required to be documented
-JDKNET_MODULES = java.base
+JDKNET_MODULES = jdk.net
 
 jdknetdocs: $(JDKNET_INDEX_HTML)
 
--- a/make/common/Modules.gmk	Wed Apr 27 14:30:32 2016 +0200
+++ b/make/common/Modules.gmk	Wed Apr 27 20:35:23 2016 +0100
@@ -63,6 +63,7 @@
     java.xml.crypto \
     jdk.httpserver \
     jdk.management \
+    jdk.net \
     jdk.sctp \
     jdk.security.auth \
     jdk.security.jgss \