mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 08:14:16 +00:00
Generate RPC interface headers in intermediate directory
svn path=/trunk/; revision=16647
This commit is contained in:
parent
b44c46dccd
commit
4a454cb7d6
6 changed files with 50 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
||||||
<module name="advapi32" type="win32dll" baseaddress="${BASEADDRESS_ADVAPI32}" installbase="system32" installname="advapi32.dll">
|
<module name="advapi32" type="win32dll" baseaddress="${BASEADDRESS_ADVAPI32}" installbase="system32" installname="advapi32.dll">
|
||||||
<importlibrary definition="advapi32.def" />
|
<importlibrary definition="advapi32.def" />
|
||||||
<include base="advapi32">.</include>
|
<include base="advapi32">.</include>
|
||||||
<include base="ReactOS">include/idl</include>
|
<include base="scm_client">.</include>
|
||||||
<define name="__USE_W32API" />
|
<define name="__USE_W32API" />
|
||||||
<define name="WINVER">0x600</define>
|
<define name="WINVER">0x600</define>
|
||||||
<define name="_WIN32_IE">0x0500</define>
|
<define name="_WIN32_IE">0x0500</define>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<module name="services" type="win32cui" installbase="system32" installname="services.exe">
|
<module name="services" type="win32cui" installbase="system32" installname="services.exe">
|
||||||
<include base="services">.</include>
|
<include base="services">.</include>
|
||||||
<include base="ReactOS">include/idl</include>
|
<include base="scm_server">.</include>
|
||||||
<define name="__USE_W32API" />
|
<define name="__USE_W32API" />
|
||||||
<define name="UNICODE" />
|
<define name="UNICODE" />
|
||||||
<define name="_UNICODE" />
|
<define name="_UNICODE" />
|
||||||
|
|
|
@ -287,6 +287,20 @@ MingwModuleHandler::GetActualSourceFilename (
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string
|
||||||
|
MingwModuleHandler::GetExtraDependencies (
|
||||||
|
const string& filename ) const
|
||||||
|
{
|
||||||
|
string extension = GetExtension ( filename );
|
||||||
|
if ( extension == ".idl" || extension == ".IDL" )
|
||||||
|
{
|
||||||
|
string basename = GetBasename ( filename );
|
||||||
|
return GetRpcServerHeaderFilename ( basename ) + " " + GetRpcClientHeaderFilename ( basename );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
MingwModuleHandler::GetModuleArchiveFilename () const
|
MingwModuleHandler::GetModuleArchiveFilename () const
|
||||||
{
|
{
|
||||||
|
@ -701,10 +715,19 @@ MingwModuleHandler::GenerateMacro (
|
||||||
|
|
||||||
for ( i = 0; i < data.includes.size(); i++ )
|
for ( i = 0; i < data.includes.size(); i++ )
|
||||||
{
|
{
|
||||||
|
const Include& include = *data.includes[i];
|
||||||
|
string includeDirectory;
|
||||||
|
if ( include.baseModule != NULL &&
|
||||||
|
( include.baseModule->type == RpcServer ||
|
||||||
|
include.baseModule->type == RpcClient ) )
|
||||||
|
includeDirectory = PassThruCacheDirectory ( NormalizeFilename ( include.directory ),
|
||||||
|
backend->intermediateDirectory );
|
||||||
|
else
|
||||||
|
includeDirectory = include.directory;
|
||||||
fprintf (
|
fprintf (
|
||||||
fMakefile,
|
fMakefile,
|
||||||
" -I%s",
|
" -I%s",
|
||||||
data.includes[i]->directory.c_str() );
|
includeDirectory.c_str() );
|
||||||
}
|
}
|
||||||
for ( i = 0; i < data.defines.size(); i++ )
|
for ( i = 0; i < data.defines.size(); i++ )
|
||||||
{
|
{
|
||||||
|
@ -905,10 +928,13 @@ MingwModuleHandler::GetPrecompiledHeaderFilename () const
|
||||||
void
|
void
|
||||||
MingwModuleHandler::GenerateGccCommand (
|
MingwModuleHandler::GenerateGccCommand (
|
||||||
const string& sourceFilename,
|
const string& sourceFilename,
|
||||||
|
const string& extraDependencies,
|
||||||
const string& cc,
|
const string& cc,
|
||||||
const string& cflagsMacro )
|
const string& cflagsMacro )
|
||||||
{
|
{
|
||||||
string dependencies = sourceFilename;
|
string dependencies = sourceFilename;
|
||||||
|
if ( extraDependencies != "" )
|
||||||
|
dependencies += " " + extraDependencies;
|
||||||
if ( module.pch && use_pch )
|
if ( module.pch && use_pch )
|
||||||
dependencies += " " + GetPrecompiledHeaderFilename ();
|
dependencies += " " + GetPrecompiledHeaderFilename ();
|
||||||
|
|
||||||
|
@ -1079,7 +1105,8 @@ MingwModuleHandler::GetWidlFlags ( const File& file )
|
||||||
string
|
string
|
||||||
MingwModuleHandler::GetRpcServerHeaderFilename ( string basename ) const
|
MingwModuleHandler::GetRpcServerHeaderFilename ( string basename ) const
|
||||||
{
|
{
|
||||||
return basename + "_s.h";
|
return PassThruCacheDirectory ( basename + "_s.h",
|
||||||
|
backend->intermediateDirectory );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1092,11 +1119,6 @@ MingwModuleHandler::GenerateWidlCommandsServer (
|
||||||
|
|
||||||
string basename = GetBasename ( file.name );
|
string basename = GetBasename ( file.name );
|
||||||
|
|
||||||
/*string generatedHeaderFilename = PassThruCacheDirectory (
|
|
||||||
basename + ".h",
|
|
||||||
backend->intermediateDirectory );
|
|
||||||
CLEAN_FILE(generatedHeaderFilename);
|
|
||||||
*/
|
|
||||||
string generatedHeaderFilename = GetRpcServerHeaderFilename ( basename );
|
string generatedHeaderFilename = GetRpcServerHeaderFilename ( basename );
|
||||||
CLEAN_FILE(generatedHeaderFilename);
|
CLEAN_FILE(generatedHeaderFilename);
|
||||||
|
|
||||||
|
@ -1125,7 +1147,8 @@ MingwModuleHandler::GenerateWidlCommandsServer (
|
||||||
string
|
string
|
||||||
MingwModuleHandler::GetRpcClientHeaderFilename ( string basename ) const
|
MingwModuleHandler::GetRpcClientHeaderFilename ( string basename ) const
|
||||||
{
|
{
|
||||||
return basename + "_c.h";
|
return PassThruCacheDirectory ( basename + "_c.h",
|
||||||
|
backend->intermediateDirectory );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1138,11 +1161,6 @@ MingwModuleHandler::GenerateWidlCommandsClient (
|
||||||
|
|
||||||
string basename = GetBasename ( file.name );
|
string basename = GetBasename ( file.name );
|
||||||
|
|
||||||
/*string generatedHeaderFilename = PassThruCacheDirectory (
|
|
||||||
basename + ".h",
|
|
||||||
backend->intermediateDirectory );
|
|
||||||
CLEAN_FILE(generatedHeaderFilename);
|
|
||||||
*/
|
|
||||||
string generatedHeaderFilename = GetRpcClientHeaderFilename ( basename );
|
string generatedHeaderFilename = GetRpcClientHeaderFilename ( basename );
|
||||||
CLEAN_FILE(generatedHeaderFilename);
|
CLEAN_FILE(generatedHeaderFilename);
|
||||||
|
|
||||||
|
@ -1195,6 +1213,7 @@ MingwModuleHandler::GenerateCommands (
|
||||||
if ( extension == ".c" || extension == ".C" )
|
if ( extension == ".c" || extension == ".C" )
|
||||||
{
|
{
|
||||||
GenerateGccCommand ( file.name,
|
GenerateGccCommand ( file.name,
|
||||||
|
"",
|
||||||
cc,
|
cc,
|
||||||
cflagsMacro );
|
cflagsMacro );
|
||||||
return;
|
return;
|
||||||
|
@ -1204,6 +1223,7 @@ MingwModuleHandler::GenerateCommands (
|
||||||
extension == ".cxx" || extension == ".CXX" )
|
extension == ".cxx" || extension == ".CXX" )
|
||||||
{
|
{
|
||||||
GenerateGccCommand ( file.name,
|
GenerateGccCommand ( file.name,
|
||||||
|
"",
|
||||||
cppc,
|
cppc,
|
||||||
cflagsMacro );
|
cflagsMacro );
|
||||||
return;
|
return;
|
||||||
|
@ -1231,6 +1251,7 @@ MingwModuleHandler::GenerateCommands (
|
||||||
{
|
{
|
||||||
GenerateWinebuildCommands ( file.name );
|
GenerateWinebuildCommands ( file.name );
|
||||||
GenerateGccCommand ( GetActualSourceFilename ( file.name ),
|
GenerateGccCommand ( GetActualSourceFilename ( file.name ),
|
||||||
|
"",
|
||||||
cc,
|
cc,
|
||||||
cflagsMacro );
|
cflagsMacro );
|
||||||
return;
|
return;
|
||||||
|
@ -1240,6 +1261,7 @@ MingwModuleHandler::GenerateCommands (
|
||||||
GenerateWidlCommands ( file,
|
GenerateWidlCommands ( file,
|
||||||
widlflagsMacro );
|
widlflagsMacro );
|
||||||
GenerateGccCommand ( GetActualSourceFilename ( file.name ),
|
GenerateGccCommand ( GetActualSourceFilename ( file.name ),
|
||||||
|
GetExtraDependencies ( file.name ),
|
||||||
cc,
|
cc,
|
||||||
cflagsMacro );
|
cflagsMacro );
|
||||||
return;
|
return;
|
||||||
|
@ -1647,7 +1669,6 @@ MingwModuleHandler::GetRpcHeaderDependencies (
|
||||||
if ( library.importedModule->type == RpcServer ||
|
if ( library.importedModule->type == RpcServer ||
|
||||||
library.importedModule->type == RpcClient )
|
library.importedModule->type == RpcClient )
|
||||||
{
|
{
|
||||||
|
|
||||||
for ( size_t j = 0; j < library.importedModule->non_if_data.files.size (); j++ )
|
for ( size_t j = 0; j < library.importedModule->non_if_data.files.size (); j++ )
|
||||||
{
|
{
|
||||||
File& file = *library.importedModule->non_if_data.files[j];
|
File& file = *library.importedModule->non_if_data.files[j];
|
||||||
|
@ -2026,10 +2047,11 @@ MingwModuleHandler::GetWidlObjectDependencies (
|
||||||
const string& filename ) const
|
const string& filename ) const
|
||||||
{
|
{
|
||||||
string basename = GetBasename ( filename );
|
string basename = GetBasename ( filename );
|
||||||
string serverDependency = PassThruCacheDirectory (
|
string serverSourceDependency = PassThruCacheDirectory (
|
||||||
NormalizeFilename ( basename + "_s.c" ),
|
NormalizeFilename ( basename + "_s.c" ),
|
||||||
backend->intermediateDirectory );
|
backend->intermediateDirectory );
|
||||||
dependencies.push_back ( serverDependency );
|
dependencies.push_back ( serverSourceDependency );
|
||||||
|
dependencies.push_back ( GetRpcServerHeaderFilename ( basename ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -85,6 +85,7 @@ protected:
|
||||||
std::string GetWorkingDirectory () const;
|
std::string GetWorkingDirectory () const;
|
||||||
std::string GetBasename ( const std::string& filename ) const;
|
std::string GetBasename ( const std::string& filename ) const;
|
||||||
std::string GetActualSourceFilename ( const std::string& filename ) const;
|
std::string GetActualSourceFilename ( const std::string& filename ) const;
|
||||||
|
std::string GetExtraDependencies ( const std::string& filename ) const;
|
||||||
std::string GetModuleArchiveFilename () const;
|
std::string GetModuleArchiveFilename () const;
|
||||||
bool IsGeneratedFile ( const File& file ) const;
|
bool IsGeneratedFile ( const File& file ) const;
|
||||||
std::string GetImportLibraryDependency ( const Module& importedModule );
|
std::string GetImportLibraryDependency ( const Module& importedModule );
|
||||||
|
@ -143,6 +144,7 @@ private:
|
||||||
std::string GenerateNasmParameters () const;
|
std::string GenerateNasmParameters () const;
|
||||||
std::string MingwModuleHandler::GetPrecompiledHeaderFilename () const;
|
std::string MingwModuleHandler::GetPrecompiledHeaderFilename () const;
|
||||||
void GenerateGccCommand ( const std::string& sourceFilename,
|
void GenerateGccCommand ( const std::string& sourceFilename,
|
||||||
|
const std::string& extraDependencies,
|
||||||
const std::string& cc,
|
const std::string& cc,
|
||||||
const std::string& cflagsMacro );
|
const std::string& cflagsMacro );
|
||||||
void GenerateGccAssemblerCommand ( const std::string& sourceFilename,
|
void GenerateGccAssemblerCommand ( const std::string& sourceFilename,
|
||||||
|
|
|
@ -27,7 +27,8 @@ Include::Include ( const Project& project,
|
||||||
const XMLElement* includeNode )
|
const XMLElement* includeNode )
|
||||||
: project ( project ),
|
: project ( project ),
|
||||||
module ( NULL ),
|
module ( NULL ),
|
||||||
node ( includeNode )
|
node ( includeNode ),
|
||||||
|
baseModule ( NULL )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +37,8 @@ Include::Include ( const Project& project,
|
||||||
const XMLElement* includeNode )
|
const XMLElement* includeNode )
|
||||||
: project ( project ),
|
: project ( project ),
|
||||||
module ( module ),
|
module ( module ),
|
||||||
node ( includeNode )
|
node ( includeNode ),
|
||||||
|
baseModule ( NULL )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +47,8 @@ Include::Include ( const Project& project,
|
||||||
string basePath )
|
string basePath )
|
||||||
: project ( project ),
|
: project ( project ),
|
||||||
module ( NULL ),
|
module ( NULL ),
|
||||||
node ( NULL )
|
node ( NULL ),
|
||||||
|
baseModule ( NULL )
|
||||||
{
|
{
|
||||||
this->directory = NormalizeFilename ( basePath + SSEP + directory );
|
this->directory = NormalizeFilename ( basePath + SSEP + directory );
|
||||||
this->basePath = NormalizeFilename ( basePath );
|
this->basePath = NormalizeFilename ( basePath );
|
||||||
|
@ -78,6 +81,7 @@ Include::ProcessXML()
|
||||||
const Module* base = project.LocateModule ( att->value );
|
const Module* base = project.LocateModule ( att->value );
|
||||||
if ( base != NULL )
|
if ( base != NULL )
|
||||||
{
|
{
|
||||||
|
baseModule = base;
|
||||||
basePath = base->GetBasePath ();
|
basePath = base->GetBasePath ();
|
||||||
referenceResolved = true;
|
referenceResolved = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,6 +271,7 @@ public:
|
||||||
const Project& project;
|
const Project& project;
|
||||||
const Module* module;
|
const Module* module;
|
||||||
const XMLElement* node;
|
const XMLElement* node;
|
||||||
|
const Module* baseModule;
|
||||||
std::string directory;
|
std::string directory;
|
||||||
std::string basePath;
|
std::string basePath;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue