mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Clean referenced object libraries when cleaning a module
svn path=/trunk/; revision=16621
This commit is contained in:
parent
d3d7a7f34b
commit
ad59c91e1b
2 changed files with 28 additions and 4 deletions
|
@ -452,13 +452,35 @@ MingwModuleHandler::GetObjectFilename (
|
|||
return obj_file;
|
||||
}
|
||||
|
||||
string
|
||||
MingwModuleHandler::GetModuleCleanTarget ( const Module& module ) const
|
||||
{
|
||||
return module.name + "_clean";
|
||||
}
|
||||
|
||||
void
|
||||
MingwModuleHandler::GetReferencedObjectLibraryModuleCleanTargets ( vector<string>& moduleNames ) const
|
||||
{
|
||||
for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ )
|
||||
{
|
||||
Library& library = *module.non_if_data.libraries[i];
|
||||
if ( library.importedModule->type == ObjectLibrary )
|
||||
moduleNames.push_back ( GetModuleCleanTarget ( *library.importedModule ) );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MingwModuleHandler::GenerateCleanTarget () const
|
||||
{
|
||||
if ( 0 == clean_files.size() )
|
||||
return;
|
||||
fprintf ( fMakefile, ".PHONY: %s_clean\n", module.name.c_str() );
|
||||
fprintf ( fMakefile, "%s_clean:\n\t-@${rm}", module.name.c_str() );
|
||||
fprintf ( fMakefile,
|
||||
".PHONY: %s_clean\n",
|
||||
module.name.c_str() );
|
||||
vector<string> referencedModuleNames;
|
||||
GetReferencedObjectLibraryModuleCleanTargets ( referencedModuleNames );
|
||||
fprintf ( fMakefile,
|
||||
"%s: %s\n\t-@${rm}",
|
||||
GetModuleCleanTarget ( module ).c_str(),
|
||||
v2s ( referencedModuleNames, 10 ).c_str () );
|
||||
for ( size_t i = 0; i < clean_files.size(); i++ )
|
||||
{
|
||||
if ( 9==((i+1)%10) )
|
||||
|
|
|
@ -199,6 +199,8 @@ private:
|
|||
void GetRpcHeaderDependencies ( std::vector<std::string>& dependencies ) const;
|
||||
std::string GetRpcServerHeaderFilename ( std::string basename ) const;
|
||||
std::string GetRpcClientHeaderFilename ( std::string basename ) const;
|
||||
std::string GetModuleCleanTarget ( const Module& module ) const;
|
||||
void GetReferencedObjectLibraryModuleCleanTargets ( std::vector<std::string>& moduleNames ) const;
|
||||
public:
|
||||
const Module& module;
|
||||
string_list clean_files;
|
||||
|
|
Loading…
Reference in a new issue