mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 10:28:45 +00:00
Place .h files generated from .idl definitions in the intermediate directory
svn path=/trunk/; revision=27269
This commit is contained in:
parent
caa55436f4
commit
a5b5d59762
4 changed files with 46 additions and 22 deletions
|
@ -62,6 +62,7 @@
|
|||
<include>.</include>
|
||||
<include>include</include>
|
||||
<include>include/psdk</include>
|
||||
<include base="__intermediate">include/psdk</include>
|
||||
<include>include/dxsdk</include>
|
||||
<include>include/crt</include>
|
||||
<include>include/ddk</include>
|
||||
|
|
|
@ -323,6 +323,8 @@ MingwModuleHandler::GetActualSourceFilename (
|
|||
else //if ( module.type == IdlHeader )
|
||||
{
|
||||
newname = basename + ".h";
|
||||
PassThruCacheDirectory ( NormalizeFilename ( newname ),
|
||||
backend->intermediateDirectory );
|
||||
return new FileLocation ( fileLocation->directory, filename );
|
||||
}
|
||||
}
|
||||
|
@ -341,7 +343,7 @@ MingwModuleHandler::GetExtraDependencies (
|
|||
if ( (module.type == RpcServer) || (module.type == RpcClient) )
|
||||
return GetRpcServerHeaderFilename ( basename ) + " " + GetRpcClientHeaderFilename ( basename );
|
||||
else
|
||||
return GetIdlHeaderFilename ( basename );
|
||||
return GetIdlHeaderFilename ( basename );
|
||||
}
|
||||
else
|
||||
return "";
|
||||
|
@ -522,9 +524,6 @@ MingwModuleHandler::GetObjectFilename (
|
|||
else
|
||||
directoryTree = backend->intermediateDirectory;
|
||||
|
||||
if (newExtension == ".h")
|
||||
directoryTree = NULL;
|
||||
|
||||
string obj_file = PassThruCacheDirectory (
|
||||
NormalizeFilename ( ReplaceExtension (
|
||||
RemoveVariables ( sourceFilename ),
|
||||
|
@ -679,13 +678,20 @@ MingwModuleHandler::ConcatenatePaths (
|
|||
/* static */ string
|
||||
MingwModuleHandler::GenerateGccIncludeParametersFromVector ( const vector<Include*>& includes )
|
||||
{
|
||||
string parameters;
|
||||
string parameters, path_prefix;
|
||||
for ( size_t i = 0; i < includes.size (); i++ )
|
||||
{
|
||||
Include& include = *includes[i];
|
||||
if ( parameters.length () > 0 )
|
||||
parameters += " ";
|
||||
parameters += "-I" + include.directory;
|
||||
if ( include.baseValue == "__intermediate" )
|
||||
path_prefix = backend->intermediateDirectory->name + cSep;
|
||||
else if (include.baseValue == "__output" )
|
||||
path_prefix = backend->outputDirectory->name + cSep;
|
||||
else
|
||||
path_prefix = "";
|
||||
|
||||
parameters += "-I" + path_prefix + include.directory;
|
||||
}
|
||||
return parameters;
|
||||
}
|
||||
|
@ -1234,7 +1240,8 @@ MingwModuleHandler::GetRpcClientHeaderFilename ( string basename ) const
|
|||
string
|
||||
MingwModuleHandler::GetIdlHeaderFilename ( string basename ) const
|
||||
{
|
||||
return basename + ".h";
|
||||
return PassThruCacheDirectory ( basename + ".h",
|
||||
backend->intermediateDirectory );
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -52,6 +52,7 @@ Include::Include ( const Project& project,
|
|||
{
|
||||
this->directory = NormalizeFilename ( basePath + sSep + directory );
|
||||
this->basePath = NormalizeFilename ( basePath );
|
||||
this->baseValue = basePath;
|
||||
}
|
||||
|
||||
Include::~Include ()
|
||||
|
@ -65,26 +66,40 @@ Include::ProcessXML()
|
|||
att = node->GetAttribute ( "base", false );
|
||||
if ( att )
|
||||
{
|
||||
if ( !module )
|
||||
throw XMLInvalidBuildFileException (
|
||||
node->location,
|
||||
"'base' attribute illegal from global <include>" );
|
||||
bool referenceResolved = false;
|
||||
if ( att->value == project.name )
|
||||
baseValue = att->value;
|
||||
|
||||
if ( !module )
|
||||
{
|
||||
basePath = ".";
|
||||
referenceResolved = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
const Module* base = project.LocateModule ( att->value );
|
||||
if ( base != NULL )
|
||||
{
|
||||
baseModule = base;
|
||||
basePath = base->GetBasePath ();
|
||||
if ( att->value == "__intermediate" || att->value == "__output" )
|
||||
referenceResolved = true;
|
||||
else
|
||||
{
|
||||
throw XMLInvalidBuildFileException (
|
||||
node->location,
|
||||
"'base' attribute illegal from global <include>" );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !referenceResolved )
|
||||
{
|
||||
if ( att->value == project.name )
|
||||
{
|
||||
basePath = ".";
|
||||
referenceResolved = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
const Module* base = project.LocateModule ( att->value );
|
||||
if ( base != NULL )
|
||||
{
|
||||
baseModule = base;
|
||||
basePath = base->GetBasePath ();
|
||||
referenceResolved = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !referenceResolved )
|
||||
throw XMLInvalidBuildFileException (
|
||||
node->location,
|
||||
|
|
|
@ -366,6 +366,7 @@ public:
|
|||
const Module* baseModule;
|
||||
std::string directory;
|
||||
std::string basePath;
|
||||
std::string baseValue;
|
||||
|
||||
Include ( const Project& project,
|
||||
const XMLElement* includeNode );
|
||||
|
|
Loading…
Reference in a new issue