From 5a5f1f13bf005b66ce6400fa51dd9a40bedadd3a Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Fri, 21 Apr 2017 14:34:02 +0200
Subject: [PATCH] Improve distclean

Remove our manually generated configuration files on make distclean.

Task-number: QTBUG-60235
Change-Id: I8b851fa80e1c17ea6ede9efb6ba0d2f108026db8
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
---
 mkspecs/features/gn_generator.prf   | 2 ++
 qtwebengine.pro                     | 2 ++
 src/buildtools/configure_target.pro | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf
index 91c045cfa..1f730acd0 100644
--- a/mkspecs/features/gn_generator.prf
+++ b/mkspecs/features/gn_generator.prf
@@ -242,3 +242,5 @@ TEMPLATE = aux
 SOURCES =
 HEADERS =
 RESOURCES =
+
+QMAKE_DISTCLEAN += $$GN_FILE
diff --git a/qtwebengine.pro b/qtwebengine.pro
index c8f3555e3..5ae80ea8c 100644
--- a/qtwebengine.pro
+++ b/qtwebengine.pro
@@ -13,6 +13,8 @@ isPlatformSupported() {
     log(QtWebEngine will not be built.$${EOL})
 }
 
+QMAKE_DISTCLEAN += .qmake.cache
+
 OTHER_FILES = \
     tools/buildscripts/* \
     tools/scripts/* \
diff --git a/src/buildtools/configure_target.pro b/src/buildtools/configure_target.pro
index 6ec914dd5..31aa283f6 100644
--- a/src/buildtools/configure_target.pro
+++ b/src/buildtools/configure_target.pro
@@ -29,3 +29,5 @@ GN_FILE = $$OUT_PWD/../toolchain/BUILD.gn
 !build_pass {
     write_file($$GN_FILE, GN_CONTENTS, append)
 }
+
+QMAKE_DISTCLEAN += $$GN_FILE
-- 
GitLab