diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf
index 91c045cfadcc280750c8afb25c12a9bc8c309ab0..1f730acd09348dda202a203b65aaaeef9834008c 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 c8f3555e33e7370b7044cbb0dd49c6696ce0b60f..5ae80ea8cb8a508336a0585567f6ec06aee2b64e 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 6ec914dd5565f694ad06e74a11455aa45cc1d724..31aa283f6614363b0493b7f076c5d6ad9fc6867b 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