ENH: only depend subdir builds on TARGETS, not all sub dir operations, we do not want to build when doing a make depend
This commit is contained in:
parent
2cc36654e6
commit
142119be95
|
@ -1108,8 +1108,13 @@ OutputSubDirectoryVars(std::ostream& fout,
|
||||||
const char* target,
|
const char* target,
|
||||||
const char* target1,
|
const char* target1,
|
||||||
const char* target2,
|
const char* target2,
|
||||||
|
const char* depend,
|
||||||
const std::vector<std::string>& SubDirectories)
|
const std::vector<std::string>& SubDirectories)
|
||||||
{
|
{
|
||||||
|
if(!depend)
|
||||||
|
{
|
||||||
|
depend = "";
|
||||||
|
}
|
||||||
if( SubDirectories.size() == 0)
|
if( SubDirectories.size() == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -1135,7 +1140,7 @@ OutputSubDirectoryVars(std::ostream& fout,
|
||||||
for(unsigned int i =0; i < SubDirectories.size(); i++)
|
for(unsigned int i =0; i < SubDirectories.size(); i++)
|
||||||
{
|
{
|
||||||
std::string subdir = FixDirectoryName(SubDirectories[i].c_str());
|
std::string subdir = FixDirectoryName(SubDirectories[i].c_str());
|
||||||
fout << target << "_" << subdir.c_str() << ": $(TARGETS)";
|
fout << target << "_" << subdir.c_str() << ": " << depend;
|
||||||
|
|
||||||
// Make each subdirectory depend on previous one. This forces
|
// Make each subdirectory depend on previous one. This forces
|
||||||
// parallel builds (make -j 2) to build in same order as a single
|
// parallel builds (make -j 2) to build in same order as a single
|
||||||
|
@ -1172,19 +1177,19 @@ void cmUnixMakefileGenerator::OutputSubDirectoryRules(std::ostream& fout)
|
||||||
"SUBDIR_BUILD",
|
"SUBDIR_BUILD",
|
||||||
"default_target",
|
"default_target",
|
||||||
"default_target",
|
"default_target",
|
||||||
0,
|
0, "$(TARGETS)",
|
||||||
SubDirectories);
|
SubDirectories);
|
||||||
this->OutputSubDirectoryVars(fout, "SUBDIR_CLEAN", "clean",
|
this->OutputSubDirectoryVars(fout, "SUBDIR_CLEAN", "clean",
|
||||||
"clean",
|
"clean",
|
||||||
0,
|
0, 0,
|
||||||
SubDirectories);
|
SubDirectories);
|
||||||
this->OutputSubDirectoryVars(fout, "SUBDIR_DEPEND", "depend",
|
this->OutputSubDirectoryVars(fout, "SUBDIR_DEPEND", "depend",
|
||||||
"depend",
|
"depend",
|
||||||
0,
|
0, 0,
|
||||||
SubDirectories);
|
SubDirectories);
|
||||||
this->OutputSubDirectoryVars(fout, "SUBDIR_INSTALL", "install",
|
this->OutputSubDirectoryVars(fout, "SUBDIR_INSTALL", "install",
|
||||||
"install",
|
"install",
|
||||||
0,
|
0, 0,
|
||||||
SubDirectories);
|
SubDirectories);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ protected:
|
||||||
const char* target,
|
const char* target,
|
||||||
const char* target1,
|
const char* target1,
|
||||||
const char* target2,
|
const char* target2,
|
||||||
|
const char* depend,
|
||||||
const std::vector<std::string>&
|
const std::vector<std::string>&
|
||||||
SubDirectories);
|
SubDirectories);
|
||||||
virtual void OutputMakeRule(std::ostream&,
|
virtual void OutputMakeRule(std::ostream&,
|
||||||
|
|
Loading…
Reference in New Issue