Making a Tarball
Once the package correctly autotool’ed and configured
(Bootstrapping the Package), run make distcheck
to build
the tarball. Contrary to a simple dist
, distcheck
makes
sure everything will work properly. In particular it:
performs some simple checks. For instance, it checks that the
NEWS
file is about the current version, i.e., it checks that the second argument given toAC_INIT
is in the top ofNEWS
, otherwise it fails withNEWS not updated; not releasing
.creates the tarball (via
make dist
)untars the tarball
configures the tarball in a separate directory
_build
(to avoid cluttering the source files with the built files). Arguments passed to the top levelconfigure
(e.g.,CXX=g++-|gccversion|
) will not be taken into account here. Runningexport CXX=g++-|gccversion|
is a better way to require these compilers. Alternatively useDISTCHECK_CONFIGURE_FLAGS
to specify the arguments of the embeddedconfigure
:$ make distcheck DISTCHECK_CONFIGURE_FLAGS='--without-swig CXX=g++-4.0'
runs
make
(and following targets) in paranoid mode. This mode consists in forbidding any change in the source tree, because if, when you runmake
something must be changed in the sources, then it means something is broken in the tarball. If, for instance, for some reason it wants to runautoconf
to recreateconfigure
, or if it complains thatautom4te.cache
cannot be created, then it means the tarball is broken! So track down the reason of the failure.runs
make check
runs
make dist
again.
If you just run make dist
instead of make distcheck
, then
you might not notice some files are missing in the distribution. If you
don’t even run make dist
, the tarball might not compile elsewhere
(not to mention that we don’t care about object files etc.).
Running make distcheck
is the only means for you to check that
the project will properly compile on our side. Not running
distcheck
is like turning off the type checking of your compiler:
you hide instead of solving.
At this stage, if running make distcheck
does not create
fabrice.bardeche-tc-4.tar.bz2
, something is wrong in your package. Do
not rename it, do not create the tarball by hand: something is rotten
and be sure it will break on the examiner’s machine.