Add <module>_install target

svn path=/branches/xmlbuildsystem/; revision=15047
This commit is contained in:
Casper Hornstrup 2005-05-06 16:05:37 +00:00
parent 7dec8061f1
commit e5c1f57b80
3 changed files with 23 additions and 0 deletions

View file

@ -440,6 +440,27 @@ MingwModuleHandler::GenerateCleanTarget () const
fprintf ( fMakefile, "clean: %s_clean\n\n", module.name.c_str() );
}
void
MingwModuleHandler::GenerateInstallTarget () const
{
if ( module.installName.length () == 0 )
return;
fprintf ( fMakefile, ".PHONY: %s_install\n", module.name.c_str() );
fprintf ( fMakefile, "%s_install:\n", module.name.c_str() );
string sourceFilename = MingwModuleHandler::PassThruCacheDirectory (
NormalizeFilename ( module.GetPath () ),
backend->outputDirectory );
string normalizedTargetFilename = MingwModuleHandler::PassThruCacheDirectory (
NormalizeFilename ( module.installBase + SSEP + module.installName ),
backend->installDirectory );
fprintf ( fMakefile,
"\t$(ECHO_CP)\n" );
fprintf ( fMakefile,
"\t${cp} %s %s 1>$(NUL)\n",
sourceFilename.c_str (),
normalizedTargetFilename.c_str () );
}
string
MingwModuleHandler::GetObjectFilenames ()
{