[FFmpeg-devel] [PATCH] Check for bugged make
Sat Nov 8 16:10:17 CET 2008
On date Thursday 2008-10-30 23:01:50 +0100, Diego Biurrun encoded:
> On Mon, Oct 27, 2008 at 09:27:07PM +0100, Stefano Sabatini wrote:
> > Sligthy simplified.
> > Please check it, regards.
> I have very mixed feelings about this.
> > --- check-make.mak (revision 0)
> > +++ check-make.mak (revision 0)
> I don't like a separate file for this at the top level.
> > @@ -0,0 +1,14 @@
> > +# MinGW make version 3.79.1 (and earlier?) cannot handle calling a
> > +# macro within a foreach statement, we check for this behaviour
> Also, this is not at all specific to MinGW, GNU make 3.81 is required
> everywhere. Earlier versions do not work on any system AFAIR.
> > +define a
> > + $(eval var = val)
> > +endef
> > +
> > +TEST_LIST = a b
> > +$(foreach D,$(TEST_LIST),$(eval($(call a))))
> > +
> > +all:
> > +ifneq ($(var),val)
> > + @echo "Broken make utility detected. GNU make 3.81 is known to work, try with that."
> It's not known to work, it's required.
> > --- Makefile (revision 15731)
> > +++ Makefile (working copy)
> > @@ -40,8 +40,11 @@
> > -all: $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
> > +all: check-make $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
> > +check-make:
> > + @$(MAKE) -f check-make.mak
> Once again, very mixed feelings.
> I'm not sure if this is worth all the clutter. The place to detect such
> a thing is configure, if at all.
The question we have to address here is if we are *requiring* GNU make
3.81, or a compliant make utility.
As Ramiro pointed out, the user may choose to use one of the many make
variants, make < 3.81, remake, gmake etc, this also means that when
configuring configure doesn't know which is the make the user will
invoke, so there's no point into checking the "make" command.
This would make sense if we're pretending the user to run explicitely
the "make" command during the configuration, but I'm not sure if this
is a common requirement. Furthermore, if we choose to *require* GNU
make 3.81, then maybe we could simply explicitely tell this in the
INSTALL file, and avoid the clutter necessary for detecting all the
possible problems in other make versions.
Currently the only indication we give is:
|2) Then type 'make' to build FFmpeg. On BSD systems, type 'gmake'
|instead of 'make'. You may need to install GNU Make 3.81 first.
Meaningwhile I tried the FFmpeg Makefile with remake 3.80 (which is a
patched make 3.80, so maybe the same problem occurrs in make 3.80 as
well), and discovered it doesn't work in a rather painful-to-debug
way, I am adding the check in the attached patch.
BTW since check-make now contains multiple checks, to have it in a
separate Makefile looks like the only way to be able to report in one
place an error message, also I think it reduce the clutter in the main
top level Makefile.
Anyway, maybe a simpler solution would be to require the use of GNU
make 3.81, stress this in the docs, and avoid the clutter of automatic
checks which furthermore won't necessarily work for the generic
FFmpeg = Free Fiendish Mega Porno Elaborated Game
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1371 bytes
Desc: not available
More information about the ffmpeg-devel