diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp
index a1fea7247f90f1cbad0d8d6278574b3e24291a31..33d330139f0cbc36dbd02082f0a3ed9073e9c5f3 100644
--- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp
+++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp
@@ -360,7 +360,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables)
         // Get all values of a line separated by spaces.
         // Values representing a variable like $(value) get
         // removed currently.
-        QStringList lineValues = m_line.split(QLatin1Char(' '));
+        QStringList lineValues = m_line.split(QLatin1Char(' '), QString::SkipEmptyParts);
         QStringList::iterator it = lineValues.begin();
         while (it != lineValues.end()) {
             if ((*it).startsWith(QLatin1String("$("))) {