[MPlayer-dev-eng] [PATCH] Fix 'make distclean'
Diego Biurrun
diego at biurrun.de
Thu Feb 12 13:28:44 CET 2009
On Thu, Feb 12, 2009 at 01:24:05PM +0100, Diego Biurrun wrote:
> On Tue, Feb 03, 2009 at 02:01:43PM +0100, Reimar Döffinger wrote:
> > On Tue, Feb 03, 2009 at 01:32:01PM +0100, Diego Biurrun wrote:
> > > On Tue, Feb 03, 2009 at 02:02:37AM +0200, Georgi Petrov wrote:
> > > > On Tue, Feb 3, 2009 at 1:53 AM, Reimar Döffinger
> > > > <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > > > > On Tue, Feb 03, 2009 at 12:31:43AM +0100, Diego Biurrun wrote:
> > > > >> You have to run configure again after distclean. Everything else is
> > > > >> undefined behavior.
> > > > >
> > > > > I'd be thankful if you could find time to make things more reliable, two suggestions:
> > > > > 1) Ignore rm failure
> > > >
> > > > This one will be enough to perform correct distclean at least on my
> > > > environment.
> > >
> > > No, it would *not* be correct in your environment as it would not
> > > remove the binaries as it is supposed to. It might run without
> > > returning an error. In this case, this is opposite from running
> > > correctly.
> >
> > Well, in ordinary usage this only happens when they were already
> > removed.
> > While it would actually make things worse for this case, clean could
> > just remove _all_ exesuf, i.e. mplayer, mplayer.exe and whatever,
> > because the current method will fail to clean stuff when you first
> > cross-compiled for mingw and then configured for linux.
>
> I just implemented this.
>
> > > Errors are not to be ignored. The fact that distclean printed an error
> > > should tell you something.
> >
> > If MPlayer did not create a new folder in the current directory, there
> > would not be an error and it would still fail to delete e.g. mplayer.exe.
> > If you know a way to make "make" record the error but still delete all
> > the other files that would of course be preferable. Not being able to
> > easily get rid of all those .o files just because you can't/don't want
> > to run configure is a bit annoying...
>
> Can you try prefixing the rm commands with '-'? Does that solve the
> problem for you?
Also, the .o files are removed before the binaries anyway ...
Diego
More information about the MPlayer-dev-eng
mailing list