Next: , Previous: , Up: The GNU Build System   [Contents][Index]

5.4.3 Making a Tarball

Once the package correctly autotool’ed and configured (see 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:

  1. 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 to AC_INIT is in the top of NEWS, otherwise it fails with ‘NEWS not updated; not releasing’.
  2. creates the tarball (via ‘make dist’)
  3. untars the tarball
  4. configures the tarball in a separate directory _build (to avoid cluttering the source files with the built files).

    Arguments passed to the top level configure (e.g., ‘CXX=g++-5.0’) will not be taken into account here. Running ‘export CXX=g++-5.0’ is a better way to require these compilers. Alternatively use DISTCHECK_CONFIGURE_FLAGS to specify the arguments of the embedded configure:

    $ make distcheck DISTCHECK_CONFIGURE_FLAGS='--without-swig CXX=g++-4.0'
  5. runs ‘make’ (and following targets) in paranoid mode. This mode consists in forbidding any change in the source tree, because if, when you run ‘make’ 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 run autoconf to recreate configure, or if it complains that autom4te.cache cannot be created, then it means the tarball is broken! So track down the reason of the failure.
  6. runs ‘make check
  7. 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 bardec_f-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.

Next: , Previous: , Up: The GNU Build System   [Contents][Index]