diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-08-04 19:35:02 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-08-04 19:35:02 (GMT) |
commit | 439f07e83c8480f808c176a09bff47ccef4f24e1 (patch) | |
tree | 6864b8d84420e620fb4858047258fef69eb48ea4 /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | 333562e8cc425ed98354dad604d834c31b1c6575 (diff) | |
download | CMake-439f07e83c8480f808c176a09bff47ccef4f24e1.zip CMake-439f07e83c8480f808c176a09bff47ccef4f24e1.tar.gz CMake-439f07e83c8480f808c176a09bff47ccef4f24e1.tar.bz2 |
added make help target first cut
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 48 |
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++) |