diff -r c46632622b17 -r d7a164ad6b7f make/UpdateBuildDocs.gmk --- a/make/UpdateBuildDocs.gmk Tue Apr 18 13:19:42 2017 -0400 +++ b/make/UpdateBuildDocs.gmk Tue Apr 18 22:25:33 2017 +0200 @@ -47,6 +47,7 @@ # Remaining parameters are named arguments. These include: # SOURCE_FILE The markdown source file # TARGET_DIR The directory where to store the generated html file +# OPTIONS Additional options to pandoc # SetupMarkdownToHtml = $(NamedParamsMacroTemplate) define SetupMarkdownToHtmlBody @@ -65,12 +66,13 @@ $$(call LogInfo, Converting $$(notdir $1) to html) $$(call MakeDir, $$($1_TARGET_DIR) $$(MAKESUPPORT_OUTPUTDIR)/markdown) $$(call ExecuteWithLog, $$(MAKESUPPORT_OUTPUTDIR)/markdown/$1, \ - $$(PANDOC) -f markdown -t html --standalone '$$<' -o '$$@') - TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` ; \ - if [ "x$$TOO_LONG_LINES" != x ]; then \ + $$(PANDOC) $$($1_OPTIONS) -f markdown -t html --standalone \ + --css 'http://openjdk.java.net/page.css' '$$<' -o '$$@') + TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \ + if [ "x$$$$TOO_LONG_LINES" != x ]; then \ $$(ECHO) "Warning: Unsuitable markdown in $$<:" ; \ $$(ECHO) "The following lines are longer than 80 characters:" ; \ - $$(GREP) -E -e '^.{80}.+$$$$' $$< ; \ + $$(GREP) -E -n -e '^.{80}.+$$$$' $$< || true ; \ fi $1 := $$($1_OUTPUT_FILE) @@ -80,12 +82,17 @@ ################################################################################ -BUILD_DOCS_DIR := $(TOPDIR)/common/doc -BUILD_DOCS_MD_FILE := building.md +DOCS_DIR := $(TOPDIR)/common/doc $(eval $(call SetupMarkdownToHtml, building, \ - SOURCE_FILE := $(BUILD_DOCS_DIR)/$(BUILD_DOCS_MD_FILE), \ - TARGET_DIR := $(BUILD_DOCS_DIR), \ + SOURCE_FILE := $(DOCS_DIR)/building.md, \ + TARGET_DIR := $(DOCS_DIR), \ +)) + +$(eval $(call SetupMarkdownToHtml, testing, \ + SOURCE_FILE := $(DOCS_DIR)/testing.md, \ + TARGET_DIR := $(DOCS_DIR), \ + OPTIONS := --toc, \ )) ################################################################################