]> git.lizzy.rs Git - rust.git/blobdiff - mk/docs.mk
librustc: Don't try to perform the magical
[rust.git] / mk / docs.mk
index 90f85079464bb2743758afa957a194460f5fc488..8098a0682a5d0f719d31f4d5b07cab8182382db9 100644 (file)
@@ -26,9 +26,9 @@
 # L10N_LANGS are the languages for which the docs have been
 # translated.
 ######################################################################
-DOCS := index intro tutorial guide-ffi guide-macros guide-lifetimes \
+DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
        guide-tasks guide-container guide-pointers guide-testing \
-       guide-runtime complement-bugreport complement-cheatsheet \
+       guide-runtime complement-bugreport \
        complement-lang-faq complement-design-faq complement-project-faq rust \
     rustdoc guide-unsafe
 
@@ -43,7 +43,9 @@ L10N_LANGS := ja
 
 # The options are passed to the documentation generators.
 RUSTDOC_HTML_OPTS_NO_CSS = --markdown-before-content=doc/version_info.html \
-       --markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc
+       --markdown-in-header=doc/favicon.inc \
+       --markdown-after-content=doc/footer.inc \
+       --markdown-playground-url='http://play.rust-lang.org/'
 
 RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
 
@@ -271,14 +273,18 @@ LIB_DOC_DEP_$(1) = \
        $$(RSINPUTS_$(1)) \
        $$(RUSTDOC_EXE) \
        $$(foreach dep,$$(RUST_DEPS_$(1)), \
-               $$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep))
+               $$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep) \
+               doc/$$(dep)/)
 else
 LIB_DOC_DEP_$(1) = $$(CRATEFILE_$(1)) $$(RSINPUTS_$(1))
 endif
 
+doc/$(1)/:
+       $$(Q)mkdir -p $$@
+
 $(2) += doc/$(1)/index.html
 doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
-doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1))
+doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
        @$$(call E, rustdoc $$@)
        $$(Q)$$(RUSTDOC) --cfg dox --cfg stage2 $$<
 endef