Noeud « Previous »: Bootstrapping the Package, Noeud « Up »: The GNU Build System



5.3.3 Making a Tarball

Once the package autotool'ed (voir Bootstrapping the Package), once you can run a simple make, then you should be able to run make distcheck to set up the package.

The mission of make distcheck is to make sure everything will work properly. In particular it:

  1. creates the tarball (via make dist)
  2. untars the tarball
  3. configures the tarball in a separate directory (to avoid cluttering the source files with the built files).

    Arguments passed to the top level configure (e.g., ./configure CC=gcc-3.2 CXX=g++-3.2) will not be taken into account here.

    Running export CC=gcc-3.2; export CXX=g++-3.2 is a better way to make sure that these compilers will be used. Alternatively use DISTCHECK_CONFIGURE_FLAGS to specify the arguments of the embedded ./configure:

              $ make distcheck DISTCHECK_CONFIGURE_FLAGS='--without-swig CXX=g++-4.0'
         
  4. 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.
  5. runs make check
  6. 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 the errors, you avoid them, instead of actually getting rid of them.


At this stage, if running make distcheck does not create bardec_f-tc-4.tar.bz2, then 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.