Fix {module}_clean target

svn path=/trunk/; revision=31241
This commit is contained in:
Hervé Poussineau 2007-12-15 12:27:30 +00:00
parent a054098132
commit a3c09fcea9

View file

@ -573,6 +573,21 @@ MingwModuleHandler::GenerateCleanTarget () const
fprintf ( fMakefile, " %s", clean_files[i].c_str() );
}
fprintf ( fMakefile, " 2>$(NUL)\n" );
if ( module.name != "zlib" ) /* Avoid make warning */
{
DirectoryLocation root;
if ( backend->configuration.GenerateProxyMakefilesInSourceTree )
root = SourceDirectory;
else
root = OutputDirectory;
FileLocation proxyMakefile ( root,
module.output->relative_path,
"GNUmakefile" );
fprintf ( fMakefile, "\t-@${rm} %s 2>$(NUL)\n",
backend->GetFullName ( proxyMakefile ).c_str () );
}
fprintf ( fMakefile, "clean: %s_clean\n\n", module.name.c_str() );
}
@ -2206,19 +2221,6 @@ MingwModuleHandler::GenerateRules ()
string cppc = ( module.host == HostTrue ? "${host_gpp}" : "${gpp}" );
string ar = ( module.host == HostTrue ? "${host_ar}" : "${ar}" );
if ( module.name != "zlib" ) /* Avoid make warning */
{
DirectoryLocation root;
if ( backend->configuration.GenerateProxyMakefilesInSourceTree )
root = SourceDirectory;
else
root = OutputDirectory;
FileLocation proxyMakefile ( root,
module.output->relative_path,
"GNUmakefile" );
CLEAN_FILE ( proxyMakefile );
}
string targetMacro = GetTargetMacro ( module );
//CLEAN_FILE ( targetMacro );
CLEAN_FILE ( FileLocation ( SourceDirectory, "", targetMacro ) );