# HG changeset patch
# User prr
# Date 1561133145 25200
# Node ID f72de31c98cdea8357c23a3e998eedbee889d376
# Parent fe5395d16475d0408d9dfe0736d02725284d0349# Parent e764228f71dce19f487ec1b8c677d7560d49674b
Merge
diff -r fe5395d16475 -r f72de31c98cd .hgtags
--- a/.hgtags Tue Jun 18 21:40:50 2019 -0700
+++ b/.hgtags Fri Jun 21 09:05:45 2019 -0700
@@ -562,3 +562,8 @@
181986c5476468bc2dd4532af49599003ee8af37 jdk-13+22
b034d2dee5fc93d42a81b65e58ce3f91e42586ff jdk-13+23
7e2238451585029680f126ccbb46d01f2ff5607f jdk-13+24
+22b3b7983adab54e318f75aeb94471f7a4429c1e jdk-14+0
+22b3b7983adab54e318f75aeb94471f7a4429c1e jdk-13+25
+2f4e214781a1d597ed36bf5a36f20928c6c82996 jdk-14+1
+0692b67f54621991ba7afbf23e55b788f3555e69 jdk-13+26
+43627549a488b7d0b4df8fad436e36233df89877 jdk-14+2
diff -r fe5395d16475 -r f72de31c98cd doc/building.md
--- a/doc/building.md Tue Jun 18 21:40:50 2019 -0700
+++ b/doc/building.md Fri Jun 21 09:05:45 2019 -0700
@@ -871,6 +871,7 @@
* `CONF_CHECK`
* `COMPARE_BUILD`
* `JDK_FILTER`
+ * `SPEC_FILTER`
## Running Tests
diff -r fe5395d16475 -r f72de31c98cd make/Docs.gmk
--- a/make/Docs.gmk Tue Jun 18 21:40:50 2019 -0700
+++ b/make/Docs.gmk Fri Jun 21 09:05:45 2019 -0700
@@ -487,11 +487,25 @@
################################################################################
+# Use this variable to control which spec files are included in the output.
+# Format: space-delimited list of names, including at most one '%' as a
+# wildcard. Spec source files match if their filename or any enclosing folder
+# name matches one of the items in SPEC_FILTER.
+SPEC_FILTER := %
+
+ApplySpecFilter = \
+ $(strip $(foreach file, $(1), \
+ $(eval searchkeys := $(subst /, ,$(subst $(WORKSPACE_ROOT),,$(file)))) \
+ $(if $(filter $(SPEC_FILTER), $(searchkeys)), \
+ $(file) \
+ ) \
+ ))
+
# Copy the global resources, including the top-level redirect index.html
-GLOBAL_SPECS_RESOURCES_DIR := $(TOPDIR)/make/data/docs-resources/
+GLOBAL_SPECS_RESOURCES_DIR := $(TOPDIR)/make/data/docs-resources
$(eval $(call SetupCopyFiles, COPY_GLOBAL_RESOURCES, \
SRC := $(GLOBAL_SPECS_RESOURCES_DIR), \
- FILES := $(call FindFiles, $(GLOBAL_SPECS_RESOURCES_DIR)), \
+ FILES := $(call ApplySpecFilter, $(call FindFiles, $(GLOBAL_SPECS_RESOURCES_DIR))), \
DEST := $(DOCS_OUTPUTDIR), \
))
JDK_INDEX_TARGETS += $(COPY_GLOBAL_RESOURCES)
@@ -499,7 +513,7 @@
# Copy the legal notices distributed with the docs bundle
$(eval $(call SetupCopyFiles, COPY_DOCS_LEGAL_NOTICES, \
SRC := $(TOPDIR)/src/jdk.javadoc/share/legal, \
- FILES := $(wildcard $(TOPDIR)/src/jdk.javadoc/share/legal/*), \
+ FILES := $(call ApplySpecFilter, $(wildcard $(TOPDIR)/src/jdk.javadoc/share/legal/*)), \
DEST := $(DOCS_OUTPUTDIR)/legal, \
))
JDK_INDEX_TARGETS += $(COPY_DOCS_LEGAL_NOTICES)
@@ -516,10 +530,10 @@
$(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
$(foreach d, $(SPECS_$m), \
- $(if $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d)), \
+ $(if $(call ApplySpecFilter, $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d))), \
$(eval $(call SetupCopyFiles, COPY_$m, \
SRC := $d, \
- FILES := $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d)), \
+ FILES := $(call ApplySpecFilter, $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d))), \
DEST := $(DOCS_OUTPUTDIR)/specs/, \
)) \
$(eval JDK_SPECS_TARGETS += $(COPY_$m)) \
@@ -527,31 +541,27 @@
) \
)
-# Create copyright footer files that can be provided as input to pandoc. We
-# need different files for different relative paths to the copyright.html
-# file. The number 0-2 below represent how many extra directory levels down
-# below the specs dir the specs html file is located. Each file name is
-# stored in a variable SPECS_BOTTOM_FILE_$n where $n is 0, 1 or 2.
-SPECS_BOTTOM =
$(COPYRIGHT_BOTTOM)
+# Create copyright footer variables. We need different variables for different
+# relative paths to the copyright.html file. The number 0-2 below represent how
+# many extra directory levels down below the specs dir the specs html file is
+# located.
+SPECS_BOTTOM =
# The legal dir is one ../ below the specs dir, so start with one ../.
specs_bottom_rel_path := ../
$(foreach n, 0 1 2, \
- $(eval SPECS_BOTTOM_FILE_$n := $(SUPPORT_OUTPUTDIR)/docs/full-specs-bottom-$n.txt) \
$(eval SPECS_BOTTOM_$n := $(call SPECS_BOTTOM,$(specs_bottom_rel_path))) \
- $(eval $(SPECS_BOTTOM_FILE_$n): \
- $(call DependOnVariable, SPECS_BOTTOM_$n) ; \
- $(PRINTF) '$(SPECS_BOTTOM_$n)' > $$@ \
- ) \
$(eval specs_bottom_rel_path := $(specs_bottom_rel_path)../) \
)
+SPECS_TOP := $(if $(filter true, $(IS_DRAFT)), )
+
# For all html files in $module/share/specs directories, copy and add the
# copyright footer.
$(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
$(foreach d, $(SPECS_$m), \
- $(foreach f, $(filter %.html, $(call FindFiles, $d)), \
+ $(foreach f, $(call ApplySpecFilter, $(filter %.html, $(call FindFiles, $d))), \
$(eval $m_$f_NOF_SUBDIRS := $(words $(subst /, $(SPACE), $(subst $d, , $(dir $f))))) \
$(eval $m_$f_NAME := PROCESS_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupTextFileProcessing, $($m_$f_NAME), \
@@ -559,6 +569,7 @@
SOURCE_BASE_DIR := $d, \
OUTPUT_DIR := $(DOCS_OUTPUTDIR)/specs/, \
REPLACEMENTS := \
+ => $(SPECS_TOP) ; \
=> $(SPECS_BOTTOM_$($m_$f_NOF_SUBDIRS)), \
)) \
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
@@ -575,17 +586,16 @@
$(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
$(foreach d, $(SPECS_$m), \
- $(foreach f, $(filter %.md, $(call FindFiles, $d)), \
+ $(foreach f, $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, $d))), \
$(eval $m_$f_NOF_SUBDIRS := $(words $(subst /, $(SPACE), $(subst $d, , $(dir $f))))) \
- $(eval $m_$f_BOTTOM_FILE := $(SPECS_BOTTOM_FILE_$($m_$f_NOF_SUBDIRS))) \
$(eval $m_$f_NAME := SPECS_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
SRC := $d, \
FILES := $f, \
DEST := $(DOCS_OUTPUTDIR)/specs/, \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
- OPTIONS := -A $($m_$f_BOTTOM_FILE), \
- EXTRA_DEPS := $($m_$f_BOTTOM_FILE), \
+ OPTIONS := -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_$($m_$f_NOF_SUBDIRS))', \
+ REPLACEMENTS := @@VERSION_STRING@@ => $(VERSION_STRING), \
POST_PROCESS := $(TOOL_FIXUPPANDOC), \
)) \
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
@@ -607,7 +617,7 @@
$(foreach m, $(ALL_MODULES), \
$(eval MAN_$m := $(call FindModuleManDirs, $m)) \
$(foreach d, $(MAN_$m), \
- $(foreach f, $(filter %.md, $(call FindFiles, $d)), \
+ $(foreach f, $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, $d))), \
$(eval $m_$f_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
SRC := $d, \
@@ -616,11 +626,10 @@
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
REPLACEMENTS := @@VERSION_SHORT@@ => $(VERSION_SHORT), \
- OPTIONS := -A $(SPECS_BOTTOM_FILE_1), \
+ OPTIONS := -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \
POST_PROCESS := $(TOOL_FIXUPPANDOC), \
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
- $(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT) \
- $(SPECS_BOTTOM_FILE_1), \
+ $(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT), \
)) \
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
) \
@@ -634,23 +643,29 @@
# Special treatment for generated documentation
JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
-$(eval $(call SetupTextFileProcessing, PROCESS_JDWP_PROTOCOL, \
- SOURCE_FILES := $(JDWP_PROTOCOL), \
- OUTPUT_DIR := $(DOCS_OUTPUTDIR)/specs/jdwp, \
- REPLACEMENTS := \
- => $(SPECS_TOP) ; \
+ => $(SPECS_BOTTOM_1) => $(SPECS_TOP) ; \
+ => $(SPECS_BOTTOM_0)