[MPlayer-dev-eng] [PATCH] make clean should remove all files generated by make

Diego Biurrun diego at biurrun.de
Thu Sep 27 11:16:22 CEST 2012


On Mon, Sep 24, 2012 at 07:32:06PM +0200, Reimar Döffinger wrote:
> I don't know what the idea behind the current split between "clean"
> and "distclean" is.
> But IMHO "make clean" should remove all files that "make" can
> regenerate, only leaving stuff e.g. generated by configure.
> Do you agree?

That's the basic idea.

> --- Makefile	(revision 35213)
> +++ Makefile	(working copy)
> @@ -972,17 +972,17 @@
>  clean:
>  	-$(MAKE) -C ffmpeg $@
>  	-rm -rf tests/res
> -	-rm -f $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~)
> +	-rm -f $(call ADD_ALL_DIRS,/*.o /*.d /*.a /*.ho /*~)

Removing .d files on distclean is probably a leftover from the times when
.d files were not generated as a sideeffect of compilation and generating
them all at every make invocation was costly.

>  distclean: clean testsclean toolsclean driversclean dhahelperclean

Arguably clean should depend on all these targets for consistency.
It depends on whether you want the clean target to remove everything
generated by the default target or by all targets.

Diego


More information about the MPlayer-dev-eng mailing list