<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>
else //if ( module.type == IdlHeader )
{
newname = basename + ".h";
+ PassThruCacheDirectory ( NormalizeFilename ( newname ),
+ backend->intermediateDirectory );
return new FileLocation ( fileLocation->directory, filename );
}
}
if ( (module.type == RpcServer) || (module.type == RpcClient) )
return GetRpcServerHeaderFilename ( basename ) + " " + GetRpcClientHeaderFilename ( basename );
else
- return GetIdlHeaderFilename ( basename );
+ return GetIdlHeaderFilename ( basename );
}
else
return "";
else
directoryTree = backend->intermediateDirectory;
- if (newExtension == ".h")
- directoryTree = NULL;
-
string obj_file = PassThruCacheDirectory (
NormalizeFilename ( ReplaceExtension (
RemoveVariables ( sourceFilename ),
/* 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;
}
string
MingwModuleHandler::GetIdlHeaderFilename ( string basename ) const
{
- return basename + ".h";
+ return PassThruCacheDirectory ( basename + ".h",
+ backend->intermediateDirectory );
}
void
{
this->directory = NormalizeFilename ( basePath + sSep + directory );
this->basePath = NormalizeFilename ( basePath );
+ this->baseValue = basePath;
}
Include::~Include ()
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;
+ if ( att->value == "__intermediate" || att->value == "__output" )
+ referenceResolved = true;
+ else
+ {
+ throw XMLInvalidBuildFileException (
+ node->location,
+ "'base' attribute illegal from global <include>" );
+ }
}
- else
+
+ if ( !referenceResolved )
{
- const Module* base = project.LocateModule ( att->value );
- if ( base != NULL )
+ if ( att->value == project.name )
{
- baseModule = base;
- basePath = base->GetBasePath ();
+ 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,
const Module* baseModule;
std::string directory;
std::string basePath;
+ std::string baseValue;
Include ( const Project& project,
const XMLElement* includeNode );