Add --out-dir flag for rustdoc

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
hi-rustin 2021-11-28 15:12:56 +08:00
parent 4919988fe1
commit 03be3e21b1
11 changed files with 57 additions and 5 deletions

View file

@ -0,0 +1,8 @@
-include ../../run-make-fulldeps/tools.mk
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
all:
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --out-dir $(OUTPUT_DIR)
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs

View file

@ -0,0 +1,2 @@
// @has foobar/fn.ok.html
pub fn ok() {}

View file

@ -0,0 +1,8 @@
-include ../../run-make-fulldeps/tools.mk
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
all:
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR)
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs

View file

@ -0,0 +1,2 @@
// @has foobar/fn.ok.html
pub fn ok() {}

View file

@ -0,0 +1,8 @@
-include ../../run-make-fulldeps/tools.mk
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
all:
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib -o $(OUTPUT_DIR)
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs

View file

@ -0,0 +1,2 @@
// @has foobar/fn.ok.html
pub fn ok() {}

View file

@ -0,0 +1 @@
// compile-flags: --output ./foo

View file

@ -0,0 +1,2 @@
error: cannot use both 'out-dir' and 'output' at once