aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-09-27 09:10:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-09-27 09:10:38 +0200
commit50d93195e9a67b75fdd87b6fe0106af2da4d56f8 (patch)
tree4b30d515cda335a0d20a98bc46b53516ca0b5acf
parent62e3c70ca0e830e1c29ce0bd09adcebdf41c610d (diff)
Improve diagnostics for multiple targets sharing path
-rw-r--r--libbuild2/operation.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/libbuild2/operation.cxx b/libbuild2/operation.cxx
index 9fbf870..412e07f 100644
--- a/libbuild2/operation.cxx
+++ b/libbuild2/operation.cxx
@@ -226,9 +226,19 @@ namespace build2
}
else if (t->decl != target_decl::real)
{
- dr << info << "target " << *t << " is not explicitly declared "
- << "in any buildfile" <<
- info << "perhaps it is a dynamic dependency?";
+ if (t->decl == target_decl::implied)
+ {
+ dr << info << "target " << *t << " is implied by a buildfile";
+ }
+ else
+ {
+ dr << info << "target " << *t << " is not declared in a buildfile";
+
+ if (t->decl == target_decl::prereq_file)
+ dr << " but has corresponding existing file";
+
+ dr << info << "perhaps it is a dynamic dependency?";
+ }
}
}
}