summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-08-04 19:35:02 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-08-04 19:35:02 (GMT)
commit439f07e83c8480f808c176a09bff47ccef4f24e1 (patch)
tree6864b8d84420e620fb4858047258fef69eb48ea4
parent333562e8cc425ed98354dad604d834c31b1c6575 (diff)
downloadCMake-439f07e83c8480f808c176a09bff47ccef4f24e1.zip
CMake-439f07e83c8480f808c176a09bff47ccef4f24e1.tar.gz
CMake-439f07e83c8480f808c176a09bff47ccef4f24e1.tar.bz2
added make help target first cut
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx48
1 files changed, 47 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index cb82397..25f2aeb 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -370,9 +370,55 @@ std::string cmLocalUnixMakefileGenerator::GetFullTargetName(const char* n,
// Output the rules for any targets
void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
{
+ const cmTargets &tgts = m_Makefile->GetTargets();
+
+ // add the help target
+ fout << "help:\n";
+ fout << "\t@echo \"The following are some of the valid targets for this Makefile:\"\n";
+ fout << "\t@echo \" all (the default if no target is provided)\"\n";
+ fout << "\t@echo \" clean\"\n";
+ fout << "\t@echo \" depend\"\n";
+ fout << "\t@echo \" rebuild_cache\"\n";
+
+ // libraries
+ for(cmTargets::const_iterator l = tgts.begin();
+ l != tgts.end(); l++)
+ {
+ if((l->second.GetType() == cmTarget::STATIC_LIBRARY) ||
+ (l->second.GetType() == cmTarget::SHARED_LIBRARY) ||
+ (l->second.GetType() == cmTarget::MODULE_LIBRARY))
+ {
+ std::string path = m_LibraryOutputPath;
+ path += this->GetFullTargetName(l->first.c_str(), l->second);
+ fout << "\t@echo \" " << cmSystemTools::ConvertToOutputPath(path.c_str()) << "\"\n";
+ }
+ }
+ // executables
+ for(cmTargets::const_iterator l = tgts.begin();
+ l != tgts.end(); l++)
+ {
+ if ((l->second.GetType() == cmTarget::EXECUTABLE ||
+ l->second.GetType() == cmTarget::WIN32_EXECUTABLE) &&
+ l->second.IsInAll())
+ {
+ fout << "\t@echo \" " << l->first << "\"\n";
+ }
+ }
+ // list utilities last
+ for(cmTargets::const_iterator l = tgts.begin();
+ l != tgts.end(); l++)
+ {
+ if (l->second.GetType() == cmTarget::UTILITY &&
+ l->second.IsInAll())
+ {
+ fout << "\t@echo \" " << l->first << "\"\n";
+ }
+ }
+ fout << "\n\n";
+
+
// for each target add to the list of targets
fout << "TARGETS = ";
- const cmTargets &tgts = m_Makefile->GetTargets();
// list libraries first
for(cmTargets::const_iterator l = tgts.begin();
l != tgts.end(); l++)