25 default: all |
25 default: all |
26 |
26 |
27 include $(SPEC) |
27 include $(SPEC) |
28 include MakeBase.gmk |
28 include MakeBase.gmk |
29 include Modules.gmk |
29 include Modules.gmk |
|
30 include ModuleTools.gmk |
30 include ProcessMarkdown.gmk |
31 include ProcessMarkdown.gmk |
|
32 include ToolsJdk.gmk |
31 include ZipArchive.gmk |
33 include ZipArchive.gmk |
32 include $(TOPDIR)/make/ToolsJdk.gmk |
|
33 include $(TOPDIR)/make/ModuleTools.gmk |
|
34 |
34 |
35 # This is needed to properly setup DOCS_MODULES. |
35 # This is needed to properly setup DOCS_MODULES. |
36 $(eval $(call ReadImportMetaData)) |
36 $(eval $(call ReadImportMetaData)) |
37 |
37 |
38 ################################################################################ |
38 ################################################################################ |
554 ) \ |
554 ) \ |
555 ) |
555 ) |
556 |
556 |
557 # For all markdown files in $module/share/man directories, convert them to |
557 # For all markdown files in $module/share/man directories, convert them to |
558 # html. |
558 # html. |
|
559 |
|
560 # Create dynamic man pages from markdown using pandoc. We need |
|
561 # PANDOC_HTML_MANPAGE_FILTER, a wrapper around |
|
562 # PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT. This is created by buildtools-jdk. |
|
563 |
|
564 # We should also depend on the source javascript filter |
|
565 PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT := \ |
|
566 $(TOPDIR)/make/scripts/pandoc-html-manpage-filter.js |
|
567 |
559 $(foreach m, $(ALL_MODULES), \ |
568 $(foreach m, $(ALL_MODULES), \ |
560 $(eval MAN_$m := $(call FindModuleManDirs, $m)) \ |
569 $(eval MAN_$m := $(call FindModuleManDirs, $m)) \ |
561 $(foreach d, $(MAN_$m), \ |
570 $(foreach d, $(MAN_$m), \ |
562 $(if $(filter %.md, $(call CacheFind, $d)), \ |
571 $(if $(filter %.md, $(call CacheFind, $d)), \ |
563 $(eval $m_$d_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \ |
572 $(eval $m_$d_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \ |
564 $(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \ |
573 $(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \ |
565 SRC := $d, \ |
574 SRC := $d, \ |
566 FILES := $(filter %.md, $(call CacheFind, $d)), \ |
575 FILES := $(filter %.md, $(call CacheFind, $d)), \ |
567 DEST := $(DOCS_OUTPUTDIR)/specs/man, \ |
576 DEST := $(DOCS_OUTPUTDIR)/specs/man, \ |
|
577 FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \ |
568 CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ |
578 CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ |
569 REPLACEMENTS := @@VERSION_SHORT@@ => $(VERSION_SHORT), \ |
579 REPLACEMENTS := @@VERSION_SHORT@@ => $(VERSION_SHORT), \ |
|
580 EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \ |
|
581 $(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT), \ |
570 )) \ |
582 )) \ |
571 $(eval JDK_SPECS_TARGETS += $($($m_$d_NAME))) \ |
583 $(eval JDK_SPECS_TARGETS += $($($m_$d_NAME))) \ |
572 ) \ |
584 ) \ |
573 ) \ |
585 ) \ |
574 ) |
586 ) |