← Back to team overview

launchpad-dev team mailing list archive

Re: make clean, make distclean

 

On Mon, Aug 3, 2009 at 5:08 PM, Maris Fogels<maris.fogels@xxxxxxxxxxxxx> wrote:
> Hi everyone,
>
> So I've noticed some people have had problems with the initial build, and
> the first thing they try is 'make clean'.  However, this doesn't do what
> they expect: instead of resetting the build, it just resets the application
> state. Subsequent attempts to use 'make' still fail, because the build
> artifacts are still broken.
>
> So, to make things easier for our developers, should we follow a more
> standard set of behaviours for our Makefile targets?
>
> From the GNU Coding Standards: Standard Targets:
> http://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets
>> 'clean'
> Delete all files in the current directory that are normally created by
> building the program. Also delete files in other directories if they are
> created by this makefile. However, don't delete the files that record the
> configuration. Also preserve files that could be made by building, but
> normally aren't because the distribution comes with them.
>
> 'distclean'
> Delete all files in the current directory (or created by this makefile) that
> are created by configuring or building the program. If you have unpacked the
> source and built the program without creating any other files, ‘make
> distclean’ should leave only the files that were in the distribution.
>
> The standard defines 'mostlyclean' and 'maintainer-clean' targets as well.
>
> As an example of how this would help, when someone tells us "It says I have
> an error with foo.egg", we can simply tell them to run 'make distclean;
> make', and everything will be reset as expected.
>
> Should we make this change?
>

I say 'yes'. We need to do it from time to time, so why not automate it.

I also reckon that simple changes like this one should be accompanied
by patches, since it helps the change happen without losing that much
time if we decide not to do it.

jml



References