diff options
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 4e621f7..5937d44 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -99,7 +99,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout) for(cmTargets::const_iterator l = tgts.begin(); l != tgts.end(); l++) { - if (l->second.IsALibrary()) + if (l->second.GetType() == cmTarget::LIBRARY) { fout << " \\\nlib" << l->first.c_str() << "${CMAKE_LIB_EXT}"; } @@ -108,7 +108,7 @@ void cmUnixMakefileGenerator::OutputTargetRules(std::ostream& fout) for(cmTargets::const_iterator l = tgts.begin(); l != tgts.end(); l++) { - if (!l->second.IsALibrary()) + if (!l->second.GetType() == cmTarget::LIBRARY) { fout << "\\\n" << l->first.c_str(); } @@ -195,7 +195,7 @@ void cmUnixMakefileGenerator::OutputTargets(std::ostream& fout) for(cmTargets::const_iterator l = tgts.begin(); l != tgts.end(); l++) { - if (l->second.IsALibrary()) + if (l->second.GetType() == cmTarget::LIBRARY) { fout << "#---------------------------------------------------------\n"; fout << "# rules for a library\n"; @@ -217,7 +217,7 @@ void cmUnixMakefileGenerator::OutputTargets(std::ostream& fout) this->OutputLinkLibraries(fout, l->first.c_str(), l->second); fout << "\n\n"; } - else + else if (l->second.GetType() == cmTarget::EXECUTABLE) { fout << l->first << ": ${" << l->first << "_SRC_OBJS} ${CMAKE_DEPEND_LIBS}\n"; @@ -487,6 +487,12 @@ void cmUnixMakefileGenerator::OutputCustomRules(std::ostream& fout) { std::string command = c->first; const cmSourceGroup::CommandFiles& commandFiles = c->second; + // if the command has no outputs, then it is a utility command + // with no outputs or depends + if(commandFiles.m_Outputs.size() == 0) + { + fout << source.c_str() << ":\n\t" << command.c_str() << "\n\n"; + } // Write a rule for every output generated by this command. for(std::set<std::string>::const_iterator output = commandFiles.m_Outputs.begin(); |