diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-21 15:38:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-21 15:38:28 +0200 |
commit | 91734f1772aeca9795040d2db03b4f29051fa922 (patch) | |
tree | 410fcab8d47a58ea57ce3f27d91c9ea7ede44a9b /libbuild2/bash | |
parent | d64ae97f6865bc25d496485622530e2a090c2eb4 (diff) |
Cleanup context.hxx and its usage
Diffstat (limited to 'libbuild2/bash')
-rw-r--r-- | libbuild2/bash/init.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/bash/init.cxx b/libbuild2/bash/init.cxx index 17c9ddd..bd0e34b 100644 --- a/libbuild2/bash/init.cxx +++ b/libbuild2/bash/init.cxx @@ -5,7 +5,6 @@ #include <libbuild2/bash/init.hxx> #include <libbuild2/scope.hxx> -#include <libbuild2/context.hxx> #include <libbuild2/variable.hxx> #include <libbuild2/diagnostics.hxx> @@ -54,10 +53,13 @@ namespace build2 // Install into bin/<project>/ by default stripping the .bash // extension from <project> if present. // - const project_name& p (cast<project_name> (rs.vars[var_project])); + const project_name& p (project (rs)); - install_path<bash> (bs, dir_path ("bin") /= project_base (p)); - install_mode<bash> (bs, "644"); + if (!p.empty ()) + { + install_path<bash> (bs, dir_path ("bin") /= project_base (p)); + install_mode<bash> (bs, "644"); + } } // Register rules. |