diff --git a/reactos/hal/hal/hal.xml b/reactos/hal/hal/hal.xml
index 8d50c3015d6..c91e428fded 100644
--- a/reactos/hal/hal/hal.xml
+++ b/reactos/hal/hal/hal.xml
@@ -7,3 +7,9 @@
hal.c
hal.rc
+
+
+
+
+
+
diff --git a/reactos/hal/halx86/mp/halmp.xml b/reactos/hal/halx86/mp/halmp.xml
index b22c31caf37..660cb138879 100644
--- a/reactos/hal/halx86/mp/halmp.xml
+++ b/reactos/hal/halx86/mp/halmp.xml
@@ -1,5 +1,6 @@
-
+
+
../include
include
diff --git a/reactos/hal/halx86/up/halup.xml b/reactos/hal/halx86/up/halup.xml
index 92c405a925c..eb550f562e1 100644
--- a/reactos/hal/halx86/up/halup.xml
+++ b/reactos/hal/halx86/up/halup.xml
@@ -1,4 +1,4 @@
-
+
../include
diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp
index 29c017a475a..9ea313783ee 100644
--- a/reactos/tools/rbuild/backend/mingw/mingw.cpp
+++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp
@@ -566,6 +566,8 @@ MingwBackend::IncludeInAllTarget ( const Module& module ) const
return false;
if ( module.type == Test )
return false;
+ if ( module.type == Alias )
+ return false;
return true;
}
@@ -977,6 +979,19 @@ MingwBackend::OutputNonModuleInstallTargets ()
}
}
+const Module&
+MingwBackend::GetAliasedModuleOrModule ( const Module& module ) const
+{
+ if ( module.aliasedModuleName.size () > 0 )
+ {
+ const Module* aliasedModule = ProjectNode.LocateModule ( module.aliasedModuleName );
+ assert ( aliasedModule );
+ return *aliasedModule;
+ }
+ else
+ return module;
+}
+
void
MingwBackend::OutputModuleInstallTargets ()
{
@@ -987,8 +1002,9 @@ MingwBackend::OutputModuleInstallTargets ()
continue;
if ( module.installName.length () > 0 )
{
+ const Module& aliasedModule = GetAliasedModuleOrModule ( module );
string sourceFilename = MingwModuleHandler::PassThruCacheDirectory (
- NormalizeFilename ( module.GetPath () ),
+ NormalizeFilename ( aliasedModule.GetPath () ),
outputDirectory );
OutputInstallTarget ( sourceFilename,
module.installName,
diff --git a/reactos/tools/rbuild/backend/mingw/mingw.h b/reactos/tools/rbuild/backend/mingw/mingw.h
index 88f18853ef6..532eed07f2a 100644
--- a/reactos/tools/rbuild/backend/mingw/mingw.h
+++ b/reactos/tools/rbuild/backend/mingw/mingw.h
@@ -68,6 +68,7 @@ public:
virtual void Process ();
std::string AddDirectoryTarget ( const std::string& directory,
Directory* directoryTree );
+ const Module& GetAliasedModuleOrModule ( const Module& module ) const;
std::string compilerPrefix;
std::string compilerCommand;
std::string nasmCommand;
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
index 96d249a6fc5..7005356d0f9 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -237,6 +237,9 @@ MingwModuleHandler::InstanciateHandler (
case RpcClient:
handler = new MingwRpcClientModuleHandler ( module );
break;
+ case Alias:
+ handler = new MingwAliasModuleHandler ( module );
+ break;
default:
throw UnknownModuleTypeException (
module.node.location,
@@ -2877,12 +2880,13 @@ MingwLiveIsoModuleHandler::OutputModuleCopyCommands ( string& livecdDirectory,
continue;
if ( m.installName.length () > 0 )
{
+ const Module& aliasedModule = backend->GetAliasedModuleOrModule ( m );
string sourceFilename = MingwModuleHandler::PassThruCacheDirectory (
- NormalizeFilename ( m.GetPath () ),
+ NormalizeFilename ( aliasedModule.GetPath () ),
backend->outputDirectory );
OutputCopyCommand ( sourceFilename,
- m.installName,
- livecdDirectory + SSEP + reactosDirectory + SSEP + m.installBase );
+ m.installName,
+ livecdDirectory + SSEP + reactosDirectory + SSEP + m.installBase );
}
}
}
@@ -3057,6 +3061,7 @@ MingwRpcServerModuleHandler::Process ()
GenerateRules ();
}
+
MingwRpcClientModuleHandler::MingwRpcClientModuleHandler (
const Module& module_ )
@@ -3069,3 +3074,16 @@ MingwRpcClientModuleHandler::Process ()
{
GenerateRules ();
}
+
+
+MingwAliasModuleHandler::MingwAliasModuleHandler (
+ const Module& module_ )
+
+ : MingwModuleHandler ( module_ )
+{
+}
+
+void
+MingwAliasModuleHandler::Process ()
+{
+}
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h
index 1f02cb3bd62..496ebaf5e6f 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.h
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h
@@ -442,4 +442,12 @@ public:
virtual void Process ();
};
+class MingwAliasModuleHandler : public MingwModuleHandler
+{
+public:
+ MingwAliasModuleHandler ( const Module& module );
+ virtual HostType DefaultHost() { return HostFalse; }
+ virtual void Process ();
+};
+
#endif /* MINGW_MODULEHANDLER_H */
diff --git a/reactos/tools/rbuild/bootstrap.cpp b/reactos/tools/rbuild/bootstrap.cpp
index 2eec6fd7d60..dddb965025c 100644
--- a/reactos/tools/rbuild/bootstrap.cpp
+++ b/reactos/tools/rbuild/bootstrap.cpp
@@ -23,8 +23,8 @@
using std::string;
Bootstrap::Bootstrap ( const Project& project_,
- const Module* module_,
- const XMLElement& bootstrapNode )
+ const Module* module_,
+ const XMLElement& bootstrapNode )
: project(project_),
module(module_),
node(bootstrapNode)
@@ -60,6 +60,7 @@ Bootstrap::IsSupportedModuleType ( ModuleType type )
case Test:
case RpcServer:
case RpcClient:
+ case Alias:
return false;
}
throw InvalidOperationException ( __FILE__,
diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp
index ba75a1e234c..c2a3236737f 100644
--- a/reactos/tools/rbuild/module.cpp
+++ b/reactos/tools/rbuild/module.cpp
@@ -282,6 +282,12 @@ Module::Module ( const Project& project,
enableWarnings = att->value == "true";
else
enableWarnings = false;
+
+ att = moduleNode.GetAttribute ( "aliasof", false );
+ if ( type == Alias && att != NULL )
+ aliasedModuleName = att->value;
+ else
+ aliasedModuleName = "";
}
Module::~Module ()
@@ -304,6 +310,22 @@ Module::~Module ()
void
Module::ProcessXML()
{
+ if ( type == Alias )
+ {
+ if ( aliasedModuleName == name )
+ throw InvalidBuildFileException (
+ node.location,
+ "module '%s' cannot link against itself",
+ name.c_str() );
+ const Module* m = project.LocateModule ( aliasedModuleName );
+ if ( !m )
+ throw InvalidBuildFileException (
+ node.location,
+ "module '%s' trying to alias non-existant module '%s'",
+ name.c_str(),
+ aliasedModuleName.c_str() );
+ }
+
size_t i;
for ( i = 0; i < node.subElements.size(); i++ )
ProcessXMLSubElement ( *node.subElements[i], path );
@@ -543,6 +565,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
return RpcServer;
if ( attribute.value == "rpcclient" )
return RpcClient;
+ if ( attribute.value == "alias" )
+ return Alias;
throw InvalidAttributeValueException ( location,
attribute.name,
attribute.value );
@@ -582,6 +606,8 @@ Module::GetDefaultModuleExtension () const
return ".o";
case RpcClient:
return ".o";
+ case Alias:
+ return "";
}
throw InvalidOperationException ( __FILE__,
__LINE__ );
@@ -618,6 +644,7 @@ Module::GetDefaultModuleEntrypoint () const
case LiveIso:
case RpcServer:
case RpcClient:
+ case Alias:
return "";
}
throw InvalidOperationException ( __FILE__,
@@ -652,6 +679,7 @@ Module::GetDefaultModuleBaseaddress () const
case LiveIso:
case RpcServer:
case RpcClient:
+ case Alias:
return "";
}
throw InvalidOperationException ( __FILE__,
@@ -688,6 +716,7 @@ Module::IsDLL () const
case LiveIso:
case RpcServer:
case RpcClient:
+ case Alias:
return false;
}
throw InvalidOperationException ( __FILE__,
@@ -718,6 +747,7 @@ Module::GenerateInOutputTree () const
case ObjectLibrary:
case RpcServer:
case RpcClient:
+ case Alias:
return false;
}
throw InvalidOperationException ( __FILE__,
diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h
index d6261ed0ab8..366c83e2d0f 100644
--- a/reactos/tools/rbuild/rbuild.h
+++ b/reactos/tools/rbuild/rbuild.h
@@ -193,7 +193,8 @@ enum ModuleType
LiveIso = 14,
Test = 15,
RpcServer = 16,
- RpcClient = 17
+ RpcClient = 17,
+ Alias = 18
};
enum HostType
@@ -230,6 +231,7 @@ public:
HostType host;
std::string installBase;
std::string installName;
+ std::string aliasedModuleName;
bool useWRC;
bool enableWarnings;
bool enabled;
@@ -737,6 +739,7 @@ private:
std::string StripSymbol ( std::string symbol );
};
+
extern std::string
FixSeparator ( const std::string& s );
diff --git a/reactos/tools/rbuild/rbuild.txt b/reactos/tools/rbuild/rbuild.txt
index 4c9fe23b369..32dd7dc5a82 100644
--- a/reactos/tools/rbuild/rbuild.txt
+++ b/reactos/tools/rbuild/rbuild.txt
@@ -107,7 +107,7 @@ Module element
There can be zero or more modules per xml build file.
Syntax:
-
+
...
@@ -124,7 +124,7 @@ Attributes:
installname - Name of generated file in the installation directory. This attribute is optional, but if not specified, the generated file is not copied to the installation directory.
usewrc - Use WRC to compile resources if true. If false, windres is used. This attribute is optional. If not specified, WRC will be used.
warnings - Error out if false and at least one warning is emitted during building of this module. This attribute is optional. If not specified, it is assumed to be false.
-
+ aliasof - Name of module that is aliased.
Value:
None.
@@ -151,6 +151,7 @@ The module type determines the actions that is to be carried out to process the
test - Builds a testsuite. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type.
rpcserver - Generates and builds server code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
rpcclient - Generates and builds client code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
+ alias - Module is an alias for another module. This module type is the only module type for which the aliasof attribute is applicable. Only the module install functionality is aliased.
Bootstrap element