From 2f837bf69e869dd7208948d5b16dcbb1f3925261 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Sat, 8 Jan 2005 05:22:02 +0000 Subject: [PATCH] don't allow duplicate module names svn path=/branches/xmlbuildsystem/; revision=12881 --- reactos/tools/rbuild/project.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/tools/rbuild/project.cpp b/reactos/tools/rbuild/project.cpp index ec5a6929da5..c46c25f044e 100644 --- a/reactos/tools/rbuild/project.cpp +++ b/reactos/tools/rbuild/project.cpp @@ -77,7 +77,14 @@ Project::ProcessXMLSubElement ( const XMLElement& e, const string& path ) string subpath(path); if ( e.name == "module" ) { - modules.push_back ( new Module ( *this, e, path ) ); + Module* module = new Module ( *this, e, path ); + if ( LocateModule ( module->name ) ) + throw InvalidBuildFileException ( + node->location, + "module name conflict: '%s' (originally defined at %s)", + module->name.c_str(), + module->node.location.c_str() ); + modules.push_back ( module ); return; // defer processing until later } else if ( e.name == "directory" )