Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*.cps
*.log
*.pdf
*.epub
*.html
*.pg
*.toc
Expand Down
2 changes: 1 addition & 1 deletion mk/clean.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ clean-misc:
$(Q)rm -Rf tmp/*
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
$(Q)rm -Rf $(foreach ext, \
html aux cp fn ky log pdf pg toc tp vr cps, \
html aux cp fn ky log pdf pg toc tp vr cps epub, \
$(wildcard doc/*.$(ext)))
$(Q)find doc/std doc/extra -mindepth 1 | xargs rm -Rf
$(Q)rm -Rf doc/version.md
Expand Down
25 changes: 25 additions & 0 deletions mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ doc/rust.tex: rust.md doc/version.md
--from=markdown --to=latex \
--output=$@

DOCS += doc/rust.epub
doc/rust.epub: rust.md doc/version_info.html doc/rust.css doc/manual.inc
@$(call E, pandoc: $@)
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
"$(CFG_PANDOC)" \
--standalone --toc \
--section-divs \
--number-sections \
--from=markdown --to=epub \
--css=rust.css --include-in-header=doc/manual.inc \
--include-before-body=doc/version_info.html \
--output=$@


DOCS += doc/tutorial.tex
doc/tutorial.tex: tutorial.md doc/version.md
@$(call E, pandoc: $@)
Expand Down Expand Up @@ -98,6 +112,17 @@ doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css
--include-before-body=doc/version_info.html \
--output=$@

DOCS += doc/tutorial.epub
doc/tutorial.epub: tutorial.md doc/version_info.html doc/rust.css
@$(call E, pandoc: $@)
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
$(CFG_PANDOC) --standalone --toc \
--section-divs --number-sections \
--from=markdown --to=epub --css=rust.css \
--include-before-body=doc/version_info.html \
--output=$@


DOCS_L10N += doc/l10n/ja/tutorial.html
doc/l10n/ja/tutorial.html: doc/l10n/ja/tutorial.md doc/version_info.html doc/rust.css
@$(call E, pandoc: $@)
Expand Down