aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-08-04 07:14:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-08-04 07:27:09 +0200
commit4db621c4cb73a0f53e38ec33665254990c5285f3 (patch)
treee5425e887085fbf757251453c9cea7992d7e2065
parent60ca2318794cecb80ca93cfceb4610a1568a7a2d (diff)
Make sure configuration is not inside project with glue buildfile
-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>