diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 83d38d1b146..fe8d289a7c0 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2617,6 +2617,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListfirst("DESTDIR"); if (!destdir.isEmpty() && !destdir.endsWith(Option::dir_sep)) destdir += Option::dir_sep; - t << "distclean: clean\n"; + t << "distclean: clean " << var("DISTCLEAN_DEPS") << '\n'; if(!project->isEmpty("QMAKE_BUNDLE")) { QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE")); t << "\t-$(DEL_FILE) -r " << bundlePath << endl; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index de243e43949..484062d56e4 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -565,7 +565,7 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t) } t << endl << endl; - t << "distclean: clean"; + t << "distclean: clean " << var("DISTCLEAN_DEPS"); { const char *clean_targets[] = { "QMAKE_DISTCLEAN", 0 }; for(int i = 0; clean_targets[i]; ++i) {