automake: Preparing Distributions
1
1 2.2.11 Preparing Distributions
1 ------------------------------
1
1 We have already mentioned ‘make dist’. This target collects all your
1 source files and the necessary parts of the build system to create a
1 tarball named ‘PACKAGE-VERSION.tar.gz’.
1
1 Another, more useful command is ‘make distcheck’. The ‘distcheck’
1 target constructs ‘PACKAGE-VERSION.tar.gz’ just as well as ‘dist’, but
1 it additionally ensures most of the use cases presented so far work:
1
11 • It attempts a full compilation of the package (⇒Basic
Installation), unpacking the newly constructed tarball, running
1 ‘make’, ‘make check’, ‘make install’, as well as ‘make
1 installcheck’, and even ‘make dist’,
11 • it tests VPATH builds with read-only source tree (⇒VPATH
Builds),
1 • it makes sure ‘make clean’, ‘make distclean’, and ‘make uninstall’
1 do not omit any file (⇒Standard Targets),
1 • and it checks that ‘DESTDIR’ installations work (⇒DESTDIR).
1
1 All of these actions are performed in a temporary directory, so that
1 no root privileges are required. Please note that the exact location
1 and the exact structure of such a subdirectory (where the extracted
1 sources are placed, how the temporary build and install directories are
1 named and how deeply they are nested, etc.) is to be considered an
1 implementation detail, which can change at any time; so do not rely on
1 it.
1
1 Releasing a package that fails ‘make distcheck’ means that one of the
1 scenarios we presented will not work and some users will be
1 disappointed. Therefore it is a good practice to release a package only
1 after a successful ‘make distcheck’. This of course does not imply that
1 the package will be flawless, but at least it will prevent some of the
1 embarrassing errors you may find in packages released by people who have
1 never heard about ‘distcheck’ (like ‘DESTDIR’ not working because of a
1 typo, or a distributed file being erased by ‘make clean’, or even
1 ‘VPATH’ builds not working).
1
1 ⇒Creating amhello, to recreate ‘amhello-1.0.tar.gz’ using
1 ‘make distcheck’. ⇒Checking the Distribution, for more
1 information about ‘distcheck’.
1