From 7de6f6f275d840e8d9523c72d8f4309c51b4dcd3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 7 Mar 2015 14:36:51 +0200 Subject: Add support for buildspec --- build/spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 build/spec (limited to 'build/spec') diff --git a/build/spec b/build/spec new file mode 100644 index 0000000..9ca8c4d --- /dev/null +++ b/build/spec @@ -0,0 +1,58 @@ +// file : build/spec -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD_SPEC +#define BUILD_SPEC + +#include +#include +#include +#include // move() + +#include +#include + +namespace build +{ + struct targetspec + { + targetspec (path sr, name t) + : src_root (std::move (sr)), target (std::move (t)) {} + + path src_root; + name target; // target.dir is out_root. + }; + + struct opspec: std::vector + { + opspec () = default; + opspec (std::string o): operation (std::move (o)) {} + + std::string operation; + }; + + struct metaopspec: std::vector + { + metaopspec () = default; + metaopspec (std::string mo): meta_operation (std::move (mo)) {} + + std::string meta_operation; + }; + + typedef std::vector buildspec; + + std::ostream& + operator<< (std::ostream&, const targetspec&); + + std::ostream& + operator<< (std::ostream&, const opspec&); + + std::ostream& + operator<< (std::ostream&, const metaopspec&); + + std::ostream& + operator<< (std::ostream&, const buildspec&); +} + +#endif // BUILD_SPEC -- cgit v1.1