diff options
author | Brad King <brad.king@kitware.com> | 2001-03-09 15:52:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-03-09 15:52:03 (GMT) |
commit | 93a17629b6c8ff3a72c92c1f4e7b223621e73d90 (patch) | |
tree | b41b90e94becfe9ecbb5d55507a1f57aef349071 /Source/cmCablePackageCommand.cxx | |
parent | 4f59f98b708e7ff7c65857809c76231e58b94e6f (diff) | |
download | CMake-93a17629b6c8ff3a72c92c1f4e7b223621e73d90.zip CMake-93a17629b6c8ff3a72c92c1f4e7b223621e73d90.tar.gz CMake-93a17629b6c8ff3a72c92c1f4e7b223621e73d90.tar.bz2 |
ENH: Added proper dependency generation for a package on cable executable.
Diffstat (limited to 'Source/cmCablePackageCommand.cxx')
-rw-r--r-- | Source/cmCablePackageCommand.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Source/cmCablePackageCommand.cxx b/Source/cmCablePackageCommand.cxx index 9fff8fd..009ecd1 100644 --- a/Source/cmCablePackageCommand.cxx +++ b/Source/cmCablePackageCommand.cxx @@ -35,28 +35,23 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args) // cmCablePackageCommand's WritePackageFooter(). This will call // this cmCablePackageCommand's WritePackageHeader(). m_CableData->BeginPackage(this); - + + // Tell the makefile that it needs the "cable" utility. + m_Makefile->AddUtility("cable"); + // Add custom rules to the makefile to generate this package's source // files. std::string command = "${CABLE}"; - m_Makefile->ExpandVariablesInString(command); + m_Makefile->ExpandVariablesInString(command); std::vector<std::string> depends; depends.push_back(command); command += " cable_config.xml"; - std::string packageFile = "Cxx/"+m_PackageName+"_cxx"; - std::string packageHeader = packageFile+".h"; - std::string packageSource = packageFile+".cxx"; - - // A rule for the package's header file. - m_Makefile->AddCustomCommand("cable_config.xml", - packageHeader.c_str(), - command.c_str(), - depends); + std::string packageFile = "Cxx/"+m_PackageName+"_cxx.cxx"; // A rule for the package's source file. m_Makefile->AddCustomCommand("cable_config.xml", - packageSource.c_str(), + packageFile.c_str(), command.c_str(), depends); |