diff options
author | Brad King <brad.king@kitware.com> | 2004-01-22 15:54:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-01-22 15:54:15 (GMT) |
commit | fad0651d8487943256adba84976950b4ce0d3107 (patch) | |
tree | 3cb602d997ebbc22c6010966ad6b81473657759e /Source | |
parent | a4aab3b677b01a8049cdd41bc168deed69f437fa (diff) | |
download | CMake-fad0651d8487943256adba84976950b4ce0d3107.zip CMake-fad0651d8487943256adba84976950b4ce0d3107.tar.gz CMake-fad0651d8487943256adba84976950b4ce0d3107.tar.bz2 |
BUG: Fix jump-over-and-build for missing libraries when the relative path to the library is different between the source and destination of the jump.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 34 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.h | 6 |
2 files changed, 10 insertions, 30 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 84371a0..4eff4b6 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1673,10 +1673,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout) this->OutputBuildTargetInDir(fout, cacheValue, library.c_str(), - libpath.c_str(), - m_Makefile-> - GetDefinition("LIBRARY_OUTPUT_PATH") - ); + libpath.c_str()); } // something other than a library... else @@ -1696,10 +1693,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout) this->OutputBuildTargetInDir(fout, cacheValue, fullName.c_str(), - exepath.c_str(), - m_Makefile-> - GetDefinition("EXECUTABLE_OUTPUT_PATH") - ); + exepath.c_str()); } } } @@ -1708,53 +1702,41 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout) void cmLocalUnixMakefileGenerator::OutputBuildTargetInDirWindows(std::ostream& fout, const char* path, const char* library, - const char* fullpath, - const char* libOutPath) + const char* fullpath) { - const char* makeTarget = library; - std::string jumpBack = + std::string jumpBack = cmSystemTools::RelativePath(cmSystemTools::GetProgramPath(fullpath).c_str(), m_Makefile->GetCurrentOutputDirectory()); jumpBack = this->ConvertToOutputForExisting(jumpBack.c_str()); std::string wpath = this->ConvertToOutputForExisting(path); std::string wfullpath = this->ConvertToOutputForExisting(fullpath); - if(libOutPath && strcmp( libOutPath, "" ) != 0) - { - makeTarget = wfullpath.c_str(); - } fout << wfullpath << ":\n\tcd " << wpath << "\n" << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends\n" << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends\n" << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends\n" - << "\t$(MAKE) $(MAKESILENT) " << makeTarget + << "\t$(MAKE) $(MAKESILENT) " << library << "\n\tcd " << jumpBack << "\n"; } void cmLocalUnixMakefileGenerator::OutputBuildTargetInDir(std::ostream& fout, const char* path, const char* library, - const char* fullpath, - const char* outputPath) + const char* fullpath) { if(m_WindowsShell) { - this->OutputBuildTargetInDirWindows(fout, path, library, fullpath, outputPath); + this->OutputBuildTargetInDirWindows(fout, path, library, fullpath); return; } - const char* makeTarget = library; - if(outputPath && strcmp( outputPath, "" ) != 0) - { - makeTarget = fullpath; - } fout << this->ConvertToOutputForExisting(fullpath) << ":\n\tcd " << this->ConvertToOutputForExisting(path) << "; $(MAKE) $(MAKESILENT) cmake.depends" << "; $(MAKE) $(MAKESILENT) cmake.check_depends" << "; $(MAKE) $(MAKESILENT) -f cmake.check_depends" << "; $(MAKE) $(MAKESILENT) " - << this->ConvertToRelativeOutputPath(makeTarget) << "\n\n"; + << library << "\n\n"; } diff --git a/Source/cmLocalUnixMakefileGenerator.h b/Source/cmLocalUnixMakefileGenerator.h index 3caf5fd..3ef82e8 100644 --- a/Source/cmLocalUnixMakefileGenerator.h +++ b/Source/cmLocalUnixMakefileGenerator.h @@ -192,13 +192,11 @@ protected: virtual void OutputBuildTargetInDirWindows(std::ostream& fout, const char* path, const char* library, - const char* fullpath, - const char* outputPath); + const char* fullpath); virtual void OutputBuildTargetInDir(std::ostream& fout, const char* path, const char* library, - const char* fullpath, - const char* outputPath); + const char* fullpath); ///! return true if the two paths are the same virtual bool SamePath(const char* path1, const char* path2); virtual std::string GetOutputExtension(const char* sourceExtension); |