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/bin/guess | 107 -------------------------------------------- build2/bin/guess.cxx | 4 +- build2/bin/guess.hxx | 107 ++++++++++++++++++++++++++++++++++++++++++++ build2/bin/init | 100 ----------------------------------------- build2/bin/init.cxx | 18 ++++---- build2/bin/init.hxx | 100 +++++++++++++++++++++++++++++++++++++++++ build2/bin/rule | 46 ------------------- build2/bin/rule.cxx | 12 ++--- build2/bin/rule.hxx | 46 +++++++++++++++++++ build2/bin/target | 120 -------------------------------------------------- build2/bin/target.cxx | 2 +- build2/bin/target.hxx | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 391 insertions(+), 391 deletions(-) delete mode 100644 build2/bin/guess create mode 100644 build2/bin/guess.hxx delete mode 100644 build2/bin/init create mode 100644 build2/bin/init.hxx delete mode 100644 build2/bin/rule create mode 100644 build2/bin/rule.hxx delete mode 100644 build2/bin/target create mode 100644 build2/bin/target.hxx (limited to 'build2/bin') diff --git a/build2/bin/guess b/build2/bin/guess deleted file mode 100644 index 659fcd0..0000000 --- a/build2/bin/guess +++ /dev/null @@ -1,107 +0,0 @@ -// file : build2/bin/guess -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_BIN_GUESS -#define BUILD2_BIN_GUESS - -#include -#include - -namespace build2 -{ - namespace bin - { - // ar/ranlib information. - // - // Currently recognized ar/ranlib and their ids: - // - // gnu GNU binutils - // llvm LLVM - // bsd FreeBSD (and maybe other BSDs) - // msvc Microsoft's lib.exe - // generic Generic/unrecognized - // - // The signature is normally the --version/-V line. - // - // The checksum is used to detect ar/ranlib changes. It is calculated in - // a toolchain-specific manner (usually the output of --version/-V) and - // is not bulletproof. - // - struct ar_info - { - process_path ar_path; - string ar_id; - string ar_signature; - string ar_checksum; - - process_path ranlib_path; - string ranlib_id; - string ranlib_signature; - string ranlib_checksum; - }; - - // The ranlib path can be NULL, in which case no ranlib guessing will be - // attemplated and the returned ranlib_* members will be left empty. - // - ar_info - guess_ar (const path& ar, const path* ranlib, const dir_path& fallback); - - // ld information. - // - // Currently recognized linkers and their ids: - // - // gnu GNU binutils ld.bfd - // gold GNU binutils ld.gold - // llvm LLVM lld (note: not llvm-ld or llvm-link) - // ld64 Apple's new linker - // cctools Apple's old/classic linker - // msvc Microsoft's link.exe - // - // Note that BSDs are currently using GNU ld but some of them (e.g., - // FreeBSD) are hoping to migrate to lld. - // - // The signature is normally the --version/-version/-v line. - // - // The checksum is used to detect ld changes. It is calculated in a - // toolchain-specific manner (usually the output of --version/-version/-v) - // and is not bulletproof. - // - struct ld_info - { - process_path path; - string id; - string signature; - string checksum; - }; - - ld_info - guess_ld (const path& ld, const dir_path& fallback); - - // rc information. - // - // Currently recognized resource compilers and their ids: - // - // gnu GNU binutils windres - // msvc Microsoft's rc.exe - // - // The signature is normally the --version line. - // - // The checksum is used to detect rc changes. It is calculated in a - // toolchain-specific manner (usually the output of --version) and is not - // bulletproof. - // - struct rc_info - { - process_path path; - string id; - string signature; - string checksum; - }; - - rc_info - guess_rc (const path& rc, const dir_path& fallback); - } -} - -#endif // BUILD2_BIN_GUESS diff --git a/build2/bin/guess.cxx b/build2/bin/guess.cxx index 90012d4..780ccf8 100644 --- a/build2/bin/guess.cxx +++ b/build2/bin/guess.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/bin/guess.hxx b/build2/bin/guess.hxx new file mode 100644 index 0000000..803f299 --- /dev/null +++ b/build2/bin/guess.hxx @@ -0,0 +1,107 @@ +// file : build2/bin/guess.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_BIN_GUESS_HXX +#define BUILD2_BIN_GUESS_HXX + +#include +#include + +namespace build2 +{ + namespace bin + { + // ar/ranlib information. + // + // Currently recognized ar/ranlib and their ids: + // + // gnu GNU binutils + // llvm LLVM + // bsd FreeBSD (and maybe other BSDs) + // msvc Microsoft's lib.exe + // generic Generic/unrecognized + // + // The signature is normally the --version/-V line. + // + // The checksum is used to detect ar/ranlib changes. It is calculated in + // a toolchain-specific manner (usually the output of --version/-V) and + // is not bulletproof. + // + struct ar_info + { + process_path ar_path; + string ar_id; + string ar_signature; + string ar_checksum; + + process_path ranlib_path; + string ranlib_id; + string ranlib_signature; + string ranlib_checksum; + }; + + // The ranlib path can be NULL, in which case no ranlib guessing will be + // attemplated and the returned ranlib_* members will be left empty. + // + ar_info + guess_ar (const path& ar, const path* ranlib, const dir_path& fallback); + + // ld information. + // + // Currently recognized linkers and their ids: + // + // gnu GNU binutils ld.bfd + // gold GNU binutils ld.gold + // llvm LLVM lld (note: not llvm-ld or llvm-link) + // ld64 Apple's new linker + // cctools Apple's old/classic linker + // msvc Microsoft's link.exe + // + // Note that BSDs are currently using GNU ld but some of them (e.g., + // FreeBSD) are hoping to migrate to lld. + // + // The signature is normally the --version/-version/-v line. + // + // The checksum is used to detect ld changes. It is calculated in a + // toolchain-specific manner (usually the output of --version/-version/-v) + // and is not bulletproof. + // + struct ld_info + { + process_path path; + string id; + string signature; + string checksum; + }; + + ld_info + guess_ld (const path& ld, const dir_path& fallback); + + // rc information. + // + // Currently recognized resource compilers and their ids: + // + // gnu GNU binutils windres + // msvc Microsoft's rc.exe + // + // The signature is normally the --version line. + // + // The checksum is used to detect rc changes. It is calculated in a + // toolchain-specific manner (usually the output of --version) and is not + // bulletproof. + // + struct rc_info + { + process_path path; + string id; + string signature; + string checksum; + }; + + rc_info + guess_rc (const path& rc, const dir_path& fallback); + } +} + +#endif // BUILD2_BIN_GUESS_HXX diff --git a/build2/bin/init b/build2/bin/init deleted file mode 100644 index 430d789..0000000 --- a/build2/bin/init +++ /dev/null @@ -1,100 +0,0 @@ -// file : build2/bin/init -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_BIN_INIT -#define BUILD2_BIN_INIT - -#include -#include - -#include - -namespace build2 -{ - namespace bin - { - bool - vars_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - 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&); - - bool - ar_config_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - bool - ar_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - bool - ld_config_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - bool - ld_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - bool - rc_config_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - - bool - rc_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); - } -} - -#endif // BUILD2_BIN_INIT diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx index 9d08b62..71c77b2 100644 --- a/build2/bin/init.cxx +++ b/build2/bin/init.cxx @@ -2,20 +2,20 @@ // 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 using namespace std; using namespace butl; diff --git a/build2/bin/init.hxx b/build2/bin/init.hxx new file mode 100644 index 0000000..b629f94 --- /dev/null +++ b/build2/bin/init.hxx @@ -0,0 +1,100 @@ +// file : build2/bin/init.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_BIN_INIT_HXX +#define BUILD2_BIN_INIT_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace bin + { + bool + vars_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + 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&); + + bool + ar_config_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + bool + ar_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + bool + ld_config_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + bool + ld_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + bool + rc_config_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + + bool + rc_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); + } +} + +#endif // BUILD2_BIN_INIT_HXX diff --git a/build2/bin/rule b/build2/bin/rule deleted file mode 100644 index 95747c2..0000000 --- a/build2/bin/rule +++ /dev/null @@ -1,46 +0,0 @@ -// file : build2/bin/rule -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_BIN_RULE -#define BUILD2_BIN_RULE - -#include -#include - -#include - -namespace build2 -{ - namespace bin - { - class obj_rule: public rule - { - public: - obj_rule () {} - - virtual match_result - match (action, target&, const string&) const override; - - virtual recipe - apply (action, target&) const override; - }; - - class lib_rule: public rule - { - public: - lib_rule () {} - - virtual match_result - match (action, target&, const string&) const override; - - virtual recipe - apply (action, target&) const override; - - static target_state - perform (action, const target&); - }; - } -} - -#endif // BUILD2_BIN_RULE diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx index fd1526e..3aa3c81 100644 --- a/build2/bin/rule.cxx +++ b/build2/bin/rule.cxx @@ -2,14 +2,14 @@ // 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 using namespace std; diff --git a/build2/bin/rule.hxx b/build2/bin/rule.hxx new file mode 100644 index 0000000..7109473 --- /dev/null +++ b/build2/bin/rule.hxx @@ -0,0 +1,46 @@ +// file : build2/bin/rule.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_BIN_RULE_HXX +#define BUILD2_BIN_RULE_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace bin + { + class obj_rule: public rule + { + public: + obj_rule () {} + + virtual match_result + match (action, target&, const string&) const override; + + virtual recipe + apply (action, target&) const override; + }; + + class lib_rule: public rule + { + public: + lib_rule () {} + + virtual match_result + match (action, target&, const string&) const override; + + virtual recipe + apply (action, target&) const override; + + static target_state + perform (action, const target&); + }; + } +} + +#endif // BUILD2_BIN_RULE_HXX diff --git a/build2/bin/target b/build2/bin/target deleted file mode 100644 index 35bde60..0000000 --- a/build2/bin/target +++ /dev/null @@ -1,120 +0,0 @@ -// file : build2/bin/target -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef BUILD2_BIN_TARGET -#define BUILD2_BIN_TARGET - -#include -#include - -#include - -namespace build2 -{ - namespace bin - { - // The obj{} target group. - // - class obje: public file - { - public: - using file::file; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - - class obja: public file - { - public: - using file::file; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - - class objs: public file - { - public: - using file::file; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - - class obj: public target - { - public: - using target::target; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - - // The lib{} target group. - // - class liba: public file - { - public: - using file::file; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - - class libs: public file - { - public: - using file::file; - - public: - static const target_type static_type; - - virtual const target_type& - dynamic_type () const override {return static_type;} - }; - - // Standard layout type compatible with group_view's const target*[2]. - // - struct lib_members - { - const liba* a = nullptr; - const libs* s = nullptr; - }; - - class lib: public target, public lib_members - { - public: - using target::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;} - }; - - // Windows import library. - // - class libi: public file - { - public: - using file::file; - - public: - static const target_type static_type; - virtual const target_type& dynamic_type () const {return static_type;} - }; - } -} - -#endif // BUILD2_BIN_TARGET diff --git a/build2/bin/target.cxx b/build2/bin/target.cxx index dc691d6..962befa 100644 --- a/build2/bin/target.cxx +++ b/build2/bin/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; diff --git a/build2/bin/target.hxx b/build2/bin/target.hxx new file mode 100644 index 0000000..d920cc1 --- /dev/null +++ b/build2/bin/target.hxx @@ -0,0 +1,120 @@ +// file : build2/bin/target.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD2_BIN_TARGET_HXX +#define BUILD2_BIN_TARGET_HXX + +#include +#include + +#include + +namespace build2 +{ + namespace bin + { + // The obj{} target group. + // + class obje: public file + { + public: + using file::file; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class obja: public file + { + public: + using file::file; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class objs: public file + { + public: + using file::file; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class obj: public target + { + public: + using target::target; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + // The lib{} target group. + // + class liba: public file + { + public: + using file::file; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class libs: public file + { + public: + using file::file; + + public: + static const target_type static_type; + + virtual const target_type& + dynamic_type () const override {return static_type;} + }; + + // Standard layout type compatible with group_view's const target*[2]. + // + struct lib_members + { + const liba* a = nullptr; + const libs* s = nullptr; + }; + + class lib: public target, public lib_members + { + public: + using target::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;} + }; + + // Windows import library. + // + class libi: public file + { + public: + using file::file; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + } +} + +#endif // BUILD2_BIN_TARGET_HXX -- cgit v1.1