mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 18:32:07 +00:00
Implement <ifnot>
svn path=/trunk/; revision=15934
This commit is contained in:
parent
2cc8819bc6
commit
8f5dd38cdd
4 changed files with 30 additions and 5 deletions
|
@ -731,7 +731,8 @@ MingwModuleHandler::GenerateMacros (
|
|||
{
|
||||
fprintf (
|
||||
fMakefile,
|
||||
"ifeq (\"$(%s)\",\"%s\")\n",
|
||||
"%s (\"$(%s)\",\"%s\")\n",
|
||||
rIf.negated ? "ifneq" : "ifeq",
|
||||
rIf.property.c_str(),
|
||||
rIf.value.c_str() );
|
||||
GenerateMacros (
|
||||
|
@ -815,7 +816,8 @@ MingwModuleHandler::GenerateObjectMacros (
|
|||
{
|
||||
fprintf (
|
||||
fMakefile,
|
||||
"ifeq (\"$(%s)\",\"%s\")\n",
|
||||
"%s (\"$(%s)\",\"%s\")\n",
|
||||
rIf.negated ? "ifneq" : "ifeq",
|
||||
rIf.property.c_str(),
|
||||
rIf.value.c_str() );
|
||||
GenerateObjectMacros (
|
||||
|
|
|
@ -424,6 +424,16 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
|
|||
non_if_data.ifs.push_back ( pIf );
|
||||
subs_invalid = false;
|
||||
}
|
||||
else if ( e.name == "ifnot" )
|
||||
{
|
||||
If* pOldIf = pIf;
|
||||
pIf = new If ( e, project, this, true );
|
||||
if ( pOldIf )
|
||||
pOldIf->data.ifs.push_back ( pIf );
|
||||
else
|
||||
non_if_data.ifs.push_back ( pIf );
|
||||
subs_invalid = false;
|
||||
}
|
||||
else if ( e.name == "compilerflag" )
|
||||
{
|
||||
CompilerFlag* pCompilerFlag = new CompilerFlag ( project, this, e );
|
||||
|
@ -1014,8 +1024,9 @@ ImportLibrary::ImportLibrary ( const XMLElement& _node,
|
|||
|
||||
If::If ( const XMLElement& node_,
|
||||
const Project& project_,
|
||||
const Module* module_ )
|
||||
: node(node_), project(project_), module(module_)
|
||||
const Module* module_,
|
||||
const bool negated_ )
|
||||
: node(node_), project(project_), module(module_), negated(negated_)
|
||||
{
|
||||
const XMLAttribute* att;
|
||||
|
||||
|
|
|
@ -330,6 +330,16 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
|
|||
non_if_data.ifs.push_back ( pIf );
|
||||
subs_invalid = false;
|
||||
}
|
||||
else if ( e.name == "ifnot" )
|
||||
{
|
||||
If* pOldIf = pIf;
|
||||
pIf = new If ( e, *this, NULL, true );
|
||||
if ( pOldIf )
|
||||
pOldIf->data.ifs.push_back ( pIf );
|
||||
else
|
||||
non_if_data.ifs.push_back ( pIf );
|
||||
subs_invalid = false;
|
||||
}
|
||||
else if ( e.name == "property" )
|
||||
{
|
||||
Property* property = new Property ( e, *this, NULL );
|
||||
|
|
|
@ -395,12 +395,14 @@ public:
|
|||
const XMLElement& node;
|
||||
const Project& project;
|
||||
const Module* module;
|
||||
const bool negated;
|
||||
std::string property, value;
|
||||
IfableData data;
|
||||
|
||||
If ( const XMLElement& node_,
|
||||
const Project& project_,
|
||||
const Module* module_ );
|
||||
const Module* module_,
|
||||
const bool negated_ = false );
|
||||
~If();
|
||||
|
||||
void ProcessXML();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue