Results 1 to 4 of 4

Thread: Is it safe to delete out-of-source build files?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Is it safe to delete out-of-source build files?

    I've built Qt 5.4 from source using MSVC 2008 since binaries for that are not available to download. I did an out-of-source build into a build directory ("msvc2008_32_build"), and an install into a third directory ("msvc2008_32"). Except for two compilation errors (now fixed), everything built and installed without a hitch.

    Is it now safe to "make clean" in the build directory? (Or even to simply delete it entirely?) Is there anything in the build directory that is required to compile, link, or debug?

    Paranoid, maybe, but it takes hours to build and install from source, and I don't want to have to do it again.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Is it safe to delete out-of-source build files?

    I think that make clean should be ok (it only deletes intermediate files). I would be worried about distclean. From what I remember what is really problematic is the include files which used to point to the source directory (I don't know if they still do).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Is it safe to delete out-of-source build files?

    From what I remember what is really problematic is the include files which used to point to the source directory
    It looks like the build / install process on Windows has been improved greatly since 5.2. Then, it was almost impossible to do an out-of-source build and install didn't work at all. It looked like the configure -prefix option either wasn't working at all or worked incorrectly. (Or I was using it incorrectly).

    In 5.4, the include tree is copied from the source directory into the install directory and both build and install go cleanly. The executables (qmake, moc, etc) are also copied into the install "bin" directory.

    I don't see anything in the build directory that can't be removed through make clean. Unless something breaks, I'll consider this as solved, otherwise I will report back.

    The messages upon the end of the config step say to make "confclean" to reconfigure, but there is no such target in the Makefile. There is however a "distclean" target so maybe this is what it should be. I built both 32- and 64-bit versions, but since I am not using the 64-bit version yet I will run distclean on that and see what happens.

    Edit: make distclean removes all compilation artifacts as well as all of the Makefiles, but leaves the directory tree intact. So it will be necessary to run configure again before the distro can be rebuilt. make clean removes compilation artifacts but leaves the Makefiles and directory tree intact.
    Last edited by d_stranz; 10th February 2015 at 23:38.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Is it safe to delete out-of-source build files?

    Try simply changing the directory name of your build tree and see if the installation breaks. If not, it should be safe to remove the files completely.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. in-source-build?
    By Perduta in forum Newbie
    Replies: 1
    Last Post: 21st April 2012, 22:02
  2. safe to delete object in other thread?
    By iraytrace in forum Qt Programming
    Replies: 2
    Last Post: 21st October 2011, 22:12
  3. Replies: 1
    Last Post: 15th August 2011, 23:26
  4. How to delete created files while uninstallation??
    By ram4soft in forum General Programming
    Replies: 3
    Last Post: 6th March 2011, 12:39
  5. Mac OSX - No documentation after source build
    By rickbsgu in forum Installation and Deployment
    Replies: 0
    Last Post: 31st August 2010, 16:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.