[MPlayer-dev-eng] [PATCH] Fix 'make distclean'

Georgi Petrov gogothebee at gmail.com
Tue Feb 3 00:35:26 CET 2009


On Tue, Feb 3, 2009 at 1:31 AM, Diego Biurrun <diego at biurrun.de> wrote:
> On Tue, Feb 03, 2009 at 01:25:48AM +0200, Georgi Petrov wrote:
>> On Tue, Feb 3, 2009 at 1:20 AM, Georgi Petrov <gogothebee at gmail.com> wrote:
>> >> If that line removes the subdirectory then what removes the executable?
>> >> Isn't the line supposed to take the executable suffix into account so
>> >> that it should attempt to remove the executable, not the directory? Why
>> >> does the existing $(EXESUF) which is visible in your patch too not do
>> >> that?
>> >
>> > I realized that after I sent the patch. Yap - in my case $(EXESUF) is
>> > definitely nothing, so the command is rm -f mplayer and not rm -f
>> > mplayer.exe...
>> >
>> > Now I see. I'll continue to investigate this variable.
>>
>> Ok, I got it. The first make distclean after a successful configure
>> script includes .exe suffix. Afterwards (as expected) make distclean
>> yields to rm -f mplayer without .exe suffix.
>
> Yes.
>
>> The problem is that is for some reason you type "make" after the first
>> "make distclean" and there is a mplayer subdirectory, the tree is left
>> in unusable state. This "make" creates wrong help_mp.h, but further
>> make distcleans can't clean it, because they fail at rm -f mplayer
>> because mplayer is directory and the configure isn't run to make it
>> "rm -f mplayer.exe".
>
> You have to run configure again after distclean.  Everything else is
> undefined behavior.
>

Ok, isn't this decision wrong by design? I see what the failure is,
but isn't make distclean always (philosophically) guaranteed to work?
And the change is trivial I think, but I leave to you to decide
whether to change it or leave it this way.



More information about the MPlayer-dev-eng mailing list