[ros-diffs] [hpoussin] 15934: Implement <ifnot>

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Thu Jun 16 22:37:57 CEST 2005


Implement <ifnot>
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: trunk/reactos/tools/rbuild/module.cpp
Modified: trunk/reactos/tools/rbuild/project.cpp
Modified: trunk/reactos/tools/rbuild/rbuild.h
  _____  

Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
2005-06-16 09:25:51 UTC (rev 15933)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
2005-06-16 20:37:50 UTC (rev 15934)
@@ -731,7 +731,8 @@

 		{
 			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 @@
 		{
 			fprintf (
 				fMakefile,
-				"ifeq (\"$(%s)\",\"%s\")\n",
+				"%s (\"$(%s)\",\"%s\")\n",
+				rIf.negated ? "ifneq" : "ifeq",
 				rIf.property.c_str(),
 				rIf.value.c_str() );
 			GenerateObjectMacros (
  _____  

Modified: trunk/reactos/tools/rbuild/module.cpp
--- trunk/reactos/tools/rbuild/module.cpp	2005-06-16 09:25:51 UTC
(rev 15933)
+++ trunk/reactos/tools/rbuild/module.cpp	2005-06-16 20:37:50 UTC
(rev 15934)
@@ -424,6 +424,16 @@

 			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 @@
 
 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;
 
  _____  

Modified: trunk/reactos/tools/rbuild/project.cpp
--- trunk/reactos/tools/rbuild/project.cpp	2005-06-16 09:25:51 UTC
(rev 15933)
+++ trunk/reactos/tools/rbuild/project.cpp	2005-06-16 20:37:50 UTC
(rev 15934)
@@ -330,6 +330,16 @@

 			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 );
  _____  

Modified: trunk/reactos/tools/rbuild/rbuild.h
--- trunk/reactos/tools/rbuild/rbuild.h	2005-06-16 09:25:51 UTC (rev
15933)
+++ trunk/reactos/tools/rbuild/rbuild.h	2005-06-16 20:37:50 UTC (rev
15934)
@@ -395,12 +395,14 @@

 	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();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050616/70fb5a4e/attachment.html


More information about the Ros-diffs mailing list