8331886: Allow markdown src file overrides
Reviewed-by: ihse
This commit is contained in:
parent
0d1216c7a1
commit
588e314e4b
@ -681,13 +681,11 @@ ifeq ($(ENABLE_PANDOC), true)
|
|||||||
$(TOPDIR)/make/jdk/src/classes/build/tools/pandocfilter)
|
$(TOPDIR)/make/jdk/src/classes/build/tools/pandocfilter)
|
||||||
|
|
||||||
$(foreach m, $(ALL_MODULES), \
|
$(foreach m, $(ALL_MODULES), \
|
||||||
$(eval MAN_$m := $(call FindModuleManDirs, $m)) \
|
$(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \
|
||||||
$(foreach d, $(MAN_$m), \
|
$(call FindModuleManDirs, $m))))) \
|
||||||
$(foreach f, $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, $d))), \
|
$(if $(MAN_$m), \
|
||||||
$(eval $m_$f_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
|
$(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \
|
||||||
$(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
|
FILES := $(MAN_$m), \
|
||||||
SRC := $d, \
|
|
||||||
FILES := $f, \
|
|
||||||
DEST := $(DOCS_OUTPUTDIR)/specs/man, \
|
DEST := $(DOCS_OUTPUTDIR)/specs/man, \
|
||||||
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
|
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
|
||||||
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
|
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
|
||||||
@ -701,8 +699,7 @@ ifeq ($(ENABLE_PANDOC), true)
|
|||||||
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
|
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
|
||||||
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
|
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
|
||||||
)) \
|
)) \
|
||||||
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
|
$(eval JDK_SPECS_TARGETS += $(MAN_TO_HTML_$m)) \
|
||||||
) \
|
|
||||||
) \
|
) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -38,6 +38,11 @@ define ProcessMarkdown
|
|||||||
$1_$2_INPUT_FILE := $3/$2
|
$1_$2_INPUT_FILE := $3/$2
|
||||||
$1_$2_MARKER := $$(subst /,_,$1_$2)
|
$1_$2_MARKER := $$(subst /,_,$1_$2)
|
||||||
|
|
||||||
|
# Only continue if this target file hasn't been processed already. This lets
|
||||||
|
# the first found source file override any other with the same name.
|
||||||
|
ifeq ($$($1_$2_OUTPUT_FILE_PROCESSED), )
|
||||||
|
$1_$2_OUTPUT_FILE_PROCESSED := true
|
||||||
|
|
||||||
ifneq ($$($1_REPLACEMENTS), )
|
ifneq ($$($1_REPLACEMENTS), )
|
||||||
$1_$2_PANDOC_INPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_pre.tmp
|
$1_$2_PANDOC_INPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_pre.tmp
|
||||||
|
|
||||||
@ -107,6 +112,7 @@ define ProcessMarkdown
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$1 += $$($1_$2_OUTPUT_FILE)
|
$1 += $$($1_$2_OUTPUT_FILE)
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user