(automake-1.16.info)Preparing Distributions


Next: Dependency Tracking Prev: DESTDIR Up: Use Cases
Enter node , (file) or (file)node

2.2.11 Preparing Distributions
------------------------------

We have already mentioned ‘make dist’.  This target collects all your
source files and the necessary parts of the build system to create a
tarball named ‘PACKAGE-VERSION.tar.gz’.

   Another, more useful command is ‘make distcheck’.  The ‘distcheck’
target constructs ‘PACKAGE-VERSION.tar.gz’ just as well as ‘dist’, but
it additionally ensures most of the use cases presented so far work:

   • It attempts a full compilation of the package (Note: Basic
     Installation), unpacking the newly constructed tarball, running
     ‘make’, ‘make check’, ‘make install’, as well as ‘make
     installcheck’, and even ‘make dist’,
   • it tests VPATH builds with read-only source tree (Note: VPATH
     Builds),
   • it makes sure ‘make clean’, ‘make distclean’, and ‘make uninstall’
     do not omit any file (Note: Standard Targets),
   • and it checks that ‘DESTDIR’ installations work (Note: DESTDIR).

   All of these actions are performed in a temporary directory, so that
no root privileges are required.  Please note that the exact location
and the exact structure of such a subdirectory (where the extracted
sources are placed, how the temporary build and install directories are
named and how deeply they are nested, etc.)  is to be considered an
implementation detail, which can change at any time; so do not rely on
it.

   Releasing a package that fails ‘make distcheck’ means that one of the
scenarios we presented will not work and some users will be
disappointed.  Therefore it is a good practice to release a package only
after a successful ‘make distcheck’.  This of course does not imply that
the package will be flawless, but at least it will prevent some of the
embarrassing errors you may find in packages released by people who have
never heard about ‘distcheck’ (like ‘DESTDIR’ not working because of a
typo, or a distributed file being erased by ‘make clean’, or even
‘VPATH’ builds not working).

   Note: Creating amhello, to recreate ‘amhello-1.0.tar.gz’ using
‘make distcheck’.  Note: Checking the Distribution, for more
information about ‘distcheck’.


automatically generated by info2www version 1.2.2.9