8044773: Refactor jdk.net API so that it can be moved out of the base module

Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Reviewed-by: alanb, erikj, mchung
This commit is contained in:
Chris Hegarty 2016-04-27 20:35:23 +01:00
parent 59144619a1
commit da78f43efc
3 changed files with 16 additions and 6 deletions

View File

@ -78,21 +78,30 @@ ifneq ($(MOD_FILES), )
# 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: \

View File

@ -1580,7 +1580,7 @@ JDKNET_OPTIONS_FILE = $(DOCSTMPDIR)/jdknet.options
JDKNET_PACKAGES_FILE = $(DOCSTMPDIR)/jdknet.packages
# The modules required to be documented
JDKNET_MODULES = java.base
JDKNET_MODULES = jdk.net
jdknetdocs: $(JDKNET_INDEX_HTML)

View File

@ -63,6 +63,7 @@ BOOT_MODULES += \
java.xml.crypto \
jdk.httpserver \
jdk.management \
jdk.net \
jdk.sctp \
jdk.security.auth \
jdk.security.jgss \