Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved When to clean up?

    Installation and Deployment
    3
    6
    904
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Lachrymology last edited by

      Hi all,

      I'm interested in the fact, when to clean up the build. I'm using the source from the archive, not from the git repro.

      I know there are two clean commands:

      nmake clean
      nmake distclean
      

      When should one of them be executed?
      ā—‹ After the chain configure, nmake, nmake install, nmake docs?

      Which of them is needed?

      What do they do?

      Best regards,
      Mike

      jsulm K 2 Replies Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @Lachrymology last edited by

        @Lachrymology See here https://www.linuxquestions.org/questions/linux-software-2/what-is-the-difference-between-make-distclean-and-make-clean-284353/
        When to call it? Well, when you don't need the build artefacts anymore.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 3
        • K
          koahnig @Lachrymology last edited by

          @Lachrymology

          distclean is used when you want to reconfigure a build of Qt. After distclean it should be the same as a fresh download and ready for new configuration and compilation. All intermediate and end results of a configuration shall be gone afterwards.

          clean is to delete intermediate results which are not required. A start of (n)make after clean will have to do typically the whole compilation of application and/or library. A rebuild is clean plus build.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply Reply Quote 3
          • L
            Lachrymology last edited by Lachrymology

            Hi @jsulm thanks for the link.

            @koahnig Thanks for the explanation.

            I went through some Makefiles of Qt now trying to understand it a bit better.

            As far as I understand it correctly:
            clean will remove all through (n)make built files like *.obj, *.exp, *.ilk, *.idb, etc. (but not all built files, because)
            distclean will remove files created through configure and (n)make too like *.bat, *.lib, *.exe, *.pdb, Makefiles, etc.

            So clean is at the end only needed to reduce HDD memory usage after the build is finished and distclean to have a new fresh build, right?

            Best regards,
            Mike

            K 1 Reply Last reply Reply Quote 0
            • K
              koahnig @Lachrymology last edited by

              @Lachrymology said in When to clean up?:

              So clean is at the end only needed to reduce HDD memory usage after the build is finished and distclean to have a new fresh build, right?

              Yes. Personally I consider distclean as more important to avoid frustration while building Qt libs with a different configuration for instance. However, I prefer to unzip code once again to ensure that nothing is left.

              A clean as stand-alone, I am rarely doing. Typically I do a rebuild.

              Coming a long way from much smaller HDD, it is amazing what today's HDD/SSDs can hold. Therefore, I tend to forget to use clean.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply Reply Quote 1
              • L
                Lachrymology last edited by

                @koahnig

                Got it. Thanks. 😊

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post