make/Javadoc.gmk
changeset 44734 70bbd6884287
parent 44733 6505f00be6f2
child 44826 7a887996ee84
equal deleted inserted replaced
44733:6505f00be6f2 44734:70bbd6884287
   361     )) \
   361     )) \
   362     $(eval JDK_SPECS_TARGETS += $(COPY_$m)) \
   362     $(eval JDK_SPECS_TARGETS += $(COPY_$m)) \
   363   ) \
   363   ) \
   364 )
   364 )
   365 
   365 
       
   366 ifeq ($(ENABLE_FULL_DOCS), true)
       
   367   # For all markdown files in $module/share/specs directories, convert them to
       
   368   # html.
       
   369   MARKDOWN_SPEC_FILTER := %.md
       
   370 
       
   371   # Macro for SetupCopyFiles that converts from markdown to html using pandoc.
       
   372   define markdown-to-html
       
   373 	$(call MakeDir, $(@D))
       
   374 	$(RM) $@
       
   375 	$(PANDOC) -t html -s -o $@ $<
       
   376   endef
       
   377 
       
   378   rename-md-to-html = \
       
   379       $(patsubst %.md,%.html,$1)
       
   380 
       
   381   $(foreach m, $(ALL_MODULES), \
       
   382     $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
       
   383     $(if $(SPECS_$m), \
       
   384       $(eval $(call SetupCopyFiles, CONVERT_MARKDOWN_$m, \
       
   385           SRC := $(SPECS_$m), \
       
   386           FILES := $(filter $(MARKDOWN_SPEC_FILTER), $(call CacheFind, $(SPECS_$m))), \
       
   387           DEST := $(JAVADOC_OUTPUTDIR)/specs/, \
       
   388           MACRO := markdown-to-html, \
       
   389           NAME_MACRO := rename-md-to-html, \
       
   390           LOG_ACTION := Converting from markdown, \
       
   391       )) \
       
   392       $(eval JDK_SPECS_TARGETS += $(CONVERT_MARKDOWN_$m)) \
       
   393     ) \
       
   394   )
       
   395 
       
   396 endif
       
   397 
   366 # Special treatment for generated documentation
   398 # Special treatment for generated documentation
   367 
   399 
   368 JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
   400 JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
   369 $(eval $(call SetupCopyFiles, COPY_JDWP_PROTOCOL, \
   401 $(eval $(call SetupCopyFiles, COPY_JDWP_PROTOCOL, \
   370     FILES := $(JDWP_PROTOCOL), \
   402     FILES := $(JDWP_PROTOCOL), \