Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt when building Qt from source how do I clean old configure configurations?

Tags:

qt

configure

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?

like image 352
user63898 Avatar asked May 20 '11 03:05

user63898


People also ask

How do you clean a QT build?

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".

Where is Qt configure script?

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.


3 Answers

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.

like image 141
helloworld922 Avatar answered Oct 23 '22 05:10

helloworld922


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.

like image 5
Massimo Callegari Avatar answered Oct 23 '22 06:10

Massimo Callegari


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 ....
like image 2
cmaughan Avatar answered Oct 23 '22 07:10

cmaughan