mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:32:57 +00:00
msvc6 compatibility
svn path=/branches/xmlbuildsystem/; revision=13124
This commit is contained in:
parent
9b92b2cc9a
commit
6f056ee7ce
1 changed files with 78 additions and 65 deletions
|
@ -10,9 +10,11 @@ using std::vector;
|
||||||
using std::map;
|
using std::map;
|
||||||
using std::set;
|
using std::set;
|
||||||
|
|
||||||
|
typedef set<string> set_string;
|
||||||
|
|
||||||
map<ModuleType,MingwModuleHandler*>*
|
map<ModuleType,MingwModuleHandler*>*
|
||||||
MingwModuleHandler::handler_map = NULL;
|
MingwModuleHandler::handler_map = NULL;
|
||||||
set<string>
|
set_string
|
||||||
MingwModuleHandler::directory_set;
|
MingwModuleHandler::directory_set;
|
||||||
int
|
int
|
||||||
MingwModuleHandler::ref = 0;
|
MingwModuleHandler::ref = 0;
|
||||||
|
@ -74,8 +76,10 @@ string
|
||||||
MingwModuleHandler::GetDirectory ( const string& filename ) const
|
MingwModuleHandler::GetDirectory ( const string& filename ) const
|
||||||
{
|
{
|
||||||
size_t index = filename.find_last_of ( '/' );
|
size_t index = filename.find_last_of ( '/' );
|
||||||
if (index == string::npos) return ".";
|
if (index == string::npos)
|
||||||
else return filename.substr ( 0, index );
|
return ".";
|
||||||
|
else
|
||||||
|
return filename.substr ( 0, index );
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
|
@ -218,9 +222,9 @@ MingwModuleHandler::GetObjectFilename ( const string& sourceFilename ) const
|
||||||
newExtension = ".stubs.o";
|
newExtension = ".stubs.o";
|
||||||
else
|
else
|
||||||
newExtension = ".o";
|
newExtension = ".o";
|
||||||
return PassThruCacheDirectory
|
return PassThruCacheDirectory (
|
||||||
( FixupTargetFilename ( ReplaceExtension ( sourceFilename,
|
FixupTargetFilename (
|
||||||
newExtension ) ) );
|
ReplaceExtension ( sourceFilename, newExtension ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
|
@ -242,19 +246,24 @@ MingwModuleHandler::GetObjectFilenames ( const Module& module ) const
|
||||||
void
|
void
|
||||||
MingwModuleHandler::GenerateDirectoryTargets() const
|
MingwModuleHandler::GenerateDirectoryTargets() const
|
||||||
{
|
{
|
||||||
|
set_string::iterator i;
|
||||||
fprintf( fMakefile, "ifneq ($(ROS_INTERMEDIATE),)\ndirectories::" );
|
fprintf( fMakefile, "ifneq ($(ROS_INTERMEDIATE),)\ndirectories::" );
|
||||||
|
|
||||||
for( set<string>::iterator i = directory_set.begin();
|
for ( i = directory_set.begin();
|
||||||
i != directory_set.end();
|
i != directory_set.end();
|
||||||
i++ )
|
i++ )
|
||||||
|
{
|
||||||
fprintf ( fMakefile, " %s", i->c_str() );
|
fprintf ( fMakefile, " %s", i->c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
fprintf( fMakefile, "\n\n" );
|
fprintf( fMakefile, "\n\n" );
|
||||||
|
|
||||||
for( set<string>::iterator i = directory_set.begin();
|
for ( i = directory_set.begin();
|
||||||
i != directory_set.end();
|
i != directory_set.end();
|
||||||
i++ )
|
i++ )
|
||||||
|
{
|
||||||
fprintf ( fMakefile, "%s ", i->c_str() );
|
fprintf ( fMakefile, "%s ", i->c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
"::\n\t${mkdir} $@\n\n"
|
"::\n\t${mkdir} $@\n\n"
|
||||||
|
@ -776,6 +785,7 @@ MingwModuleHandler::GenerateObjectFileTargets ( const Module& module,
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; i < ifs.size(); i++ )
|
for ( i = 0; i < ifs.size(); i++ )
|
||||||
|
{
|
||||||
GenerateObjectFileTargets ( module,
|
GenerateObjectFileTargets ( module,
|
||||||
ifs[i]->files,
|
ifs[i]->files,
|
||||||
ifs[i]->ifs,
|
ifs[i]->ifs,
|
||||||
|
@ -784,6 +794,7 @@ MingwModuleHandler::GenerateObjectFileTargets ( const Module& module,
|
||||||
nasmflagsMacro,
|
nasmflagsMacro,
|
||||||
windresflagsMacro );
|
windresflagsMacro );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MingwModuleHandler::GenerateObjectFileTargets ( const Module& module,
|
MingwModuleHandler::GenerateObjectFileTargets ( const Module& module,
|
||||||
|
@ -1002,8 +1013,10 @@ MingwModuleHandler::GenerateInvocations ( const Module& module ) const
|
||||||
const Invoke& invoke = *module.invocations[i];
|
const Invoke& invoke = *module.invocations[i];
|
||||||
|
|
||||||
if ( invoke.invokeModule->type != BuildTool )
|
if ( invoke.invokeModule->type != BuildTool )
|
||||||
|
{
|
||||||
throw InvalidBuildFileException ( module.node.location,
|
throw InvalidBuildFileException ( module.node.location,
|
||||||
"Only modules of type buildtool can be invoked." );
|
"Only modules of type buildtool can be invoked." );
|
||||||
|
}
|
||||||
|
|
||||||
string invokeTarget = module.GetInvocationTarget ( i );
|
string invokeTarget = module.GetInvocationTarget ( i );
|
||||||
fprintf ( fMakefile,
|
fprintf ( fMakefile,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue