[MPlayer-dev-eng] [RFC] run only toplevel FFmpeg makefile

Diego Biurrun diego at biurrun.de
Sun Jun 26 22:52:11 CEST 2011


On Sun, Jun 26, 2011 at 08:40:07PM +0200, Reimar Döffinger wrote:
> On Sun, Jun 26, 2011 at 03:51:58PM +0200, Diego Biurrun wrote:
> > On Sun, Jun 26, 2011 at 11:49:52AM +0200, Reimar Döffinger wrote:
> > > On Sun, Jun 26, 2011 at 11:32:42AM +0200, Reimar Döffinger wrote:
> > > > While I consider the sublevel Makefiles really valuable and very much
> > > > want to keep them working, I am not sure if there's any real interest.
> > > > In case that not, I want to propose attached patch for review so
> > > > that MPlayer will continue to build.
> > > 
> > > Sorry, uglier but closer to the current code and actually working
> > > with parallel build.
> > >  
> > > --- Makefile	(revision 33727)
> > > +++ Makefile	(working copy)
> > > @@ -807,7 +807,7 @@
> > >  
> > >  $(FFMPEGLIBS): $(FFMPEGFILES) config.h
> > > -	$(MAKE) -C $(@D)
> > > +	$(MAKE) -C ffmpeg $(shell echo $@ | sed -e s#ffmpeg/##)
> > 
> > Make works but text transformation and substitution.  If you need to
> > use the shell for such operations you are doing something wrong, have
> > a look at
> > 
> > http://www.gnu.org/software/make/manual/html_node/Text-Functions.html#Text-Functions
> 
> Well, there were several reasons it was [RFC] not [PATCH], I just
> got a bit tired trying to find the right stuff in the manual.

Any of the following should do what you intended:

$(MAKE) -C ffmpeg $($@:ffmpeg/%:%)
$(MAKE) -C ffmpeg $(patsubst ffmpeg/,,$@)
$(MAKE) -C ffmpeg $(subst ffmpeg/,,$@)

> Concerning the subdir build: Considering how much the lack of it
> interrupts my workflow and annoys me when I code stuff I think
> I'd rather try to keep it around a while longer.

I know how hard it is to say this without sounding both arrogant and
preachy, but you should change your workflow then.  Just invoke make
from the top level or pass the name of the target you want to build
as argument, e.g.

  make libavcodec/libavcodec.a

That should have about the same effect as a subdir build, but work
correctly.

And now I am going to shut up and not bother you about it anymore.

Diego


More information about the MPlayer-dev-eng mailing list