|
Parallel Make
1.0
My implementation of make utility, which can run in multiple threads according to user request.
|
Class for storing single records in Makefile. Record in makefile has following syntax: target [...] : [dependency] [...] [command] [...] Where commands line have to start with at least one white space character. More...
#include <makefile_record.hpp>
Public Types | |
| using | dependencies = std::vector< file > |
| using | targets = std::vector< file > |
Public Member Functions | |
| makefile_record (std::vector< std::string > &&targets, std::vector< std::string > &&dependencies, const pmake_options &options) | |
| bool | is_recent (const file &tar) const |
| const file & | get_target () const |
| const dependencies & | get_dependencies () const |
| bool | has_target (const file &tar) const |
| dependencies | get_dependencies_stripped () const |
| dependencies | get_dependencies_recent () const |
| int | execute (bool only_print=false) |
| bool | is_built () const |
| void | add_command (std::string &&command) |
| void | set_being_processed () |
| Sets inner process state to being processed. More... | |
| bool | is_being_processed () |
| void | set_process_state (process_states state) |
| process_states | get_process_state () |
Class for storing single records in Makefile. Record in makefile has following syntax: target [...] : [dependency] [...] [command] [...] Where commands line have to start with at least one white space character.
!
| using makefile_record::dependencies = std::vector<file> |
| using makefile_record::targets = std::vector<file> |
| makefile_record::makefile_record | ( | std::vector< std::string > && | targets, |
| std::vector< std::string > && | dependencies, | ||
| const pmake_options & | options | ||
| ) |
Constructs makefile record with given arguments.
| targets | std::vector of targets. |
| dependencies | std::vector of dependencies. |
| options | Const reference to options. |
|
inline |
Appends new command for this makefile_record.
| command | command to be added. |
| int makefile_record::execute | ( | bool | only_print = false | ) |
Executes commands for this makefile_record.
| only_print | if true, commands are only outputted to stdout. |
|
inline |
Gets dependencies of this makefile_record.
| makefile_record::dependencies makefile_record::get_dependencies_recent | ( | ) | const |
Returns new std::vector of dependencies more recent than default target.
| makefile_record::dependencies makefile_record::get_dependencies_stripped | ( | ) | const |
Returns new std::vector of dependencies without duplicities.
|
inline |
Gets current process state.
|
inline |
Gets default target of this makefile_record.
|
inline |
Checks, whether argument is member of targets of this makefile_record.
| tar | target to look for. |
|
inline |
Checks, whether this record is currently being processed.
|
inline |
Checks whether commands for this makefile_record has already been executed.
| bool makefile_record::is_recent | ( | const file & | tar | ) | const |
Checks, whether all dependencies are more recent than file argument.
| tar | to check against. |
|
inline |
Sets inner process state to being processed.
|
inline |
Manually sets current process state.
| state | process_states to set to. |