diff options
-rw-r--r-- | mkspecs/features/qt_module_headers.prf | 7 | ||||
-rw-r--r-- | mkspecs/features/qt_parts.prf | 18 | ||||
-rw-r--r-- | qmake/Makefile.unix | 2 | ||||
-rw-r--r-- | qmake/Makefile.win32 | 4 | ||||
-rw-r--r-- | qtbase.pro | 86 | ||||
-rw-r--r-- | tests/auto/corelib/io/qresourceengine/qresourceengine.pro | 1 |
6 files changed, 62 insertions, 56 deletions
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index aed04c3c1c..3f2383c120 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -24,6 +24,10 @@ load(qt_build_paths) -outdir $$system_quote($$MODULE_BASE_OUTDIR) $$MODULE_SYNCQT_DIR !silent: message($$QMAKE_SYNCQT) system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") + + include-distclean.commands = $$QMAKE_DEL_TREE $$shell_quote($$shell_path($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME)) + QMAKE_EXTRA_TARGETS += include-distclean + DISTCLEAN_DEPS += include-distclean } minimal_syncqt: return() @@ -41,11 +45,13 @@ for (injection, SYNCQT.INJECTIONS) { MAIN_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$fwd_hdr MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$member(injects, 0)"' write_file($$MAIN_FWD, MAIN_FWD_CONT)|error("Aborting.") + !git_build: QMAKE_DISTCLEAN += $$MAIN_FWD injects = $$member(injects, 2, -1) for (inject, injects) { CLASS_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$inject CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"' write_file($$CLASS_FWD, CLASS_FWD_CONT)|error("Aborting.") + !git_build: QMAKE_DISTCLEAN += $$CLASS_FWD } } @@ -65,6 +71,7 @@ MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MOD } MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif" write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error("Aborting.") + !git_build: QMAKE_DISTCLEAN += $$MODULE_MASTER_DEPS_HEADER } SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf index fee711aeb8..877bd60321 100644 --- a/mkspecs/features/qt_parts.prf +++ b/mkspecs/features/qt_parts.prf @@ -71,3 +71,21 @@ exists($$_PRO_FILE_PWD_/tests/tests.pro) { QT_BUILD_PARTS -= libs tools examples tests !isEmpty(QT_BUILD_PARTS): warning("Unknown build part(s): $$QT_BUILD_PARTS") + +QMAKE_DISTCLEAN += \ + .qmake.cache \ + config.log \ + mkspecs/modules/*.pri \ + mkspecs/modules-inst/*.pri + +tests = $$files($$_PRO_FILE_PWD_/config.tests/*.pro, true) +testdirs = +for (t, tests): \ + testdirs += $$relative_path($$dirname(t), $$_PRO_FILE_PWD_) +testdirs = $$unique(testdirs) +for (td, testdirs) { + t = $$basename(td)-distclean + $${t}.commands = -cd $$shell_path($$td) && $(MAKE) distclean + QMAKE_EXTRA_TARGETS += $$t + DISTCLEAN_DEPS += $$t +} diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 873d65a97c..86f884fe20 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -123,9 +123,11 @@ clean:: distclean:: clean $(RM_RF) .deps $(RM_F) $(BUILD_PATH)/bin/qmake$(EXEEXT) + $(RM_F) Makefile depend: makedepend -D__MAKEDEPEND__ $(CPPFLAGS) $(DEPEND_SRC) + $(RM_F) Makefile.bak ioutils.o: $(QMKLIBSRC)/ioutils.cpp diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index f84c30d4af..9dda6ca1e7 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -140,7 +140,9 @@ clean:: -del qmake.tds distclean:: clean - -del qmake + -del qmake.exe + -del $(BUILD_PATH)\bin\qmake.exe + -del Makefile .c.obj: $(CXX) $(CFLAGS) $< diff --git a/qtbase.pro b/qtbase.pro index 6d0de44f6d..bae2641404 100644 --- a/qtbase.pro +++ b/qtbase.pro @@ -8,62 +8,30 @@ SUBDIRS += qmake/qmake-docs.pro cross_compile: CONFIG += nostrip -confclean.depends += clean -confclean.commands = -unix { - confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \ - (cd config.tests/unix/ptrsize && $(MAKE) distclean); \ - (cd config.tests/x11/notype && $(MAKE) distclean); \ - (cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \ - (cd config.tests/unix/cups && $(MAKE) distclean); \ - (cd config.tests/unix/psql && $(MAKE) distclean); \ - (cd config.tests/unix/mysql && $(MAKE) distclean); \ - (cd config.tests/unix/mysql_r && $(MAKE) distclean); \ - (cd config.tests/unix/nis && $(MAKE) distclean); \ - (cd config.tests/unix/iodbc && $(MAKE) distclean); \ - (cd config.tests/unix/odbc && $(MAKE) distclean); \ - (cd config.tests/unix/oci && $(MAKE) distclean); \ - (cd config.tests/unix/tds && $(MAKE) distclean); \ - (cd config.tests/unix/db2 && $(MAKE) distclean); \ - (cd config.tests/unix/ibase && $(MAKE) distclean); \ - (cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \ - (cd config.tests/unix/zlib && $(MAKE) distclean); \ - (cd config.tests/unix/sqlite2 && $(MAKE) distclean); \ - (cd config.tests/unix/libjpeg && $(MAKE) distclean); \ - (cd config.tests/unix/libpng && $(MAKE) distclean); \ - (cd config.tests/unix/slog2 && $(MAKE) distclean); \ - (cd config.tests/unix/lgmon && $(MAKE) distclean); \ - (cd config.tests/x11/xcursor && $(MAKE) distclean); \ - (cd config.tests/x11/xrender && $(MAKE) distclean); \ - (cd config.tests/x11/xrandr && $(MAKE) distclean); \ - (cd config.tests/x11/xkb && $(MAKE) distclean); \ - (cd config.tests/x11/xinput && $(MAKE) distclean); \ - (cd config.tests/x11/fontconfig && $(MAKE) distclean); \ - (cd config.tests/x11/xinerama && $(MAKE) distclean); \ - (cd config.tests/x11/xshape && $(MAKE) distclean); \ - (cd config.tests/x11/opengl && $(MAKE) distclean); \ - $(DEL_FILE) config.tests/.qmake.cache; \ - $(DEL_FILE) src/corelib/global/qconfig.h; \ - $(DEL_FILE) src/corelib/global/qconfig.cpp; \ - $(DEL_FILE) mkspecs/qconfig.pri; \ - $(DEL_FILE) mkspecs/qdevice.pri; \ - $(DEL_FILE) mkspecs/qmodule.pri; \ - $(DEL_FILE) .qmake.cache; \ - (cd qmake && $(MAKE) distclean); -} -win32 { - confclean.commands += -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \ - -$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \ - -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \ - -$(DEL_FILE) mkspecs\\qdevice.pri $$escape_expand(\\n\\t) \ - -$(DEL_FILE) mkspecs\\qmodule.pri $$escape_expand(\\n\\t) \ - -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \ - (cd qmake && $(MAKE) distclean) -} +confclean.depends += distclean +confclean.commands = echo The confclean target is obsolete. Please use distclean instead. QMAKE_EXTRA_TARGETS += confclean -qmakeclean.commands += (cd qmake && $(MAKE) clean) -QMAKE_EXTRA_TARGETS += qmakeclean -CLEAN_DEPS += qmakeclean + +qmake-clean.commands += (cd qmake && $(MAKE) clean) +QMAKE_EXTRA_TARGETS += qmake-clean +CLEAN_DEPS += qmake-clean + +# We don't distclean qmake, as it may be needed for rebuilding Makefiles as a +# recursive distclean proceeds, including beyond qtbase. +DISTCLEAN_DEPS += qmake-clean + +# Files created by configure. +# config.status (and configure.cache, which is the same for Windows) +# are omitted for convenience of rebuilds. +QMAKE_DISTCLEAN += \ + config.summary \ + config.tests/.qmake.cache \ + mkspecs/qconfig.pri \ + mkspecs/qdevice.pri \ + mkspecs/qmodule.pri \ + src/corelib/global/qconfig.h \ + src/corelib/global/qconfig.cpp \ + bin/qt.conf CONFIG -= qt @@ -186,6 +154,14 @@ FWD_QTCONFIG = \ '$${LITERAL_HASH}include "qconfig.h"' write_file($$OUT_PWD/include/QtCore/QtConfig, FWD_QTCONFIG)|error("Aborting.") +# Files created by us +QMAKE_DISTCLEAN += \ + src/corelib/global/qfeatures.h \ + include/QtCore/qfeatures.h \ + mkspecs/qfeatures.pri \ + include/QtCore/qconfig.h \ + include/QtCore/QtConfig + #mkspecs mkspecs.path = $$[QT_HOST_DATA]/mkspecs mkspecs.files = \ diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro index 92d0952b89..64f5cb46e0 100644 --- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro +++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro @@ -10,6 +10,7 @@ runtime_resource.depends = $$PWD/testqrc/test.qrc runtime_resource.commands = $$QMAKE_RCC -root /runtime_resource/ -binary $${runtime_resource.depends} -o $${runtime_resource.target} QMAKE_EXTRA_TARGETS = runtime_resource PRE_TARGETDEPS += $${runtime_resource.target} +QMAKE_DISTCLEAN += $${runtime_resource.target} TESTDATA += \ parentdir.txt \ |