about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2022-10-05 12:45:52 +0200
committerPietro Albini <pietro.albini@ferrous-systems.com>2022-10-05 14:32:09 +0200
commit004b8b98d626a89b5d4cdc630ff337c0f4ea919f (patch)
tree96e9c13a87a142af94b2f805b65c0812bb712fda
parentafe29e48bc4d57c1bb73228ba8d70dc8f42436fc (diff)
downloadrust-004b8b98d626a89b5d4cdc630ff337c0f4ea919f.tar.gz
rust-004b8b98d626a89b5d4cdc630ff337c0f4ea919f.zip
add a "standalone" path for doc::Standalone to be able to exclude it
Before this commit, the path for the doc::Standalone step was "src/doc",
which is accurate as the standalone docs source files live at the root
of the "src/doc" directory tree.

Unfortunately, that caused bad interactions when trying to exclude it
with `--exclude src/doc`. When an exclusion is passed to bootstrap, it
will exclude all steps whose path *ends with* the exclusion, which
results in the Cargo book (src/tools/cargo/src/doc) to also be excluded.

To work around this problem, this commit adds the "standalone" path as
an alternate path for doc::Standalone, allowing `--exclude standalone`
to work without side effects.
-rw-r--r--src/bootstrap/doc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index b286c79a303..a8524fea1b2 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -299,7 +299,7 @@ impl Step for Standalone {
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
         let builder = run.builder;
-        run.path("src/doc").default_condition(builder.config.docs)
+        run.path("src/doc").path("standalone").default_condition(builder.config.docs)
     }
 
     fn make_run(run: RunConfig<'_>) {