When to clean up?
-
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 -
@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. -
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.
-
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 -
@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.
-
Got it. Thanks. š