aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bdep/config.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/bdep/config.cxx b/bdep/config.cxx
index f06bb98..f16d8b0 100644
--- a/bdep/config.cxx
+++ b/bdep/config.cxx
@@ -120,7 +120,8 @@ namespace bdep
name = move (s);
}
- // Verify the configuration directory is not inside one of the packages.
+ // Verify the configuration directory is not inside one of the packages or
+ // the project itself if it has a glue buildfile.
//
static void
verify_configuration_path (const dir_path& cfg,
@@ -135,6 +136,18 @@ namespace bdep
fail << "configuration directory " << cfg << " is inside package "
<< p.name << " (" << d << ")";
}
+
+ if (cfg.sub (prj))
+ {
+ path bf;
+ if (exists (bf = prj / "buildfile") || exists (bf = prj / "build2file"))
+ {
+ fail << "configuration directory " << cfg << " is inside project "
+ << "directory " << prj <<
+ info << "remove glue " << bf << " if you would like to keep "
+ << "configurations inside your project";
+ }
+ }
}
shared_ptr<configuration>