Next: Automatic Dependency Tracking, Previous: Building Binary Packages Using DESTDIR, Up: Use Cases for the GNU Build System [Contents][Index]
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:
make
, make check
, make install
, as well as
make installcheck
, and even make dist
,
make clean
, make distclean
, and make
uninstall
do not omit any file (see Standard Makefile Targets),
DESTDIR
installations work (see Building Binary Packages Using DESTDIR).
All of these actions are performed in a temporary subdirectory, so that no root privileges are required.
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).
See Creating amhello-1.0.tar.gz, to recreate amhello-1.0.tar.gz using
make distcheck
. See Checking the Distribution, for more
information about distcheck
.
Next: Automatic Dependency Tracking, Previous: Building Binary Packages Using DESTDIR, Up: Use Cases for the GNU Build System [Contents][Index]