diff options
-rw-r--r-- | mkspecs/features/resources.prf | 1 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 13 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 9 |
3 files changed, 18 insertions, 5 deletions
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index a305a4f0eb..47e718807e 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -22,6 +22,7 @@ resource_combine { } rcc.commands = "$$QMAKE_RCC" $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}" -o "${QMAKE_FILE_OUT}" rcc.depend_command = "$$QMAKE_RCC" -list $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}" +rcc.CONFIG += add_inputs_as_makefile_deps rcc.input = RESOURCES rcc.variable_out = SOURCES rcc.name = RCC ${QMAKE_FILE_IN} diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index c7ea592cc0..d08f214c0c 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -604,6 +604,8 @@ MakefileGenerator::init() compiler.flags |= Compiler::CompilerRemoveNoExist; if(v[(*it) + ".CONFIG"].indexOf("no_dependencies") != -1) compiler.flags |= Compiler::CompilerNoCheckDeps; + if(v[(*it) + ".CONFIG"].indexOf("add_inputs_as_makefile_deps") != -1) + compiler.flags |= Compiler::CompilerAddInputsAsMakefileDeps; QString dep_type; if(!project->isEmpty((*it) + ".dependency_type")) @@ -766,9 +768,18 @@ MakefileGenerator::init() //add to dependency engine for(x = 0; x < compilers.count(); ++x) { const MakefileGenerator::Compiler &comp = compilers.at(x); - if(!(comp.flags & Compiler::CompilerNoCheckDeps)) + if(!(comp.flags & Compiler::CompilerNoCheckDeps)) { addSourceFiles(v[comp.variable_in], QMakeSourceFileInfo::SEEK_DEPS, (QMakeSourceFileInfo::SourceFileType)comp.type); + + if (comp.flags & Compiler::CompilerAddInputsAsMakefileDeps) { + QStringList &l = v[comp.variable_in]; + for (int i=0; i < l.size(); ++i) { + if(v["QMAKE_INTERNAL_INCLUDED_FILES"].indexOf(l.at(i)) == -1) + v["QMAKE_INTERNAL_INCLUDED_FILES"].append(l.at(i)); + } + } + } } } diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index df718f9cb4..26b5f0e659 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -159,10 +159,11 @@ protected: { QString variable_in; enum CompilerFlag { - CompilerNoFlags = 0x00, - CompilerBuiltin = 0x01, - CompilerNoCheckDeps = 0x02, - CompilerRemoveNoExist = 0x04 + CompilerNoFlags = 0x00, + CompilerBuiltin = 0x01, + CompilerNoCheckDeps = 0x02, + CompilerRemoveNoExist = 0x04, + CompilerAddInputsAsMakefileDeps = 0x08 }; uint flags, type; }; |