From 930ae81f85e5ee5ac37311f5e9c89000fbcb59a6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 1 Aug 2019 16:17:09 +0300 Subject: Move bash build system module to separate library --- libbuild2/bash/utility.hxx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libbuild2/bash/utility.hxx (limited to 'libbuild2/bash/utility.hxx') diff --git a/libbuild2/bash/utility.hxx b/libbuild2/bash/utility.hxx new file mode 100644 index 0000000..1f981c2 --- /dev/null +++ b/libbuild2/bash/utility.hxx @@ -0,0 +1,27 @@ +// file : libbuild2/bash/utility.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef LIBBUILD2_BASH_UTILITY_HXX +#define LIBBUILD2_BASH_UTILITY_HXX + +#include +#include + +namespace build2 +{ + namespace bash + { + // Strip the .bash extension from the project name. + // + // Note that the result may not be a valid project name. + // + inline string + project_base (const project_name& pn) + { + return pn.base ("bash"); + } + } +} + +#endif // LIBBUILD2_BASH_UTILITY_HXX -- cgit v1.1