Skip to content

Commit e205591

Browse files
committed
Fix issue with multi-line "OBJS-$(1)" in fftools.
1 parent 7e853c0 commit e205591

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/projectGenerator_pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ bool ProjectGenerator::passProgramMake()
640640
while (checks >= 1) {
641641
// Open the input Makefile
642642
string makeFile = m_projectDir + "MakeFile";
643+
m_inputFile.close();
643644
m_inputFile.open(makeFile);
644645
if (!m_inputFile.is_open()) {
645646
outputError("Could not open open MakeFile (" + makeFile + ")");
@@ -697,7 +698,7 @@ bool ProjectGenerator::passProgramMake()
697698
}
698699
}
699700
} else if (((findPos = m_inLine.find("OBJS-$(1)")) != string::npos) && (findPos == 0)) {
700-
m_inLine = m_inLine.substr(findPos + 5, m_inLine.find(".o", findPos + 9) + 2 - (findPos + 5));
701+
m_inLine = m_inLine.substr(findPos + 5, m_inLine.rfind(".o") + 2 - (findPos + 5));
701702
if (m_inLine.at(4) == '-') {
702703
// Found some dynamic c includes
703704
if (!passDCInclude()) {

0 commit comments

Comments
 (0)