2023-03-30 12:58:50 +00:00
|
|
|
include ../tools.mk
|
2021-10-09 03:49:05 +00:00
|
|
|
|
|
|
|
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 $@ \
|
2022-02-12 05:48:59 +00:00
|
|
|
--scrape-examples-target-crate foobar \
|
|
|
|
$(extra_flags)
|
2021-10-09 03:49:05 +00:00
|
|
|
|
|
|
|
$(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
|