On 01/04/2017 07:20 PM, Patrick Schleizer wrote: > as upstream, does it make sense to run 'make clean' when running 'make all'?
Typically it doesn't because it breaks incremental builds, which makes development uglier. (You have to rebuild everything everytime you call 'make'.) For the purpose of Debian packages it doesn't matter though, as long as you call clean _before_ building the rest. > Would that be considered good or bad? Any convention on that? The typical Makefile convention is: - Build stuff via: make all or simply make Should be idempotent, so multiple calls after another should work. - Clean the build directory: make clean Should also be idempotent, calling this in an already cleaned tree should change nothing. - Install the software: make install - Install the software but underneath a specific tree make install DESTDIR=/tmp/build/install Now technically calling make clean at the beginning of the build step doesn't have to break idempotence if you do it right - but I would still recommend against it because it makes developing the software much more painful. Doesn't really matter for Debian though, because Debian builds the entire package from scratch anyway. Regards, Christian