summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-01-29 16:19:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 22:09:42 +0100
commit604849018dc48736b7304521ecc04aa26a053ce4 (patch)
treeb99d5a099dfab3192ca1ad02f5c8ae21d046fdee /qmake/generators
parent8e1cc7043ff53353187f5617af9b75d49e802013 (diff)
qmake: Add DISTCLEAN_DEPS variable
This variable works like CLEAN_DEPS, but applies to the distclean target. Change-Id: Ia30e8932b9acd6529298728dd5d0e038b0208d66 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--qmake/generators/unix/unixmake2.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 83d38d1b14..fe8d289a7c 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2617,6 +2617,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << varGlue("ALL_DEPS"," "," ","");
if(suffix == "clean")
t << varGlue("CLEAN_DEPS"," "," ","");
+ else if (suffix == "distclean")
+ t << varGlue("DISTCLEAN_DEPS"," "," ","");
t << " FORCE\n";
if(suffix == "clean") {
t << fileVarGlue("QMAKE_CLEAN", "\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "\n");
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index eb68614fe6..2ee9110b01 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -908,7 +908,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
ProString destdir = project->first("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 de243e4394..484062d56e 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) {