summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-04-22 18:22:46 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-04-22 18:22:46 (GMT)
commitd774cd7c2be90f55b6d198ab147776a4303ca703 (patch)
tree4d5924ea4bebc1ad6f88b716c6324e380e5a7a8c /Source/cmUnixMakefileGenerator.cxx
parentbf228b05c795adaa206f8ef9858068c54aeb44b3 (diff)
downloadCMake-d774cd7c2be90f55b6d198ab147776a4303ca703.zip
CMake-d774cd7c2be90f55b6d198ab147776a4303ca703.tar.gz
CMake-d774cd7c2be90f55b6d198ab147776a4303ca703.tar.bz2
ENH: make CMake less verbose/precious
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx31
1 files changed, 20 insertions, 11 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index b9677a8..a17f191 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -230,9 +230,9 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file)
"Default target executed when no arguments are given to make, first make sure cmake.depends exists, cmake.check_depends is up-to-date, check the sources, then build the all target",
"default_target",
0,
- "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends",
- "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends",
- "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends",
+ "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends > cmake.depends.out",
+ "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends >> cmake.depends.out",
+ "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends >> cmake.depends.out",
"$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) all");
this->OutputTargetRules(fout);
@@ -1173,20 +1173,27 @@ inline std::string FixDirectoryName(const char* dir)
void cmUnixMakefileGenerator::BuildInSubDirectory(std::ostream& fout,
const char* dir,
const char* target1,
- const char* target2)
+ const char* target2,
+ bool silent)
{
std::string directory = this->ConvertToOutputPath(dir);
if(target1)
{
fout << "\t@if test ! -d " << directory
- << "; then $(MAKE) rebuild_cache; fi\n"
- << "\techo Building " << target1 << " in directory " << directory << "\n"
- << "\t@cd " << directory
+ << "; then $(MAKE) rebuild_cache; fi\n";
+ if (!silent)
+ {
+ fout << "\techo Building " << target1 << " in directory " << directory << "\n";
+ }
+ fout << "\t@cd " << directory
<< "; $(MAKE) -$(MAKEFLAGS) " << target1 << "\n";
}
if(target2)
{
- fout << "\techo Building " << target2 << " in directory " << directory << "\n";
+ if (!silent)
+ {
+ fout << "\techo Building " << target2 << " in directory " << directory << "\n";
+ }
fout << "\t@cd " << directory
<< "; $(MAKE) -$(MAKEFLAGS) " << target2 << "\n";
}
@@ -1202,7 +1209,8 @@ OutputSubDirectoryVars(std::ostream& fout,
const char* target1,
const char* target2,
const char* depend,
- const std::vector<std::string>& SubDirectories)
+ const std::vector<std::string>& SubDirectories,
+ bool silent)
{
if(!depend)
{
@@ -1249,7 +1257,7 @@ OutputSubDirectoryVars(std::ostream& fout,
dir += "/";
dir += SubDirectories[i];
this->BuildInSubDirectory(fout, dir.c_str(),
- target1, target2);
+ target1, target2, silent);
}
fout << "\n\n";
}
@@ -1271,7 +1279,8 @@ void cmUnixMakefileGenerator::OutputSubDirectoryRules(std::ostream& fout)
"default_target",
"default_target",
0, "$(TARGETS)",
- SubDirectories);
+ SubDirectories,
+ true);
this->OutputSubDirectoryVars(fout, "SUBDIR_CLEAN", "clean",
"clean",
0, 0,