2022-08-22 19:00:00 -05:00
|
|
|
include ../../run-make-fulldeps/tools.mk
|
2021-11-04 15:57:39 -05:00
|
|
|
|
|
|
|
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
2021-11-05 11:32:04 -05:00
|
|
|
DYLIB_NAME := $(shell echo | $(RUSTC) --crate-name foobar_macro --crate-type dylib --print file-names -)
|
2021-11-04 15:57:39 -05:00
|
|
|
|
|
|
|
all:
|
|
|
|
$(RUSTC) src/proc.rs --crate-name foobar_macro --edition=2021 --crate-type proc-macro --emit=dep-info,link
|
|
|
|
|
|
|
|
$(RUSTC) src/lib.rs --crate-name foobar --edition=2021 --crate-type lib --emit=dep-info,link
|
|
|
|
|
|
|
|
$(RUSTDOC) examples/ex.rs --crate-name ex --crate-type bin --output $(OUTPUT_DIR) \
|
2021-11-05 11:32:04 -05:00
|
|
|
--extern foobar=$(TMPDIR)/libfoobar.rlib --extern foobar_macro=$(TMPDIR)/$(DYLIB_NAME) \
|
2021-11-04 15:57:39 -05:00
|
|
|
-Z unstable-options --scrape-examples-output-path $(TMPDIR)/ex.calls --scrape-examples-target-crate foobar
|
|
|
|
|
|
|
|
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
|
|
|
|
-Z unstable-options --with-examples $(TMPDIR)/ex.calls
|
|
|
|
|
|
|
|
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|