cbp2make
Makefile generation tool for Code::Blocks IDE
|
Makefile section definition. More...
#include <makefile.h>
Public Member Functions | |
void | Clear (void) |
Resets the makefile section to the initial state. More... | |
void | Show (void) |
Prints contents of the makefile section to the standard output. More... | |
CStringList & | Header (void) |
Section header, describes makefile section contents. More... | |
std::vector< CMakefileVariable * > & | Macros (void) |
A list of macro variables in the section. More... | |
std::vector< CMakefileVariable * > & | EnvVars (void) |
A list of environment variables in the section. More... | |
CMakefileVariable & | AddMacro (const CString &Name, const CString &Value) |
Creates a new macro variable and adds it to the section. More... | |
CMakefileVariable & | AddEnvVar (const CString &Name, const CString &Value) |
Creates a new environment variable and adds it to the section. More... | |
size_t | RulesCount (void) const |
Counts makefile rules in the section. More... | |
CMakefileRule & | GetRule (const size_t Index) |
Returns makefile rule by the Index number. More... | |
CMakefileRule & | AddRule (const CString &TargetName) |
Creates a new makefile rule and adds it to the section. More... | |
CMakefileSection (void) | |
Creates makefile section. More... | |
~CMakefileSection (void) | |
Destroys makefile section. More... | |
Protected Member Functions | |
CMakefileVariable * | FindMacro (const CString &Name) |
Searches macro variables by name. More... | |
CMakefileVariable * | FindEnvVar (const CString &Name) |
Searches environment variables by name. More... | |
Private Attributes | |
CStringList | m_Header |
Section header, describes makefile section contents. More... | |
std::vector< CMakefileVariable * > | m_Macros |
A list of macro variables in the section. More... | |
std::vector< CMakefileVariable * > | m_EnvVars |
A list of environment variables in the section. More... | |
std::vector< CMakefileRule * > | m_Rules |
A list of makefile rules in the section. More... | |
CMakefileVariable | m_NullVariable |
A substitute variable, it is returned when no variable satisfies search conditions. More... | |
CMakefileRule | m_NullRule |
A substitute rule, it is returned when no rule satisfies search conditions. More... | |
Makefile section definition.
Manages makefile section data. A makefile section is a logical block of text with common structure: header, macros, environment variables, rules. A makefile may consist of one or more sections to maintain strict logical structure of the makefile text.
CMakefileSection::CMakefileSection | ( | void | ) |
Creates makefile section.
CMakefileSection::~CMakefileSection | ( | void | ) |
Destroys makefile section.
CMakefileVariable & CMakefileSection::AddEnvVar | ( | const CString & | Name, |
const CString & | Value | ||
) |
Creates a new environment variable and adds it to the section.
Name | name of an environment variable. |
Value | default value of an environment variable. |
If an environment variable with name Name already exists, a new variable will not be created.
CMakefileVariable & CMakefileSection::AddMacro | ( | const CString & | Name, |
const CString & | Value | ||
) |
Creates a new macro variable and adds it to the section.
Name | name of a macro variable. |
Value | default value of a macro variable. |
If a macro variable with name Name already exists, a new variable will not be created.
CMakefileRule & CMakefileSection::AddRule | ( | const CString & | TargetName | ) |
Creates a new makefile rule and adds it to the section.
TargetName | name of makefile target for the rule. |
If a makefile rule with target name TargetName already exists, a new rule will not be created.
void CMakefileSection::Clear | ( | void | ) |
Resets the makefile section to the initial state.
std::vector< CMakefileVariable * > & CMakefileSection::EnvVars | ( | void | ) |
A list of environment variables in the section.
|
protected |
Searches environment variables by name.
Name | an environment variable name. |
|
protected |
Searches macro variables by name.
Name | a macro variable name. |
CMakefileRule & CMakefileSection::GetRule | ( | const size_t | Index | ) |
Returns makefile rule by the Index number.
Index | number of a rule. |
CStringList & CMakefileSection::Header | ( | void | ) |
Section header, describes makefile section contents.
std::vector< CMakefileVariable * > & CMakefileSection::Macros | ( | void | ) |
A list of macro variables in the section.
size_t CMakefileSection::RulesCount | ( | void | ) | const |
Counts makefile rules in the section.
void CMakefileSection::Show | ( | void | ) |
Prints contents of the makefile section to the standard output.
|
private |
A list of environment variables in the section.
Enviroment variable definitions follow macro variables and precide rules.
|
private |
Section header, describes makefile section contents.
Contains lines of text that precide other parts of the section.
|
private |
A list of macro variables in the section.
Macro variable definitions follow the section header and precide enviroment variables.
|
private |
A substitute rule, it is returned when no rule satisfies search conditions.
|
private |
A substitute variable, it is returned when no variable satisfies search conditions.
|
private |
A list of makefile rules in the section.
Rule definitions follow environment variables and finish the section.