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

Ramiro Polla ramiro.polla
Wed Oct 28 01:57:24 CET 2009


Hi,

On Tue, Oct 27, 2009 at 8:28 PM, Adam Strzelecki <ono at java.pl> wrote:
> Lately I was obliged to make sure one of my multiplatform projects using
> FFmpeg compiles well on MinGW. Then I found out the "make" takes AGES in
> MSYS+MinGW. All because "include *.dep" causes implicit rules on .d files
> (checkout "make -d"), while file testing on UNIX is pretty cheap, it's not
> in Windoze.
> So here's a cure that really speeds up "make" in Windoze, and of course on
> other systems, however the speed up not so significant on UNIX.
> (1) Puts all dependency files to .PHONY, which cancels implicit rules
> (2) Define empty rules for Makefile, common.mak, subdir.mak & config.mak
> that cancels implicit rules also for those files
> (3) Define empty rules for .svn/entries & version.sh... as above

Like Mans said, this certainly won't go into FFmpeg SVN.

But I was curious of this speedup, so I tried it. Building the entire
tree with previously ccached objects gave no measurable speedup for
"make", "make -r", and your patch (all went about 4.2 minutes). All
deviations were inside stddev. This might be because this was running
under VirtualBox. Building a tree that was already entirely built (so
only make was run and it didn't compile anything) I got no speedup
with your patch but "make -r" made the time go from 19s to 2s.

Adam, what speedup did you measure and how?

Mans, is it safe to run "make -r"? If so I'll probably add it to the FATE boxes.

Ramiro Polla



More information about the ffmpeg-devel mailing list