Migrate run-make/rustdoc-scrape-examples-multiple
to rmake.rs
This commit is contained in:
parent
1d0e4afd4c
commit
f8c992f8b4
@ -235,7 +235,6 @@ run-make/rmeta-preferred/Makefile
|
||||
run-make/rustc-macro-dep-files/Makefile
|
||||
run-make/rustdoc-io-error/Makefile
|
||||
run-make/rustdoc-scrape-examples-macros/Makefile
|
||||
run-make/rustdoc-scrape-examples-multiple/Makefile
|
||||
run-make/rustdoc-verify-output-files/Makefile
|
||||
run-make/rustdoc-with-output-option/Makefile
|
||||
run-make/rustdoc-with-short-out-dir-option/Makefile
|
||||
|
@ -1,5 +0,0 @@
|
||||
deps := ex ex2
|
||||
|
||||
include ./scrape.mk
|
||||
|
||||
all: scrape
|
6
tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs
Normal file
6
tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs
Normal file
@ -0,0 +1,6 @@
|
||||
#[path = "../rustdoc-scrape-examples-remap/scrape.rs"]
|
||||
mod scrape;
|
||||
|
||||
fn main() {
|
||||
scrape::scrape(&[]);
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
||||
|
||||
$(TMPDIR)/%.calls: $(TMPDIR)/libfoobar.rmeta
|
||||
$(RUSTDOC) examples/$*.rs --crate-name $* --crate-type bin --output $(OUTPUT_DIR) \
|
||||
--extern foobar=$(TMPDIR)/libfoobar.rmeta \
|
||||
-Z unstable-options \
|
||||
--scrape-examples-output-path $@ \
|
||||
--scrape-examples-target-crate foobar \
|
||||
$(extra_flags)
|
||||
|
||||
$(TMPDIR)/lib%.rmeta: src/lib.rs
|
||||
$(RUSTC) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
|
||||
|
||||
scrape: $(foreach d,$(deps),$(TMPDIR)/$(d).calls)
|
||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
|
||||
-Z unstable-options \
|
||||
$(foreach d,$(deps),--with-examples $(TMPDIR)/$(d).calls)
|
||||
|
||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|
Loading…
Reference in New Issue
Block a user