aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorLittleboy2011-04-27 17:00:38 -0400
committerLittleboy2011-04-27 17:00:55 -0400
commit801c27bd224f20370e152372941510964a85a6c3 (patch)
treecaa4e0e4ceea9765c26f2c93f30033c4fae24daf /devtools
parentc76502fe1174d5e75e4ba5b2575000c0cb6305d8 (diff)
downloadscummvm-rg350-801c27bd224f20370e152372941510964a85a6c3.tar.gz
scummvm-rg350-801c27bd224f20370e152372941510964a85a6c3.tar.bz2
scummvm-rg350-801c27bd224f20370e152372941510964a85a6c3.zip
TOOLS: Exclude .o files from projects files generated by create_project
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_project/create_project.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 148cd40f0e..aa3960d042 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -798,9 +798,10 @@ bool producesObjectFile(const std::string &fileName) {
* Checks whether the give file in the specified directory is present in the given
* file list.
*
- * This function does as special match against the file list. It will not take file
- * extensions into consideration, when the extension of a file in the specified
- * directory is one of "h", "cpp", "c" or "asm".
+ * This function does as special match against the file list. Object files (.o) are
+ * excluded by default and it will not take file extensions into consideration,
+ * when the extension of a file in the specified directory is one of "h", "cpp",
+ * "c" or "asm".
*
* @param dir Parent directory of the file.
* @param fileName File name to match.
@@ -830,7 +831,9 @@ bool isInList(const std::string &dir, const std::string &fileName, const StringL
}
const std::string lastPathComponent = getLastPathComponent(*i);
- if (!producesObjectFile(fileName) && extensionName != "h") {
+ if (extensionName == "o") {
+ return false;
+ } else if (!producesObjectFile(fileName) && extensionName != "h") {
if (fileName == lastPathComponent)
return true;
} else {