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/cli/init | 37 ---------------------------------- build2/cli/init.cxx | 18 ++++++++--------- build2/cli/init.hxx | 37 ++++++++++++++++++++++++++++++++++ build2/cli/rule | 39 ------------------------------------ build2/cli/rule.cxx | 16 +++++++-------- build2/cli/rule.hxx | 39 ++++++++++++++++++++++++++++++++++++ build2/cli/target | 55 --------------------------------------------------- build2/cli/target.cxx | 2 +- build2/cli/target.hxx | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 149 insertions(+), 149 deletions(-) delete mode 100644 build2/cli/init create mode 100644 build2/cli/init.hxx delete mode 100644 build2/cli/rule create mode 100644 build2/cli/rule.hxx delete mode 100644 build2/cli/target create mode 100644 build2/cli/target.hxx (limited to 'build2/cli') diff --git a/build2/cli/init b/build2/cli/init deleted file mode 100644 index 149a436..0000000 --- a/build2/cli/init +++ /dev/null @@ -1,37 +0,0 @@ -// file : build2/cli/init -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_CLI_INIT -#define BUILD2_CLI_INIT - -#include -#include - -#include - -namespace build2 -{ - namespace cli - { - bool - config_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - bool - init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - } -} - -#endif // BUILD2_CLI_INIT diff --git a/build2/cli/init.cxx b/build2/cli/init.cxx index 3e4ba03..d257efa 100644 --- a/build2/cli/init.cxx +++ b/build2/cli/init.cxx @@ -2,19 +2,19 @@ // 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 using namespace std; using namespace butl; diff --git a/build2/cli/init.hxx b/build2/cli/init.hxx new file mode 100644 index 0000000..3edb24e --- /dev/null +++ b/build2/cli/init.hxx @@ -0,0 +1,37 @@ +// file : build2/cli/init.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_CLI_INIT_HXX +#define BUILD2_CLI_INIT_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace cli + { + bool + config_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + bool + init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + } +} + +#endif // BUILD2_CLI_INIT_HXX diff --git a/build2/cli/rule b/build2/cli/rule deleted file mode 100644 index d783c20..0000000 --- a/build2/cli/rule +++ /dev/null @@ -1,39 +0,0 @@ -// file : build2/cli/rule -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_CLI_RULE -#define BUILD2_CLI_RULE - -#include -#include - -#include - -namespace build2 -{ - namespace cli - { - // @@ Redo as two separate rules? - // - class compile: public rule - { - public: - compile () {} - - 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&); - - static target_state - perform_clean (action, const target&); - }; - } -} - -#endif // BUILD2_CLI_RULE diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx index 2eb98c7..9e925b3 100644 --- a/build2/cli/rule.cxx +++ b/build2/cli/rule.cxx @@ -2,16 +2,16 @@ // 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/cli/rule.hxx b/build2/cli/rule.hxx new file mode 100644 index 0000000..6798a6b --- /dev/null +++ b/build2/cli/rule.hxx @@ -0,0 +1,39 @@ +// file : build2/cli/rule.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_CLI_RULE_HXX +#define BUILD2_CLI_RULE_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace cli + { + // @@ Redo as two separate rules? + // + class compile: public rule + { + public: + compile () {} + + 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&); + + static target_state + perform_clean (action, const target&); + }; + } +} + +#endif // BUILD2_CLI_RULE_HXX diff --git a/build2/cli/target b/build2/cli/target deleted file mode 100644 index 5e51bb4..0000000 --- a/build2/cli/target +++ /dev/null @@ -1,55 +0,0 @@ -// file : build2/cli/target -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_CLI_TARGET -#define BUILD2_CLI_TARGET - -#include -#include - -#include - -#include - -namespace build2 -{ - namespace cli - { - class cli: public file - { - public: - using file::file; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - - // Standard layout type compatible with group_view's const target*[3]. - // - struct cli_cxx_members - { - const cxx::hxx* h = nullptr; - const cxx::cxx* c = nullptr; - const cxx::ixx* i = nullptr; - }; - - class cli_cxx: public mtime_target, public cli_cxx_members - { - public: - using mtime_target::mtime_target; - - virtual group_view - group_members (action_type) const override; - - public: - static const target_type static_type; - - virtual const target_type& - dynamic_type () const override {return static_type;} - }; - } -} - -#endif // BUILD2_CLI_TARGET diff --git a/build2/cli/target.cxx b/build2/cli/target.cxx index 2199f79..0b85810 100644 --- a/build2/cli/target.cxx +++ b/build2/cli/target.cxx @@ -2,7 +2,7 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include +#include using namespace std; using namespace butl; diff --git a/build2/cli/target.hxx b/build2/cli/target.hxx new file mode 100644 index 0000000..1247172 --- /dev/null +++ b/build2/cli/target.hxx @@ -0,0 +1,55 @@ +// file : build2/cli/target.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_CLI_TARGET_HXX +#define BUILD2_CLI_TARGET_HXX + +#include +#include + +#include + +#include + +namespace build2 +{ + namespace cli + { + class cli: public file + { + public: + using file::file; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + // Standard layout type compatible with group_view's const target*[3]. + // + struct cli_cxx_members + { + const cxx::hxx* h = nullptr; + const cxx::cxx* c = nullptr; + const cxx::ixx* i = nullptr; + }; + + class cli_cxx: public mtime_target, public cli_cxx_members + { + public: + using mtime_target::mtime_target; + + virtual group_view + group_members (action_type) const override; + + public: + static const target_type static_type; + + virtual const target_type& + dynamic_type () const override {return static_type;} + }; + } +} + +#endif // BUILD2_CLI_TARGET_HXX -- cgit v1.1