[FFmpeg-devel] [Patch] adding 'dist' rule to makefiles

Ronald S. Bultje rsbultje
Mon Nov 12 18:08:41 CET 2007

Hi Mans,

On Nov 12, 2007 11:42 AM, M?ns Rullg?rd <mans at mansr.com> wrote:

> Ronald S. Bultje wrote:
> > On Nov 12, 2007 8:19 AM, M?ns Rullg?rd <mans at mansr.com> wrote:
> >> Dejan Sakelsak wrote:
> >> > generates a ffmpeg.tar.gz tarball in $(SRC_PATH)
> >>
> >> For what purpose?  I don't see how this adds anything of value.
> >
> > I figure you've never done any project maintainance of any kind?
> You figure wrongly.  Now, can you please explain what this patch
> would be good for?  If you can't, it is implicitly rejected.

I didn't propose the patch, but you're implying you've maintained (and thus
released) software without using make dist? Is that even possible?

Make dist is the rough equivalent of the (impossible) combination of:

make distclean
cd ..
mv project project-version
tar -zcvf project-version.tar.gz/bz2 project-version
mv project-version project
mv project-version.tar.gz/bz2 project
cd project

So in short, it creates a tarball of your current tree without cruft
(autogenerated, log files, vim backups, etc.) files.

Then there's also the equally useful make distcheck, which is absolutely
awesome. Most projects I've worked on have a requirement for tarballs to
pass make distcheck before they are released in the wild. It does something
along these lines (again, this isn't actually possible, which is why having
the command is so awesome):

make dist
tar -zxf project-version.tar.gz/bz2
cd project-version
list = ls -R
./configure && make && make destdir=_inst install && rm -fr _inst
for file in $list; do rm $file; done
make distclean
// at this point, if there's any files left, your build is broken and it
borks out

It actually does a whole lot more checks, but I guess the main point is
pretty clear.

As you can hopefully see, it automagically creates a tarball of your current
source tree without any cruft files (such as autogenerated files, logfiles
that you manually placed there but aren't part of the tree, etc.), it can
optionally do a test-build to ensure that everything is working fine (i.e.
no accidental headers missing). You can optionally include unit tests etc.,
which means that in the end, you have a single command that allows you to go
through your complete testsuite and build process and ensure it's all fine
before releasing software packages. Very useful indeed.

One of the many reasons why I keep maintaining my autotools.patch is because
of the lack of any functional equivalent of the above 2.


More information about the ffmpeg-devel mailing list