diff --git a/make/Docs.gmk b/make/Docs.gmk index 5c67393fb66..be9efbdc370 100644 --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -673,7 +673,7 @@ ifeq ($(ENABLE_PANDOC), true) $(foreach m, $(ALL_MODULES), \ $(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \ - $(call FindModuleManDirs, $m))))) \ + $(call FindModuleManDirsForDocs, $m))))) \ $(if $(MAN_$m), \ $(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \ FILES := $(MAN_$m), \ diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index 03548ca8778..f4f815c740d 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -87,7 +87,10 @@ SRC_SUBDIRS += share/classes SPEC_SUBDIRS += share/specs -MAN_SUBDIRS += share/man windows/man +MAN_SUBDIRS += share/man $(TARGET_OS)/man + +# The docs should include the sum of all man pages for all platforms +MAN_DOCS_SUBDIRS += share/man windows/man # Find all module-info.java files for the current build target platform and # configuration. @@ -153,6 +156,10 @@ FindModuleManDirs = \ $(strip $(wildcard \ $(foreach sub, $(MAN_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) +FindModuleManDirsForDocs = \ + $(strip $(wildcard \ + $(foreach sub, $(MAN_DOCS_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) + # Construct the complete module source path GetModuleSrcPath = \ $(call PathList, \