From 70317569c6dcd9809ed4a8c425777e653ec6ca08 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 1 May 2017 18:24:31 +0300 Subject: Add hxx extension for headers --- build2/version/init | 31 ------------------------ build2/version/init.cxx | 22 ++++++++--------- build2/version/init.hxx | 31 ++++++++++++++++++++++++ build2/version/module | 36 ---------------------------- build2/version/module.cxx | 2 +- build2/version/module.hxx | 36 ++++++++++++++++++++++++++++ build2/version/rule | 53 ----------------------------------------- build2/version/rule.cxx | 24 +++++++++---------- build2/version/rule.hxx | 53 +++++++++++++++++++++++++++++++++++++++++ build2/version/snapshot | 33 ------------------------- build2/version/snapshot-git.cxx | 2 +- build2/version/snapshot.cxx | 4 ++-- build2/version/snapshot.hxx | 33 +++++++++++++++++++++++++ 13 files changed, 180 insertions(+), 180 deletions(-) delete mode 100644 build2/version/init create mode 100644 build2/version/init.hxx delete mode 100644 build2/version/module create mode 100644 build2/version/module.hxx delete mode 100644 build2/version/rule create mode 100644 build2/version/rule.hxx delete mode 100644 build2/version/snapshot create mode 100644 build2/version/snapshot.hxx (limited to 'build2/version') diff --git a/build2/version/init b/build2/version/init deleted file mode 100644 index 8ffb999..0000000 --- a/build2/version/init +++ /dev/null @@ -1,31 +0,0 @@ -// file : build2/version/init -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_VERSION_INIT -#define BUILD2_VERSION_INIT - -#include -#include - -#include - -namespace build2 -{ - namespace version - { - void - boot (scope&, const location&, unique_ptr&); - - bool - init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - } -} - -#endif // BUILD2_VERSION_INIT diff --git a/build2/version/init.cxx b/build2/version/init.cxx index cce8de9..699495a 100644 --- a/build2/version/init.cxx +++ b/build2/version/init.cxx @@ -2,21 +2,21 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include -#include -#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include -#include -#include -#include +#include +#include +#include using namespace std; using namespace butl; diff --git a/build2/version/init.hxx b/build2/version/init.hxx new file mode 100644 index 0000000..54beae1 --- /dev/null +++ b/build2/version/init.hxx @@ -0,0 +1,31 @@ +// file : build2/version/init.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_VERSION_INIT_HXX +#define BUILD2_VERSION_INIT_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace version + { + void + boot (scope&, const location&, unique_ptr&); + + bool + init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + } +} + +#endif // BUILD2_VERSION_INIT_HXX diff --git a/build2/version/module b/build2/version/module deleted file mode 100644 index 1e6fb7a..0000000 --- a/build2/version/module +++ /dev/null @@ -1,36 +0,0 @@ -// file : build2/version/module -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_VERSION_MODULE -#define BUILD2_VERSION_MODULE - -#include - -#include -#include - -#include - -namespace build2 -{ - namespace version - { - // The 'depends' values from manifest. - // - using dependency_constraints = std::map; - - struct module: module_base - { - static const string name; - - butl::standard_version version; - dependency_constraints dependencies; - - module (butl::standard_version v, dependency_constraints d) - : version (move (v)), dependencies (move (d)) {} - }; - } -} - -#endif // BUILD2_VERSION_MODULE diff --git a/build2/version/module.cxx b/build2/version/module.cxx index 9865271..acc629a 100644 --- a/build2/version/module.cxx +++ b/build2/version/module.cxx @@ -2,7 +2,7 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include using namespace std; diff --git a/build2/version/module.hxx b/build2/version/module.hxx new file mode 100644 index 0000000..45b1a47 --- /dev/null +++ b/build2/version/module.hxx @@ -0,0 +1,36 @@ +// file : build2/version/module.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_VERSION_MODULE_HXX +#define BUILD2_VERSION_MODULE_HXX + +#include + +#include +#include + +#include + +namespace build2 +{ + namespace version + { + // The 'depends' values from manifest. + // + using dependency_constraints = std::map; + + struct module: module_base + { + static const string name; + + butl::standard_version version; + dependency_constraints dependencies; + + module (butl::standard_version v, dependency_constraints d) + : version (move (v)), dependencies (move (d)) {} + }; + } +} + +#endif // BUILD2_VERSION_MODULE_HXX diff --git a/build2/version/rule b/build2/version/rule deleted file mode 100644 index 186df59..0000000 --- a/build2/version/rule +++ /dev/null @@ -1,53 +0,0 @@ -// file : build2/version/rule -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_VERSION_RULE -#define BUILD2_VERSION_RULE - -#include -#include - -#include - -namespace build2 -{ - namespace version - { - // Generate a version file. - // - class version_doc: public rule - { - public: - version_doc () {} - - virtual match_result - match (action, target&, const string&) const override; - - virtual recipe - apply (action, target&) const override; - - static target_state - perform_update (action, const target&); - }; - - // Preprocess an .in file. - // - class version_in: public rule - { - public: - version_in () {} - - virtual match_result - match (action, target&, const string&) const override; - - virtual recipe - apply (action, target&) const override; - - static target_state - perform_update (action, const target&); - }; - } -} - -#endif // BUILD2_VERSION_RULE diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx index 3e143c1..d9669da 100644 --- a/build2/version/rule.cxx +++ b/build2/version/rule.cxx @@ -2,18 +2,18 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include using namespace std; using namespace butl; diff --git a/build2/version/rule.hxx b/build2/version/rule.hxx new file mode 100644 index 0000000..e686694 --- /dev/null +++ b/build2/version/rule.hxx @@ -0,0 +1,53 @@ +// file : build2/version/rule.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_VERSION_RULE_HXX +#define BUILD2_VERSION_RULE_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace version + { + // Generate a version file. + // + class version_doc: public rule + { + public: + version_doc () {} + + virtual match_result + match (action, target&, const string&) const override; + + virtual recipe + apply (action, target&) const override; + + static target_state + perform_update (action, const target&); + }; + + // Preprocess an .in file. + // + class version_in: public rule + { + public: + version_in () {} + + virtual match_result + match (action, target&, const string&) const override; + + virtual recipe + apply (action, target&) const override; + + static target_state + perform_update (action, const target&); + }; + } +} + +#endif // BUILD2_VERSION_RULE_HXX diff --git a/build2/version/snapshot b/build2/version/snapshot deleted file mode 100644 index a279729..0000000 --- a/build2/version/snapshot +++ /dev/null @@ -1,33 +0,0 @@ -// file : build2/version/snapshot -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_VERSION_SNAPSHOT -#define BUILD2_VERSION_SNAPSHOT - -#include -#include - -#include - -namespace build2 -{ - namespace version - { - struct snapshot - { - uint64_t sn = 0; - string id; - - bool - empty () const {return sn == 0;} - }; - - // Return empty snapshot if unknown scm or uncommitted. - // - snapshot - extract_snapshot (const scope& rs); - } -} - -#endif // BUILD2_VERSION_SNAPSHOT diff --git a/build2/version/snapshot-git.cxx b/build2/version/snapshot-git.cxx index b5db470..d91eb62 100644 --- a/build2/version/snapshot-git.cxx +++ b/build2/version/snapshot-git.cxx @@ -2,7 +2,7 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include using namespace std; diff --git a/build2/version/snapshot.cxx b/build2/version/snapshot.cxx index be6c147..00528c7 100644 --- a/build2/version/snapshot.cxx +++ b/build2/version/snapshot.cxx @@ -2,9 +2,9 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include -#include +#include using namespace std; diff --git a/build2/version/snapshot.hxx b/build2/version/snapshot.hxx new file mode 100644 index 0000000..b7e6dd7 --- /dev/null +++ b/build2/version/snapshot.hxx @@ -0,0 +1,33 @@ +// file : build2/version/snapshot.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_VERSION_SNAPSHOT_HXX +#define BUILD2_VERSION_SNAPSHOT_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace version + { + struct snapshot + { + uint64_t sn = 0; + string id; + + bool + empty () const {return sn == 0;} + }; + + // Return empty snapshot if unknown scm or uncommitted. + // + snapshot + extract_snapshot (const scope& rs); + } +} + +#endif // BUILD2_VERSION_SNAPSHOT_HXX -- cgit v1.1