summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-01 20:55:32 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-01 20:55:32 (GMT)
commit96ec40943cc1f96d8789fff62c6416a91c01f066 (patch)
tree1a5dc61afab89b36a15d9fd886c771104e029783 /Source/cmUnixMakefileGenerator.cxx
parent13d4fd06f09ad1beaab01d714c246dbee2568373 (diff)
downloadCMake-96ec40943cc1f96d8789fff62c6416a91c01f066.zip
CMake-96ec40943cc1f96d8789fff62c6416a91c01f066.tar.gz
CMake-96ec40943cc1f96d8789fff62c6416a91c01f066.tar.bz2
ENH: implement ADD_TARGET command, and add an ALL_BUILD target
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx14
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();