|
Parallel Make
1.0
My implementation of make utility, which can run in multiple threads according to user request.
|
Base class representing how make processes targets. More...
#include <pmake.hpp>
Public Types | |
| using | thread_type = my_thread< process_states(pmake *, makefile_record &)> |
| using | pmake_variables = std::unordered_map< std::string, std::string > |
Public Member Functions | |
| pmake () | |
| Default empty constructor. More... | |
| pmake (pmake &&)=default | |
| Defaulted move constructor. More... | |
| pmake & | operator= (pmake &&other) |
| Defaulted move assignment. More... | |
| pmake (const pmake &)=delete | |
| Deleted copy constructor. More... | |
| pmake & | operator= (const pmake &)=delete |
| Deleted copy assignment. More... | |
| pmake (const std::vector< std::string > &makefile, pmake_options &&options, std::string &&exe_name) | |
| Constructor, allowing partialy parsed makefile, command line options, and exe_name to be passed. More... | |
| void | add_variable (const std::string &name, const std::string &value) |
| bool | is_variable (const std::string &name) const |
| const std::string & | get_variable (const std::string &name) const |
| void | add_record (std::vector< std::string > &&targets, std::vector< std::string > &&dependencies, const pmake_options &options) |
| const std::string & | get_exe_name () const |
| int | run () |
| Starts processing targets. More... | |
Static Public Attributes | |
| static const std::regex | var_def |
| Regex matching variable definition. More... | |
| static const std::regex | var_use |
| Regex matching variable use. More... | |
| static const std::regex | target_def |
| Regex matching rule definition. More... | |
| static const std::regex | command_def |
| Regex matching command definition. More... | |
| static const std::regex | item_def |
| Regex matching single item in rule. More... | |
Base class representing how make processes targets.
!
| using pmake::pmake_variables = std::unordered_map<std::string, std::string> |
| using pmake::thread_type = my_thread<process_states(pmake*, makefile_record&)> |
|
inline |
Default empty constructor.
|
default |
Defaulted move constructor.
|
delete |
Deleted copy constructor.
| pmake::pmake | ( | const std::vector< std::string > & | makefile, |
| pmake_options && | options, | ||
| std::string && | exe_name | ||
| ) |
Constructor, allowing partialy parsed makefile, command line options, and exe_name to be passed.
|
inline |
Constructs new record at the end of pmake::m_records.
| targets | std::vector of names of targets. |
| dependencies | std::vector of names of dependencies. |
| options | const reference to pmake_options. |
|
inline |
Adds new variable. If value represented by key already is in list, it's value is redefined.
| name | name of the variable. |
| value | value of the variable. |
|
inline |
Gets executable name for POSIX like output.
|
inline |
Gets value of variable by name.
| name | name of the variable. |
|
inline |
Checks whether given variable is in list.
| name | variable to be found. |
| int pmake::run | ( | ) |
Starts processing targets.
|
static |
Regex matching command definition.
|
static |
Regex matching single item in rule.
|
static |
Regex matching rule definition.
|
static |
Regex matching variable definition.
|
static |
Regex matching variable use.