[FFmpeg-devel] [PATCH] Speedup make removing implicit rules for makefiles and dependencies (cure for slow "make" in MSYS+MinGW)

Adam Strzelecki ono
Wed Oct 28 17:54:13 CET 2009


@Reimar:

> I assume Ramiro tested with MinGW and his numbers seem to contradict
> your conclusions.
> Are you sure you don't just have a broken make version?

Okay I think I know where's the problem. I got "make clean" but not  
"make distclean" sandbox, so all .d dependency files are still there.
Without .d files indeed it runs quick (for a first time). You got a  
point. The problem raises when .d files are already there, NOT when  
they do not exists (as I supposed initially) and this is the moment  
you do "make" after "make clean" or alternatively "make install" after  
"make". In both cases you gonna wait good while until something  
actually happens. (Please check that).

I have absolutely no idea why GNU Make tries to regenerate/build(?)  
using built-in implicit rules each Makefile it parses (or includes)...  
which in case of FFmpeg those are Makefile, common.mak, subdir.mak,  
config.mak and all .d files. Do you have any? Try "make -d" with empty  
"test.mak" file and following "Makefile":
--------- CUT -----------
all:
	echo 'HI!'

include test.mak
--------- CUT -----------

"make -d" dumps lots of:
Trying implicit prerequisite `Makefile.lm,v'.
or:
Trying implicit prerequisite `test.mak.web'.

Which means it tests existence of all those files. What for? Anyway in  
case of Windoze this is pretty slow & lazy. I learned this fancy  
behavior few days ago trying to help guys building my project on MinGW.

@M?ns:

Please don't get offended by all what I say. I am sure you know how  
the make works, and my intention was not to negate it, but just wanted  
(you) to focus on exceptional MSYS+MinGW make case which may be PIA  
for all of those who want to work on FFmpeg on Windoze, rather than  
immediately rejecting my patch.

>> But unfortunately there are people building FFmpeg on Win,
>
> Unfortunate for them.  Some people smoke, and may die from it, too.

This is what I think too, but I would like them to stop whining that  
"make install" or "make" for cleaned (not distcleaned) FFmpeg sandbox  
hangs for ages.
Even I wish to, telling them use cross-compiler on Linux is no  
solution here.

> I just tried it on a windows machine, and "make" on a freshly built
> tree takes 1.1 seconds.  "make -r" takes 0.6 seconds.

Can you please retry "make" when .d files are already there (after we  
built it and "make clean") or try "make install" after "make" on MinGW?

Regards,
-- 
Adam



More information about the ffmpeg-devel mailing list