summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>2011-10-20 10:53:28 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-20 16:49:24 +0200
commitd74bb06079428b8581f7fc2a7e3a855fa0c1e8c1 (patch)
tree174a17eed49c02ac9f63a621cb4f094b2fe2f8d1 /qmake/generators
parentce5adc76847edf10dc843f5c93485e393f0ca099 (diff)
Generate dependencies for moc_ style includes when using CONFIG+=GNUmake
Sometimes you will include "moc_foo.cpp" from a a cpp file, not to tell qmake to run moc on it (that's handled by having foo.h in HEADERS), but so that the moc'ed sources are compiled as part of foo.cpp instead of a separate compilation unit, or if the moc'ed sources need defintions from the cpp file. The dependency logic for CONFIG+=GNUmake failed to take this case into account, resulting in failures to find files when generating dependency information for those files. Change-Id: Iac00424e2d196b518b1ef576d7567335b8ff24f0 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/unix/unixmake2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 70a7d66a9b..2037e3f368 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -323,7 +323,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!d_file.isEmpty()) {
d_file = odir + ".deps/" + fileFixify(d_file, pwd, Option::output_dir) + ".d";
- QStringList deps = findDependencies((*it)).filter(QRegExp(Option::cpp_moc_ext + "$"));
+ QStringList deps = findDependencies((*it)).filter(QRegExp(
+ "((^|/)" + Option::h_moc_mod + "|" + Option::cpp_moc_ext + "$)"));
if(!deps.isEmpty())
t << d_file << ": " << deps.join(" ") << endl;
t << "-include " << d_file << endl;