From ee49a8c2a3dbe88c625599a750c9219e3118b008 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 7 Nov 2016 11:47:51 +0200 Subject: Make build.driver path absolute --- build2/context.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'build2/context.cxx') 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 ("extension", variable_visibility::target); } - gs.assign ("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 ("build.driver") = move (p); + } gs.assign ("build.work") = work; gs.assign ("build.home") = home; -- cgit v1.1