diff options
| author | bors <bors@rust-lang.org> | 2013-11-10 14:46:04 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-10 14:46:04 -0800 |
| commit | 95b46a1763810fc0baf0f1db520b647bf3dc14d3 (patch) | |
| tree | 75585cae1226e8fa28aaa9d606c3b3439bb59589 | |
| parent | fe48d8fcd143e5810fd7550496d4ff561a240466 (diff) | |
| parent | 759c0168a176e936a887b8f3589288da3ef8a8b7 (diff) | |
| download | rust-95b46a1763810fc0baf0f1db520b647bf3dc14d3.tar.gz rust-95b46a1763810fc0baf0f1db520b647bf3dc14d3.zip | |
auto merge of #10226 : nibrahim/rust/docepub, r=alexcrichton
Added two new rules to create epubs out of the tutorial and reference manual source files. This is useful and doesn't add any new dependencies to the build process.
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | mk/clean.mk | 2 | ||||
| -rw-r--r-- | mk/docs.mk | 25 |
3 files changed, 27 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index 4eff4c54058..67367ef8c79 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ *.cps *.log *.pdf +*.epub *.html *.pg *.toc diff --git a/mk/clean.mk b/mk/clean.mk index fc4bcf6c759..d2f17fd52c8 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -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 diff --git a/mk/docs.mk b/mk/docs.mk index 771f1511c6d..621d283ee5d 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -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: $@) @@ -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: $@) |
