diff options
author | Brad King <brad.king@kitware.com> | 2001-08-01 20:14:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-08-01 20:14:16 (GMT) |
commit | 8a03ccda075da86e9dcfc3ad5286aa0793d87619 (patch) | |
tree | ad846f627db9aa6206b1d1ca61262dbe0ff2ab6d /Source/cmUnixMakefileGenerator.cxx | |
parent | fda98f856286aa5622e1fc00d7ef32196e04e9b5 (diff) | |
download | CMake-8a03ccda075da86e9dcfc3ad5286aa0793d87619.zip CMake-8a03ccda075da86e9dcfc3ad5286aa0793d87619.tar.gz CMake-8a03ccda075da86e9dcfc3ad5286aa0793d87619.tar.bz2 |
ENH: Added SUBDIR_DEPENDS command and corresponding support code. This command allows specification that a set of subdirectories be built before a particular directory.
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 225cd33..24f4036 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -723,7 +723,15 @@ OutputSubDirectoryVars(std::ostream& fout, for(unsigned int i =0; i < SubDirectories.size(); i++) { std::string subdir = FixDirectoryName(SubDirectories[i].c_str()); - fout << target << "_" << subdir.c_str() << ":\n"; + fout << target << "_" << subdir.c_str() << ":"; + const std::set<std::string>& subdirDepends = m_Makefile->GetSubdirDepends(SubDirectories[i].c_str()); + for(std::set<std::string>::const_iterator d = subdirDepends.begin(); + d != subdirDepends.end(); ++d) + { + std::string fixed_d = FixDirectoryName(d->c_str()); + fout << " " << target << "_" << fixed_d.c_str(); + } + fout << "\n"; if(target1) { fout << "\t@if test ! -d " << SubDirectories[i].c_str() << "; then ${MAKE} rebuild_cache; fi\n" |