Qt when builing Qt from source how do i clean old configure configurations?



  • im compiling Qt from source , but i dont want to extract the source each time i want to build it how can i clean previous configuration whit the configure tool?



  • @
    make confclean
    @

    should do it.



  • Im building Qt 5.0from source and when trying to re-run configure, I get an error: Don't know how to make confclean. I am using Qt 5.0.0 (MSVC) source from download page. The only option is to call nmake distclean which is a bigger process.


  • Moderators

    Qt 5 doesn't support `make confclean' anymore because the modules are split into separate repositories (http://qt-project.org/wiki/Qt_5_Structure ). In contrast, Qt 4 had everything in 1 repository.

    From your Qt 5 root, call:
    @
    git submodule foreach --recursive "git clean -dfx"
    @

    That command calls git clean -dfx' on every Git submodule, which cleans out everything. Then, you can runconfigure' again.



  • That of course requires a git clone rather than a copy of the source from the downloads page.

    See http://qt-project.org/wiki/Building_Qt_5_from_Git for details.


  • Moderators

    [quote author="ZapB" date="1359535613"]That of course requires a git clone rather than a copy of the source from the downloads page.[/quote]Ah... I forgot that bit.



  • [quote author="ZapB" date="1359535613"]That of course requires a git clone rather than a copy of the source from the downloads page.

    See http://qt-project.org/wiki/Building_Qt_5_from_Git for details.[/quote]

    If the only way to get a clean and error free build is to use a git clone then the source zip and tarballs should be removed. I've used that for several minor versions of 4 and it has served me well.



  • Why don't you just use a shadow build? This way your source tree will be always clean.



  • [quote author="Lukas Geyer" date="1359557768"]Why don't you just use a shadow build? This way your source tree will be always clean.[/quote]

    Shadow or direct doesn't speak to the issue of not being able to perform a build.



  • The question was about how to get a clean source tree, wasn't it?

    And one answer is: use a shadow bulid, because then your source tree will never be altered. And if something goes wrong with the build just create another clean and error free shadow build from the still clean source tree.

    You can shadow build the source tarball and a git clone.



  • [quote author="Lukas Geyer" date="1359561159"]The question was about how to get a clean source tree, wasn't it?

    And one answer is: use a shadow bulid, because then your source tree will never be altered. And if something goes wrong with the build just create another clean and error free shadow build from the still clean source tree.

    You can shadow build the source tarball and a git clone.[/quote]

    Fair enough, thanks.



  • I used nmake clean. It worked. nmake confclean was also not working in Qt4.8.



  • @git submodule foreach --recursive "git clean -dfx"@
    works for me!
    Thanks JKSH~



  • @astodolski Shadow builds (even today in Qt 5.7.1) don't work properly in Windows; they don't install correctly. While one could use the shadow build directory directly, that eats disk space and causes warnings in QtCreator.



  • I should have added: In 5.7.1, the correct clean command is "nmake distclean", even though configure says to use "nmake confclean" (which doesn't exist in the Makefile). The "distclean" target is buggy on Windows; it tries to use files (particularly config files) after it's removed them, and as a result doesn't successfully clean the directory. It also fails to pass along make switches that would work around the issue (/K) to child instances of nmake/jom, making it impossible to bypass the problem.

    Shadow builds fail in Windows because the -prefix argument to configure is ignored if run that way; so you can build Qt but not install it. It tries to install back into the source directory, provoking all sorts of complaints.



  • using "nmake distclean" or "nmake clean" will take a lot of time, instead you should use GIT or deleting then unpacking qt-everywhere-opensource-src-5.7.1 is 10 times faster.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.