[MPlayer-dev-eng] [PATCH] allow make -r to work

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Feb 16 07:38:51 CET 2010


On Tue, Feb 16, 2010 at 03:35:33AM +0100, Gianluigi Tiesi wrote:
> On Mon, Feb 15, 2010 at 11:01:20PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > we currently rely on several implicit rules, so make -r actually does
> > not compile at all.
> > Patch below fixes the cases I know of, any objections?
> > Index: Makefile
> > ===================================================================
> > --- Makefile	(revision 30589)
> > +++ Makefile	(working copy)
> > @@ -836,6 +836,15 @@
> >  %.ho: %.h
> >  	$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
> >  
> > +%.o: %.S
> > +	$(CC) $(ASFLAGS) -c -o $@ $<
> > +
> > +%.o: %.c
> > +	$(CC) $(CFLAGS) -c -o $@ $<
> > +
> > +%.o: %.cpp
> > +	$(CC) $(CXXFLAGS) -c -o $@ $<
> > +
> >  %.o: %.m
> >  	$(CC) $(CFLAGS) -c -o $@ $<
> >  
> 
> I still have problems on msys with the -rc.o rule
> %-rc.o: %.rc
>     $(WINDRES) -I. $< $@

That's what above together with make -r fixes.

> gcc osdep/mplayer.rc.o   -o osdep/mplayer.rc
> gcc.exe: osdep/mplayer.rc.o: No such file or directory
> gcc.exe: no input files
> make: *** [osdep/mplayer.rc] Error 1
> 
> GNU Make 3.81
> 
> looks like make is confused about .o and -rc.o
> I think .o matches before -rc.o

No, it's just plain completely broken, there's no other way to describe that
it tries to recreate an existing and up-to-date file from one that does not
even exist and has the wrong extension (it tries to link the non-existent
osdep/mplayer.rc.o into an executable osdep/mplayer.rc).



More information about the MPlayer-dev-eng mailing list