diff options
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. |