[Scummvm-cvs-logs] scummvm master -> dea5aa8a2017ec9b9abc16b34683a1e37aafbe46

lordhoto lordhoto at gmail.com
Fri May 6 20:44:40 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dea5aa8a20 CREATE_PROJECT: Fix module.mk parsing.


Commit: dea5aa8a2017ec9b9abc16b34683a1e37aafbe46
    https://github.com/scummvm/scummvm/commit/dea5aa8a2017ec9b9abc16b34683a1e37aafbe46
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-05-06T11:41:21-07:00

Commit Message:
CREATE_PROJECT: Fix module.mk parsing.

Formerly create_project incorrectly assumed that a given object file is only
present once in an module.mk file. This is not the case for backends/module.mk
for example. There the Windows FS object files are in two different if blocks.
In this particular case it resulted in the object file being added to both the
include list and the exclude list.

Now the module.mk handler prefers files being in the include list.

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 7d112c7..de82dd1 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1225,10 +1225,20 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin
 					tokens = tokenize(line);
 					i = tokens.begin();
 				} else {
-					if (shouldInclude.top())
-						includeList.push_back(moduleDir + "/" + unifyPath(*i));
-					else
-						excludeList.push_back(moduleDir + "/" + unifyPath(*i));
+					const std::string filename = moduleDir + "/" + unifyPath(*i);
+
+					if (shouldInclude.top()) {
+						// In case we should include a file, we need to make
+						// sure it is not in the exclude list already. If it
+						// is we just drop it from the exclude list.
+						excludeList.remove(filename);
+
+						includeList.push_back(filename);
+					} else if (std::find(includeList.begin(), includeList.end(), filename) == includeList.end()) {
+						// We only add the file to the exclude list in case it
+						// has not yet been added to the include list.
+						excludeList.push_back(filename);
+					}
 					++i;
 				}
 			}






More information about the Scummvm-git-logs mailing list