From f8c992f8b481acd31cdb4c8b892696c2dd81b26e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 21 May 2024 11:26:57 +0200 Subject: [PATCH] Migrate `run-make/rustdoc-scrape-examples-multiple` to `rmake.rs` --- .../tidy/src/allowed_run_make_makefiles.txt | 1 - .../rustdoc-scrape-examples-multiple/Makefile | 5 ----- .../rustdoc-scrape-examples-multiple/rmake.rs | 6 ++++++ .../scrape.mk | 21 ------------------- 4 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 tests/run-make/rustdoc-scrape-examples-multiple/Makefile create mode 100644 tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs delete mode 100644 tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 9b879f33778fd..001cfff143ecc 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -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 diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/Makefile b/tests/run-make/rustdoc-scrape-examples-multiple/Makefile deleted file mode 100644 index 453a7d4bc8b81..0000000000000 --- a/tests/run-make/rustdoc-scrape-examples-multiple/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -deps := ex ex2 - -include ./scrape.mk - -all: scrape diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs b/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs new file mode 100644 index 0000000000000..e9c54fa392237 --- /dev/null +++ b/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs @@ -0,0 +1,6 @@ +#[path = "../rustdoc-scrape-examples-remap/scrape.rs"] +mod scrape; + +fn main() { + scrape::scrape(&[]); +} diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk b/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk deleted file mode 100644 index 57220bc6635c7..0000000000000 --- a/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk +++ /dev/null @@ -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