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/dist/init | 31 ---------------------- build2/dist/init.cxx | 16 ++++++------ build2/dist/init.hxx | 31 ++++++++++++++++++++++ build2/dist/module | 65 ----------------------------------------------- build2/dist/module.cxx | 2 +- build2/dist/module.hxx | 65 +++++++++++++++++++++++++++++++++++++++++++++++ build2/dist/operation | 21 --------------- build2/dist/operation.cxx | 22 ++++++++-------- build2/dist/operation.hxx | 21 +++++++++++++++ build2/dist/rule | 40 ----------------------------- build2/dist/rule.cxx | 10 ++++---- build2/dist/rule.hxx | 40 +++++++++++++++++++++++++++++ 12 files changed, 182 insertions(+), 182 deletions(-) delete mode 100644 build2/dist/init create mode 100644 build2/dist/init.hxx delete mode 100644 build2/dist/module create mode 100644 build2/dist/module.hxx delete mode 100644 build2/dist/operation create mode 100644 build2/dist/operation.hxx delete mode 100644 build2/dist/rule create mode 100644 build2/dist/rule.hxx (limited to 'build2/dist') diff --git a/build2/dist/init b/build2/dist/init deleted file mode 100644 index 67ec0a4..0000000 --- a/build2/dist/init +++ /dev/null @@ -1,31 +0,0 @@ -// file : build2/dist/init -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_DIST_INIT -#define BUILD2_DIST_INIT - -#include -#include - -#include - -namespace build2 -{ - namespace dist - { - void - boot (scope&, const location&, unique_ptr&); - - bool - init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - } -} - -#endif // BUILD2_DIST_INIT diff --git a/build2/dist/init.cxx b/build2/dist/init.cxx index 41927cd..d002868 100644 --- a/build2/dist/init.cxx +++ b/build2/dist/init.cxx @@ -2,17 +2,17 @@ // 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 using namespace std; using namespace butl; diff --git a/build2/dist/init.hxx b/build2/dist/init.hxx new file mode 100644 index 0000000..45d47df --- /dev/null +++ b/build2/dist/init.hxx @@ -0,0 +1,31 @@ +// file : build2/dist/init.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_DIST_INIT_HXX +#define BUILD2_DIST_INIT_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace dist + { + void + boot (scope&, const location&, unique_ptr&); + + bool + init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + } +} + +#endif // BUILD2_DIST_INIT_HXX diff --git a/build2/dist/module b/build2/dist/module deleted file mode 100644 index 5510423..0000000 --- a/build2/dist/module +++ /dev/null @@ -1,65 +0,0 @@ -// file : build2/dist/module -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_DIST_MODULE -#define BUILD2_DIST_MODULE - -#include -#include - -#include -#include - -namespace build2 -{ - namespace dist - { - struct module: module_base - { - static const string name; - - const variable& var_dist_package; - - // Distribution post-processing callbacks. - // - // The last component in the pattern may contain shell wildcards. If the - // path contains a directory, then it is matched from the distribution - // root only. Otherwise, it is matched against all the files being - // distributed. For example: - // - // buildfile - every buildfile - // ./buildfile - root buildfile only - // tests/buildfile - tests/buildfile only - // - // The callback is called with the absolute path of the matching file - // after it has been copied to the distribution directory. The project's - // root scope and callback-specific data are passed along. - // - using callback_func = void (const path&, const scope&, void*); - - void - register_callback (path pattern, callback_func* f, void* data) - { - callbacks_.push_back (callback {move (pattern), f, data}); - } - - // Implementation details. - // - module (const variable& v_d_p) - : var_dist_package (v_d_p) {} - - public: - struct callback - { - const path pattern; - callback_func* function; - void* data; - }; - - vector callbacks_; - }; - } -} - -#endif // BUILD2_DIST_MODULE diff --git a/build2/dist/module.cxx b/build2/dist/module.cxx index 05ca1cb..4f14ddb 100644 --- a/build2/dist/module.cxx +++ b/build2/dist/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/dist/module.hxx b/build2/dist/module.hxx new file mode 100644 index 0000000..e6eb975 --- /dev/null +++ b/build2/dist/module.hxx @@ -0,0 +1,65 @@ +// file : build2/dist/module.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_DIST_MODULE_HXX +#define BUILD2_DIST_MODULE_HXX + +#include +#include + +#include +#include + +namespace build2 +{ + namespace dist + { + struct module: module_base + { + static const string name; + + const variable& var_dist_package; + + // Distribution post-processing callbacks. + // + // The last component in the pattern may contain shell wildcards. If the + // path contains a directory, then it is matched from the distribution + // root only. Otherwise, it is matched against all the files being + // distributed. For example: + // + // buildfile - every buildfile + // ./buildfile - root buildfile only + // tests/buildfile - tests/buildfile only + // + // The callback is called with the absolute path of the matching file + // after it has been copied to the distribution directory. The project's + // root scope and callback-specific data are passed along. + // + using callback_func = void (const path&, const scope&, void*); + + void + register_callback (path pattern, callback_func* f, void* data) + { + callbacks_.push_back (callback {move (pattern), f, data}); + } + + // Implementation details. + // + module (const variable& v_d_p) + : var_dist_package (v_d_p) {} + + public: + struct callback + { + const path pattern; + callback_func* function; + void* data; + }; + + vector callbacks_; + }; + } +} + +#endif // BUILD2_DIST_MODULE_HXX diff --git a/build2/dist/operation b/build2/dist/operation deleted file mode 100644 index 845130f..0000000 --- a/build2/dist/operation +++ /dev/null @@ -1,21 +0,0 @@ -// file : build2/dist/operation -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_DIST_OPERATION -#define BUILD2_DIST_OPERATION - -#include -#include - -#include - -namespace build2 -{ - namespace dist - { - extern const meta_operation_info dist; - } -} - -#endif // BUILD2_DIST_OPERATION diff --git a/build2/dist/operation.cxx b/build2/dist/operation.cxx index 859225d..d4ca3c6 100644 --- a/build2/dist/operation.cxx +++ b/build2/dist/operation.cxx @@ -2,20 +2,20 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include -#include // path_match() +#include // path_match() -#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/dist/operation.hxx b/build2/dist/operation.hxx new file mode 100644 index 0000000..c72e467 --- /dev/null +++ b/build2/dist/operation.hxx @@ -0,0 +1,21 @@ +// file : build2/dist/operation.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_DIST_OPERATION_HXX +#define BUILD2_DIST_OPERATION_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace dist + { + extern const meta_operation_info dist; + } +} + +#endif // BUILD2_DIST_OPERATION_HXX diff --git a/build2/dist/rule b/build2/dist/rule deleted file mode 100644 index 0a5cc3a..0000000 --- a/build2/dist/rule +++ /dev/null @@ -1,40 +0,0 @@ -// file : build2/dist/rule -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_DIST_RULE -#define BUILD2_DIST_RULE - -#include -#include - -#include -#include -#include - -namespace build2 -{ - namespace dist - { - // This is the default rule that simply matches all the prerequisites. - // - // A custom rule (usually the same as perform_update) may be necessary to - // enter ad hoc prerequisites (like generated test input/output) or - // establishing group links (so that we see the dist variable set on a - // group). - // - class rule: public build2::rule - { - public: - rule () {} - - virtual match_result - match (action, target&, const string&) const override; - - virtual recipe - apply (action, target&) const override; - }; - } -} - -#endif // BUILD2_DIST_RULE diff --git a/build2/dist/rule.cxx b/build2/dist/rule.cxx index 338f7f9..ab00d41 100644 --- a/build2/dist/rule.cxx +++ b/build2/dist/rule.cxx @@ -2,12 +2,12 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include using namespace std; diff --git a/build2/dist/rule.hxx b/build2/dist/rule.hxx new file mode 100644 index 0000000..0524029 --- /dev/null +++ b/build2/dist/rule.hxx @@ -0,0 +1,40 @@ +// file : build2/dist/rule.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_DIST_RULE_HXX +#define BUILD2_DIST_RULE_HXX + +#include +#include + +#include +#include +#include + +namespace build2 +{ + namespace dist + { + // This is the default rule that simply matches all the prerequisites. + // + // A custom rule (usually the same as perform_update) may be necessary to + // enter ad hoc prerequisites (like generated test input/output) or + // establishing group links (so that we see the dist variable set on a + // group). + // + class rule: public build2::rule + { + public: + rule () {} + + virtual match_result + match (action, target&, const string&) const override; + + virtual recipe + apply (action, target&) const override; + }; + } +} + +#endif // BUILD2_DIST_RULE_HXX -- cgit v1.1