I'm compiling Qt from source, but I don't want to extract the source each time I want to build it.
How can I clean previous configuration with the configure tool?
To clean everything, you normally want to run make distclean in your Qt project directory. To do that you can run that command directly from the command line, or look in Build Settings >> Clean Steps and change the make arguments from "clean" to "distclean".
12.1\, the source code of Qt will be installed in directory c:\Qt5. 12.1\5.12. 1\Src\. There you can find the configure scripts: configure(for Linux) and configure.
For Qt4 and earlier, try this:
nmake confclean
You can then re-configure and re-compile QT.
As noted in the comments, this no longer works in QT 5. This is due to the fact that the Qt project now uses separate sub-modules for different parts. If you have a local clone of the Qt git repos, you can try calling this from the main Qt directory:
git submodule foreach --recursive "git clean -dfx"
As noted here, there may be some problems if you have a downloaded source archive. The link I posted suggests using a shadow build instead so the process of making a clean configuration is as simple as configuring to build at a new shadow build destination.
As of today (Qt 5.9.0 beta2) there is no confclean
target in Linux, and you need to manually remove .config.cache
file to reconfigure.
Note that make distclean
doesn't help at all.
For the latest versions, use a shadow build, then you can just nuke your directory. My batch file for configuring effectively creates a new folder, moves into it, then calls configure. Then you just go into the shadow directory and run 'jom'. When you want to make a different configuration, just use a different shadow directory. This effectively means that your source tree doesn't get filled with build artifacts, which are impossible to remove when you want a different configuration. Trust me, this is the thing to do....
mkdir shadow_dir
cd shadow_dir
%~dp0\src\configure.bat ....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With