diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4f5381572..4b22f07f2 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -623,6 +623,8 @@ cmGlobalUnixMakefileGenerator3 commands.clear(); commands.push_back(lg->GetRecursiveMakeCall ("CMakeFiles/Makefile2",t->second.GetName())); + std::string echoCommand = "@echo \"\""; + commands.push_back(echoCommand.c_str()); depends.clear(); depends.push_back("cmake_check_build_system"); lg->WriteMakeRule(ruleFileStream, @@ -675,6 +677,7 @@ cmGlobalUnixMakefileGenerator3 std::string localName; std::string makeTargetName; + // write the directory level rules for this local gen this->WriteDirectoryRules2(ruleFileStream,lg); @@ -707,6 +710,8 @@ cmGlobalUnixMakefileGenerator3 << localName << "\n\n"; commands.clear(); + std::string echoCommand = "@$(CMAKE_COMMAND) -E echo_append \".\""; + commands.push_back(echoCommand.c_str()); if (t->second.GetType() != cmTarget::UTILITY) { makeTargetName = localName; @@ -731,6 +736,7 @@ cmGlobalUnixMakefileGenerator3 // Write the rule. localName += "/all"; depends.clear(); + this->AppendGlobalTargetDepends(depends,t->second); lg->WriteMakeRule(ruleFileStream, "All Build rule for target.", localName.c_str(), depends, commands, true); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 66a69b5dc..a69ae73f3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -886,6 +886,8 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector& commands, break; } } +#else + (void)color; #endif // Echo one line at a time. @@ -1411,6 +1413,8 @@ void cmLocalUnixMakefileGenerator3 this->CreateCDCommand(commands, this->Makefile->GetHomeOutputDirectory(), this->Makefile->GetStartOutputDirectory()); + std::string echoCommand = "@echo \"\""; + commands.push_back(echoCommand.c_str()); this->WriteMakeRule(ruleFileStream, "The main all target", "all", depends, commands, true); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 189e15350..84ecc0fa3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -749,6 +749,8 @@ void CMakeCommandUsage(const char* program) "content to directory 'destination'\n" << " compare_files file1 file2 - check if file1 is same as file2\n" << " echo [string]... - displays arguments as text\n" + << " echo_append [string]... - displays arguments as text but no new" + " line\n" << " environment - display the current enviroment\n" << " remove file1 file2 ... - remove the file(s)\n" << " tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar.\n" @@ -835,6 +837,19 @@ int cmake::ExecuteCMakeCommand(std::vector& args) return 0; } + // Echo string no new line + else if (args[1] == "echo_append" ) + { + unsigned int cc; + const char* space = ""; + for ( cc = 2; cc < args.size(); cc ++ ) + { + std::cout << space << args[cc]; + space = " "; + } + return 0; + } + #if defined(CMAKE_BUILD_WITH_CMAKE) // Command to create a symbolic link. Fails on platforms not // supporting them.