diff options
-rw-r--r-- | build2/context.cxx | 25 | ||||
-rw-r--r-- | tests/function/path/buildfile | 2 | ||||
-rw-r--r-- | tests/test/script/integration/buildfile | 2 | ||||
-rw-r--r-- | tests/test/script/runner/cleanup.test | 2 | ||||
-rw-r--r-- | tests/test/script/runner/status.test | 2 | ||||
-rw-r--r-- | unit-tests/function/driver.cxx | 8 | ||||
-rw-r--r-- | unit-tests/test/script/parser/driver.cxx | 2 |
7 files changed, 18 insertions, 25 deletions
diff --git a/build2/context.cxx b/build2/context.cxx index 3b58b90..a193abf 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -237,27 +237,20 @@ namespace build2 v.insert<string> ("extension", variable_visibility::target); } - // 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; - // Enter the version. + // Build system driver process path. + // + gs.assign<process_path> ("build.path") = + process_path (nullptr, // Will be filled by value assignment. + path (argv0.recall_string ()), + path (argv0.effect)); + + // Build system version. // { - gs.assign<uint64_t> ("build.version") = uint64_t (BUILD2_VERSION); + gs.assign<uint64_t> ("build.version") = uint64_t (BUILD2_VERSION); gs.assign<string> ("build.version.string") = BUILD2_VERSION_STR; // AABBCCDD diff --git a/tests/function/path/buildfile b/tests/function/path/buildfile index db40358..8f51cab 100644 --- a/tests/function/path/buildfile +++ b/tests/function/path/buildfile @@ -4,4 +4,4 @@ ./: test{testscript} -test{*}: test = $build.driver +test{*}: test = $effect($build.path) diff --git a/tests/test/script/integration/buildfile b/tests/test/script/integration/buildfile index 9b7b906..d2b77c9 100644 --- a/tests/test/script/integration/buildfile +++ b/tests/test/script/integration/buildfile @@ -4,4 +4,4 @@ ./: test{testscript} -test{*}: test = $build.driver +test{*}: test = $effect($build.path) diff --git a/tests/test/script/runner/cleanup.test b/tests/test/script/runner/cleanup.test index 4cd8650..5018bd1 100644 --- a/tests/test/script/runner/cleanup.test +++ b/tests/test/script/runner/cleanup.test @@ -10,7 +10,7 @@ amalgamation = using test EOI -b = $build.driver -q --no-column --buildfile - <"./: test{testscript}" \ +b = $effect($build.path) -q --no-column --buildfile - <"./: test{testscript}" \ &?test/*** test c = cat >>>testscript test = \'$test\' diff --git a/tests/test/script/runner/status.test b/tests/test/script/runner/status.test index 00d7257..09d5b16 100644 --- a/tests/test/script/runner/status.test +++ b/tests/test/script/runner/status.test @@ -10,7 +10,7 @@ amalgamation = using test EOI -b = $build.driver -q --no-column --buildfile - <"./: test{testscript}" \ +b = $effect($build.path) -q --no-column --buildfile - <"./: test{testscript}" \ &?test/*** test c = cat >>>testscript test = \'$test\' diff --git a/unit-tests/function/driver.cxx b/unit-tests/function/driver.cxx index 0708cea..192b954 100644 --- a/unit-tests/function/driver.cxx +++ b/unit-tests/function/driver.cxx @@ -23,9 +23,9 @@ namespace build2 }; int - main () + main (int, char* argv[]) { - init ("false", 1); // No build system driver, default verbosity. + init (argv[0], 1); // Fake build system driver, default verbosity. reset (strings ()); // No command line variables. function_family f ("dummy"); @@ -106,7 +106,7 @@ namespace build2 } int -main () +main (int argc, char* argv[]) { - return build2::main (); + return build2::main (argc, argv); } diff --git a/unit-tests/test/script/parser/driver.cxx b/unit-tests/test/script/parser/driver.cxx index 0fcba38..83160cb 100644 --- a/unit-tests/test/script/parser/driver.cxx +++ b/unit-tests/test/script/parser/driver.cxx @@ -135,7 +135,7 @@ namespace build2 { tracer trace ("main"); - init ("false", 1); // No build system driver, default verbosity. + init (argv[0], 1); // Fake build system driver, default verbosity. reset (strings ()); // No command line variables. bool scope (false); |