ENH: Do preinstall and postinstall script even if the target is not installed

This commit is contained in:
Andy Cedilnik 2004-04-21 11:32:27 -04:00
parent 4d55c6540a
commit ac8232e140
1 changed files with 10 additions and 10 deletions

View File

@ -132,6 +132,12 @@ void cmLocalGenerator::GenerateInstallRules()
for(cmTargets::const_iterator l = tgts.begin();
l != tgts.end(); l++)
{
const char* preinstall = l->second.GetProperty("PRE_INSTALL_SCRIPT");
const char* postinstall = l->second.GetProperty("POST_INSTALL_SCRIPT");
if ( preinstall )
{
fout << "INCLUDE(\"" << preinstall << "\")" << std::endl;
}
if (l->second.GetInstallPath() != "")
{
destination = prefix + l->second.GetInstallPath();
@ -139,12 +145,6 @@ void cmLocalGenerator::GenerateInstallRules()
const char* dest = destination.c_str();
int type = l->second.GetType();
const char* preinstall = l->second.GetProperty("PRE_INSTALL_SCRIPT");
const char* postinstall = l->second.GetProperty("POST_INSTALL_SCRIPT");
if ( preinstall )
{
fout << "INCLUDE(\"" << preinstall << "\")" << std::endl;
}
std::string fname;
const char* files;
@ -242,10 +242,10 @@ void cmLocalGenerator::GenerateInstallRules()
default:
break;
}
if ( postinstall )
{
fout << "INCLUDE(\"" << postinstall << "\")" << std::endl;
}
}
if ( postinstall )
{
fout << "INCLUDE(\"" << postinstall << "\")" << std::endl;
}
}
cmMakefile* mf = this->GetMakefile();