Autoconf, Automake, and Libtool: Introduction to Distributions

| ## 13.1 Introduction to Distributions The basic approach to creating a tar distribution is to run
    make
    make dist
The generated tar file is named package-version.tar.gz, and will unpack into a directory named package-version. These two rules are mandated by the GNU Coding Standards, and are just good ideas in any case, because it is convenient for the end user to have the version information easily accessible while building a package. It removes any doubt when she goes back to an old tree after some time away from it. Unpacking into a fresh directory is always a good idea -- in the old days some packages would unpack into the current directory, requiring an annoying clean-up job for the unwary system administrator. The unpacked archive is completely portable, to the extent of Automake's ability to enforce this. That is, all the generated files (e.g., ``configure'`) are newer than their inputs (e.g., ``configure.in'`), and the distributed ``Makefile.in'` files should work with any version of `make`. Of course, some of the responsibility for portability lies with you: you are free to introduce non-portable code into your ``Makefile.am'`, and Automake can't diagnose this. No special tools beyond the minimal tool list (see section `Utilities in Makefiles' in The GNU Coding Standards) plus whatever your own ``Makefile'` and ``configure'` additions use, will be required for the end user to build the package. By default Automake creates a ``.tar.gz'` file. It notices if you are using GNU `tar` and arranges to create portable archives in this case. (27) People do sometimes want to make other sorts of distributions. Automake allows this through the use of options. `dist-bzip2` Add a `dist-bzip2` target, which creates a ``.tar.bz2'` file. These files are frequently smaller than the corresponding ``.tar.gz'` file. `dist-shar` Add a `dist-shar` target, which creates a `shar` archive. `dist-zip` Add a `dist-zip` target, which creates a `zip` file. These files are popular for Windows distributions. `dist-tarZ` Add a `dist-tarZ` target, which creates a ``.tar.Z'` file. This exists mostly for die-hard old-time Unix hackers; the rest of the world has moved on to `gzip` or `bzip2`.

This document was generated by Gary V. Vaughan on February, 8 2006 using texi2html