diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-07 11:47:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-07 11:47:51 +0200 |
commit | ee49a8c2a3dbe88c625599a750c9219e3118b008 (patch) | |
tree | 7ca30d23d63cb0e20c582960d1fcaf7f24ee09e1 /build2/context.cxx | |
parent | 20bdee0cc92440a951c9e3842d1666ae8d01928c (diff) |
Make build.driver path absolute
Diffstat (limited to 'build2/context.cxx')
-rw-r--r-- | build2/context.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/build2/context.cxx b/build2/context.cxx index 1b5e03c..03e64cd 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -236,7 +236,19 @@ namespace build2 v.insert<string> ("extension", variable_visibility::target); } - gs.assign<path> ("build.driver") = argv0; + // Absolute path to the build system driver. + // + { + path p (argv0.effect_string ()); + + if (p.relative ()) + { + p = work / p; + p.normalize (); + } + + gs.assign<path> ("build.driver") = move (p); + } gs.assign<dir_path> ("build.work") = work; gs.assign<dir_path> ("build.home") = home; |