mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 02:52:13 +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 (
|
fprintf (
|
||||||
fMakefile,
|
fMakefile,
|
||||||
"ifeq (\"$(%s)\",\"%s\")\n",
|
"%s (\"$(%s)\",\"%s\")\n",
|
||||||
|
rIf.negated ? "ifneq" : "ifeq",
|
||||||
rIf.property.c_str(),
|
rIf.property.c_str(),
|
||||||
rIf.value.c_str() );
|
rIf.value.c_str() );
|
||||||
GenerateMacros (
|
GenerateMacros (
|
||||||
|
@ -815,7 +816,8 @@ MingwModuleHandler::GenerateObjectMacros (
|
||||||
{
|
{
|
||||||
fprintf (
|
fprintf (
|
||||||
fMakefile,
|
fMakefile,
|
||||||
"ifeq (\"$(%s)\",\"%s\")\n",
|
"%s (\"$(%s)\",\"%s\")\n",
|
||||||
|
rIf.negated ? "ifneq" : "ifeq",
|
||||||
rIf.property.c_str(),
|
rIf.property.c_str(),
|
||||||
rIf.value.c_str() );
|
rIf.value.c_str() );
|
||||||
GenerateObjectMacros (
|
GenerateObjectMacros (
|
||||||
|
|
|
@ -424,6 +424,16 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
|
||||||
non_if_data.ifs.push_back ( pIf );
|
non_if_data.ifs.push_back ( pIf );
|
||||||
subs_invalid = false;
|
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" )
|
else if ( e.name == "compilerflag" )
|
||||||
{
|
{
|
||||||
CompilerFlag* pCompilerFlag = new CompilerFlag ( project, this, e );
|
CompilerFlag* pCompilerFlag = new CompilerFlag ( project, this, e );
|
||||||
|
@ -1014,8 +1024,9 @@ ImportLibrary::ImportLibrary ( const XMLElement& _node,
|
||||||
|
|
||||||
If::If ( const XMLElement& node_,
|
If::If ( const XMLElement& node_,
|
||||||
const Project& project_,
|
const Project& project_,
|
||||||
const Module* module_ )
|
const Module* module_,
|
||||||
: node(node_), project(project_), module(module_)
|
const bool negated_ )
|
||||||
|
: node(node_), project(project_), module(module_), negated(negated_)
|
||||||
{
|
{
|
||||||
const XMLAttribute* att;
|
const XMLAttribute* att;
|
||||||
|
|
||||||
|
|
|
@ -330,6 +330,16 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
|
||||||
non_if_data.ifs.push_back ( pIf );
|
non_if_data.ifs.push_back ( pIf );
|
||||||
subs_invalid = false;
|
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" )
|
else if ( e.name == "property" )
|
||||||
{
|
{
|
||||||
Property* property = new Property ( e, *this, NULL );
|
Property* property = new Property ( e, *this, NULL );
|
||||||
|
|
|
@ -395,12 +395,14 @@ public:
|
||||||
const XMLElement& node;
|
const XMLElement& node;
|
||||||
const Project& project;
|
const Project& project;
|
||||||
const Module* module;
|
const Module* module;
|
||||||
|
const bool negated;
|
||||||
std::string property, value;
|
std::string property, value;
|
||||||
IfableData data;
|
IfableData data;
|
||||||
|
|
||||||
If ( const XMLElement& node_,
|
If ( const XMLElement& node_,
|
||||||
const Project& project_,
|
const Project& project_,
|
||||||
const Module* module_ );
|
const Module* module_,
|
||||||
|
const bool negated_ = false );
|
||||||
~If();
|
~If();
|
||||||
|
|
||||||
void ProcessXML();
|
void ProcessXML();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue