fix $(LIB)-la -lb issue

fix an issue where there is not an extra space between $(LIB) and -l in the generated Makefile

Patch taken from https://github.com/bigben-plusplus/cbp2make.git
This commit is contained in:
Paul Reeves 2023-06-07 14:57:53 +02:00
parent 439200d1dc
commit e4cd2d0f96
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
From 644678852b422b51940fda0c72a31783e3f17950 Mon Sep 17 00:00:00 2001
From: ben <bigben-plusplus@users.noreply.github.com>
Date: Wed, 6 Dec 2017 21:08:15 +0800
Subject: [PATCH] fix `$(LIB)-la -lb` issue
fix an issue where there is not an extra space between $(LIB) and -l in the generated Makefile
---
src/cbproject.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cbproject.cpp b/src/cbproject.cpp
index e843db0..8daf981 100644
--- a/src/cbproject.cpp
+++ b/src/cbproject.cpp
@@ -831,7 +831,7 @@ bool CCodeBlocksProject::GenerateMakefile
m_Makefile.AddMacro(target->Name(STR_LIBDIR+"_",Config.MacroVariableCase()),
CGlobalVariable::Convert(pl->Pd(target->LibDirs("$("+STR_LIBDIR+tc_suffix+")",tc->LibraryDirSwitch())),Config.MacroVariableCase()),section);
m_Makefile.AddMacro(target->Name(STR_LIB+"_",Config.MacroVariableCase()),
- CGlobalVariable::Convert("$("+STR_LIB+tc_suffix+")"+pl->Pd(target->Libs(*pl,tc->LinkLibrarySwitch())),Config.MacroVariableCase()),section);
+ CGlobalVariable::Convert("$("+STR_LIB+tc_suffix+")"+" "+pl->Pd(target->Libs(*pl,tc->LinkLibrarySwitch())),Config.MacroVariableCase()),section);
m_Makefile.AddMacro(target->Name(STR_LDFLAGS+"_",Config.MacroVariableCase()),
CGlobalVariable::Convert(pl->Pd(target->LdFlags("$("+STR_LDFLAGS+tc_suffix+")")),Config.MacroVariableCase()),section);
line = pl->Pd(target->ObjectOutput());