doc: tidy up makefile rules
This commit is contained in:
parent
58aa18c8ba
commit
3d57b240ab
112
mk/docs.mk
112
mk/docs.mk
@ -15,6 +15,10 @@
|
|||||||
DOCS :=
|
DOCS :=
|
||||||
DOCS_L10N :=
|
DOCS_L10N :=
|
||||||
|
|
||||||
|
BASE_DOC_OPTS := --from=markdown --standalone --toc --number-sections --include-before-body=doc/version_info.html
|
||||||
|
HTML_OPTS = $(BASE_DOC_OPTS) --to=html5 --section-divs --css=rust.css --include-in-header=doc/favicon.inc
|
||||||
|
TEX_OPTS = $(BASE_DOC_OPTS) --to=latex
|
||||||
|
EPUB_OPTS = $(BASE_DOC_OPTS) --to=epub
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Docs, from pandoc, rustdoc (which runs pandoc), and node
|
# Docs, from pandoc, rustdoc (which runs pandoc), and node
|
||||||
@ -49,86 +53,45 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.inc \
|
|||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
"$(CFG_PANDOC)" \
|
$(CFG_PANDOC) $(HTML_OPTS) --include-in-header=doc/manual.inc --output=$@
|
||||||
--standalone --toc \
|
|
||||||
--section-divs \
|
|
||||||
--number-sections \
|
|
||||||
--from=markdown --to=html5 \
|
|
||||||
--css=rust.css --include-in-header=doc/manual.inc \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/rust.tex
|
DOCS += doc/rust.tex
|
||||||
doc/rust.tex: rust.md doc/version.md
|
doc/rust.tex: rust.md doc/version.md
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
|
||||||
"$(CFG_PANDOC)" \
|
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
|
||||||
--standalone --toc \
|
|
||||||
--number-sections \
|
|
||||||
--include-before-body=doc/version.md \
|
|
||||||
--from=markdown --to=latex \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/rust.epub
|
DOCS += doc/rust.epub
|
||||||
doc/rust.epub: rust.md doc/version_info.html doc/rust.css doc/manual.inc
|
doc/rust.epub: rust.md doc/version_info.html doc/rust.css
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
"$(CFG_PANDOC)" \
|
$(CFG_PANDOC) $(EPUB_OPTS) --output=$@
|
||||||
--standalone --toc \
|
|
||||||
--section-divs \
|
|
||||||
--number-sections \
|
|
||||||
--from=markdown --to=epub \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/rustpkg.html
|
DOCS += doc/rustpkg.html
|
||||||
doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.inc \
|
doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
"$(CFG_PANDOC)" \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--standalone --toc \
|
|
||||||
--section-divs \
|
|
||||||
--number-sections \
|
|
||||||
--from=markdown --to=html5 \
|
|
||||||
--css=rust.css --include-in-header=doc/manual.inc \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial.html
|
DOCS += doc/tutorial.html
|
||||||
doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css \
|
doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial.tex
|
DOCS += doc/tutorial.tex
|
||||||
doc/tutorial.tex: tutorial.md doc/version.md
|
doc/tutorial.tex: tutorial.md doc/version.md
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
|
||||||
"$(CFG_PANDOC)" \
|
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
|
||||||
--standalone --toc \
|
|
||||||
--number-sections \
|
|
||||||
--include-before-body=doc/version.md \
|
|
||||||
--from=markdown --to=latex \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial.epub
|
DOCS += doc/tutorial.epub
|
||||||
doc/tutorial.epub: tutorial.md doc/version_info.html doc/rust.css
|
doc/tutorial.epub: tutorial.md doc/version_info.html doc/rust.css
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(EPUB_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=epub \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
|
|
||||||
DOCS_L10N += doc/l10n/ja/tutorial.html
|
DOCS_L10N += doc/l10n/ja/tutorial.html
|
||||||
@ -146,84 +109,49 @@ doc/tutorial-macros.html: tutorial-macros.md doc/version_info.html doc/rust.css
|
|||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial-container.html
|
DOCS += doc/tutorial-container.html
|
||||||
doc/tutorial-container.html: tutorial-container.md doc/version_info.html doc/rust.css \
|
doc/tutorial-container.html: tutorial-container.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial-ffi.html
|
DOCS += doc/tutorial-ffi.html
|
||||||
doc/tutorial-ffi.html: tutorial-ffi.md doc/version_info.html doc/rust.css \
|
doc/tutorial-ffi.html: tutorial-ffi.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial-borrowed-ptr.html
|
DOCS += doc/tutorial-borrowed-ptr.html
|
||||||
doc/tutorial-borrowed-ptr.html: tutorial-borrowed-ptr.md doc/version_info.html doc/rust.css \
|
doc/tutorial-borrowed-ptr.html: tutorial-borrowed-ptr.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial-tasks.html
|
DOCS += doc/tutorial-tasks.html
|
||||||
doc/tutorial-tasks.html: tutorial-tasks.md doc/version_info.html doc/rust.css \
|
doc/tutorial-tasks.html: tutorial-tasks.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial-conditions.html
|
DOCS += doc/tutorial-conditions.html
|
||||||
doc/tutorial-conditions.html: tutorial-conditions.md doc/version_info.html doc/rust.css \
|
doc/tutorial-conditions.html: tutorial-conditions.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
DOCS += doc/tutorial-rustpkg.html
|
DOCS += doc/tutorial-rustpkg.html
|
||||||
doc/tutorial-rustpkg.html: tutorial-rustpkg.md doc/version_info.html doc/rust.css \
|
doc/tutorial-rustpkg.html: tutorial-rustpkg.md doc/version_info.html doc/rust.css \
|
||||||
doc/favicon.inc
|
doc/favicon.inc
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
|
||||||
$(CFG_PANDOC) --standalone --toc \
|
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
|
||||||
--section-divs --number-sections \
|
|
||||||
--from=markdown --to=html5 --css=rust.css \
|
|
||||||
--include-in-header=doc/favicon.inc \
|
|
||||||
--include-before-body=doc/version_info.html \
|
|
||||||
--output=$@
|
|
||||||
|
|
||||||
ifeq ($(CFG_PDFLATEX),)
|
ifeq ($(CFG_PDFLATEX),)
|
||||||
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
|
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user