From dd973d03bf5f3f439dcdacbb22470105e66e698a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 29 Mar 2017 00:45:30 +0300 Subject: Implement manifests and build_config --- bbot/build-config | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 bbot/build-config (limited to 'bbot/build-config') diff --git a/bbot/build-config b/bbot/build-config new file mode 100644 index 0000000..0a3ecb3 --- /dev/null +++ b/bbot/build-config @@ -0,0 +1,54 @@ +// file : bbot/build-config -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BBOT_BUILD_CONFIG +#define BBOT_BUILD_CONFIG + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include + +namespace bbot +{ + // Build configuration matching specific machine names. Used by bbot + // controllers. + // + struct build_config + { + std::string machine_pattern; // Machine name pattern. + std::string name; // Configuration name. + + butl::optional target; + + variables vars; + }; + + using build_configs = std::vector; + + // Parse buildtab stream or file. Throw tab_parsing on parsing error, + // ios::failure on the underlying OS error. + // + // buildtab consists of lines in the following format: + // + // [] [] + // + using butl::tab_parsing; + + LIBBBOT_EXPORT build_configs + parse_buildtab (std::istream&, const std::string& name); + + LIBBBOT_EXPORT build_configs + parse_buildtab (const butl::path&); +} + +#endif // BBOT_BUILD_CONFIG -- cgit v1.1