summaryrefslogtreecommitdiffstats
path: root/Source/cmBorlandMakefileGenerator.cpp
diff options
context:
space:
mode:
authorJohn Biddiscombe <jbiddiscombe@skippingmouse.co.uk>2001-10-10 02:18:34 (GMT)
committerJohn Biddiscombe <jbiddiscombe@skippingmouse.co.uk>2001-10-10 02:18:34 (GMT)
commitad09f66469c89f39817c0fe3fc0347ec13c50d9c (patch)
treee5424f3420ec068a857b2153b5ce586210aff52f /Source/cmBorlandMakefileGenerator.cpp
parent6b1ab49ae64b92f5ef35f226d1ae2557a11dddf3 (diff)
downloadCMake-ad09f66469c89f39817c0fe3fc0347ec13c50d9c.zip
CMake-ad09f66469c89f39817c0fe3fc0347ec13c50d9c.tar.gz
CMake-ad09f66469c89f39817c0fe3fc0347ec13c50d9c.tar.bz2
FIX: Same as last checkin except applies to bpi files as wellas lib files
If we can't find it - and it's not a target - and it has no path already specified, it must be in OUTDIRLIB from another makefile in the same project ! (What this really means is the lib paths are correctly specified)
Diffstat (limited to 'Source/cmBorlandMakefileGenerator.cpp')
-rw-r--r--Source/cmBorlandMakefileGenerator.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/Source/cmBorlandMakefileGenerator.cpp b/Source/cmBorlandMakefileGenerator.cpp
index e8af9c7..ce0b235 100644
--- a/Source/cmBorlandMakefileGenerator.cpp
+++ b/Source/cmBorlandMakefileGenerator.cpp
@@ -390,11 +390,26 @@ void cmBorlandMakefileGenerator::OutputMakefile(const char* file)
if (tgts.find(l->first)==tgts.end())
{
std::string path = cmSystemTools::FindFile(libname.c_str(),linkdirs);
- if (path.size()) libname = path;
+ if (path.size())
+ {
+ libname = path;
+ }
+ else
+ // if we can't find it - and it's not a target - and it has no path
+ // already specified, it must be in OUTDIRLIB from another
+ // makefile in the same project !
+ {
+ std::string path = cmSystemTools::GetFilenamePath(libname);
+ if (path.size()==0)
+ {
+ libname = "$(OUTDIRLIB)\\" + libname;
+ }
+ // otherwise just leave it alone
+ }
}
else
{
- libname = "$(OUTDIRLIB)\\" + libname + ".bpi";
+ libname = "$(OUTDIRLIB)\\" + libname;
}
fout << " \\\n " << cmBorlandMakefileGenerator::EscapeSpaces(libname.c_str());
}
@@ -489,8 +504,8 @@ void cmBorlandMakefileGenerator::OutputTargets(std::ostream& fout)
fout << "$(OUTDIRLIB)\\" << l->first << ".dll : ${" << l->first << "_SRC_OBJS} ${" << l->first << "_LINK_LIB} ${" << l->first << "_LINK_BPI} \n";
fout << " @ilink32.exe @&&| \n";
fout << " -L$(LINK_DIR) $(LINKFLAGS_DLL) $(LINKFLAGS_DEBUG) \"$(BCB)/lib/c0d32.obj\" ";
- fout << "$(" << l->first << "_SRC_OBJS) ";
- fout << "$(" << l->first << "_LINK_BPI) , $<, $*, ";
+ fout << "$(" << l->first << "_LINK_BPI) ";
+ fout << "$(" << l->first << "_SRC_OBJS) , $<, $*, ";
fout << "$(" << l->first << "_LINK_LIB) import32.lib cw32mti.lib \n";
fout << "| \n";
fout << " @implib -w " << "$(OUTDIRLIB)\\" << l->first << ".lib " << "$(OUTDIRLIB)\\" << l->first << ".dll \n\n";
@@ -501,7 +516,7 @@ void cmBorlandMakefileGenerator::OutputTargets(std::ostream& fout)
fout << "$(OUTDIRLIB)\\" << l->first << ".bpl : ${" << l->first << "_SRC_OBJS} ${" << l->first << "_LINK_LIB} ${" << l->first << "_LINK_BPI} \n";
fout << " @ilink32.exe @&&| \n";
fout << " -L\"$(BCB)/lib\" -L$(LINK_DIR) $(LINKFLAGS_BPL) $(LINKFLAGS_DEBUG) \"$(BCB)/lib/c0pkg32.obj \" ";
- fout << "$(" << l->first << "_LINK_BPI) memmgr.lib sysinit.obj ";
+ fout << "$(" << l->first << "_LINK_BPI) Memmgr.lib sysinit.obj ";
fout << "$(" << l->first << "_SRC_OBJS) , $<, $*, ";
fout << "$(" << l->first << "_LINK_LIB) import32.lib cp32mti.lib \n";
fout << "| \n";
@@ -515,9 +530,9 @@ void cmBorlandMakefileGenerator::OutputTargets(std::ostream& fout)
fout << l->first << ".exe : ${" << l->first << "_SRC_OBJS} ${" << l->first << "_LINK_LIB} ${" << l->first << "_LINK_BPI} \n";
fout << " @ilink32.exe @&&| \n";
fout << " -L\"$(BCB)/lib\" -L$(LINK_DIR) $(LINKFLAGS_EXE) $(LINKFLAGS_DEBUG) \"$(BCB)/lib/c0w32.obj\" ";
- fout << "$(" << l->first << "_SRC_OBJS) ";
- fout << "$(" << l->first << "_LINK_BPI) , $<, $*, ";
- fout << "$(" << l->first << "_LINK_LIB) import32.lib cw32mti.lib \n";
+ fout << "$(" << l->first << "_LINK_BPI) Memmgr.lib sysinit.obj ";
+ fout << "$(" << l->first << "_SRC_OBJS) , $<, $*, ";
+ fout << "$(" << l->first << "_LINK_LIB) import32.lib cp32mti.lib \n";
fout << "| \n\n";
}
else if (l->second.GetType()==cmTarget::EXECUTABLE)