dist - introduction to dist
package is a set of tools meant to ease the construction and
maintenance of portable software. There are four distinct parts in
, and it is also meant to be used with two external products, which
are publicly available: mailagent
The first component is the Configure
script generator, which is a
portability tool. It is automatically build up by metaconfig
sources and a set of units. Ideally, the end-user receiving your source code
will simply have to read your README file, run the Configure
(which is self-documented), and then run make
. Your package should then
build cleanly on every UNIX platform.
The second component is the Makefile.SH
generator, which is a generic
configured Makefile, reusing some of the information figured out by
Although you may write your own Makefile and then use
to transform it into a Makefile.SH
, it is better to write
a generic Jmakefile
description, which does not rely on a particular
position within the source tree, and then use jmake
build your Makefiles.
The third component is the package generator, which is used when it's time to
build up the shell archives used to distribute your program. Although you may
use your own archiving mechanism, the one included here knows about RCS files
and will properly check out the lattest revisions, leaving your working files
alone. The makedist
program will also perform Copyright expansion, an
useful feature when you share source files among more than one program, placed
under distinct Copyright information.
The fourth and latest component is the patch generator, used to make updates of
your sources, which can later be applied on the original distribution by using
Before using any of the dist
programs, you should probably identify your
package by running the packinit
program, which will create a
file in the top-level directory of your package.
package implements the following commands (those tagged as
commands are to be found in the dist library and should not be
made publicly available in everyone's path):
- builds the Index file (library).
- a Makefile.SH generator.
- bootstraps top-level Makefile.SH file.
- posts distribution kits made by makedist.
- sends distribution kits made by makedist.
- wraps existing scripts into a .SH file.
- builds up distribution kits.
- builds the Glossary file (library).
- checks MANIFEST.new accuracy
- makes MANIFEST.new out of an existing MANIFEST.
- builds MANIFEST.new reports.
- a Configure script generator.
- a metaconfig unit consistency checker.
- a metaconfig cross-reference builder.
- initializes a package (creates a .package file).
- main patch generator.
- resets patch base to current version.
- checks new version in.
- remove working version of up-to-date files.
- checks file out.
- builds (contextual) diffs for the patch.
- copies patches to public ftp directory.
- builds a patch index.
- handles ChangeLog file updates.
- puts diffs together into a patch.
- notifies users that new patches have been released.
- posts patch to some newsgroup.
- mails patch to some people.
- builds a release snapshot with files and RCS
Commands having a set of meaningful options (other than -h
can also take arguments from the ~/.dist_profile
file, or whatever file
environment variable points to. Each line of the file is in
the format: profile-component: value
whith shell-style comments (#)
allowed provided they start the line.
Each command looks for a profile component entry matching its name and loads the
as if it were arguments specified on the command line. Those
arguments precede any other argument specified manually, in case order is
Some commands may also be configured from within the profile, by setting a
attached to the command by a profile entry looking
like this: cmdname- variable
For instance, assuming the
is recognized by the metaconfig
default value could be overwritten by this profile entry: metaconfig-c-files:
Only the first '-' after the command name is part of the
syntax, the other one used in the variable name is pure convention. Please
refer to the manual page of each command for a list of valid profile variables
which may be set.
- Temporary directory created by metaconfig and
- A list of files newer than patchlevel.h, used by the
- Main configuration file used by most of the dist tools to
make them smart.
- The file where changes are recorded. Its name may be
configured by running packinit, but this is the default
"generic" name under which it is referred to within the
- The generated configuration script.
- A list of all the known portability symbols known by
metaconfig. This file is located in the dist library
- Cross-reference file generated by metaxref, sorted
by file, unit, item.
- Cross-reference file generated by metaxref, sorted
by unit, item, file.
- A list of all the rules known by jmake. This file is
located in the dist library directory.
- Generic makefile description used by jmake.
- List of all the files to be included in the distribution.
Usually a copy (not a link) of MANIFEST.new.
- List of all the files to be taken into account by the dist
- The generated configured makefile (via Jmakefile) or
hand-generated Makefile making use of known metaconfig symbols.
- A list of obsolete symbol used and their new
- Directory where RCS files are stored.
- Main file explaining how to build your package.
- Private unit directory.
- File used by metaconfig, listing all the symbols
used by the sources.
- Directory where patches are stored.
- Extra files present in MANIFEST.new, generated by
- Missing files from MANIFEST.new, generated by
- Generated config.h template.
- Magic symbol remapping, activated via metaconfig's
- This directory lists all the configuration hints for your
- File recording your package patch level, should not be part
of MANIFEST.new, but may be listed in MANIFEST, at your discretion.
- File recording the users of your package, generated by
mailagent's package command (see the MailAuthor.U unit and
The following environment variable is paid attention to:
- Location of the dist profile, defaults to ~/.dist_profile.
This variable is subject to ~name substitution, even if your shell does
not support it.
By chronological order:
Larry Wall <email@example.com> (dist 2.0 in 1988)
Harlan Stenn <firstname.lastname@example.org> (worked on dist 3.0 1990-1992)
Raphael Manfredi <email@example.com> (dist 3.0 and integration
Please look at the Credits
file in the distribution source tree for a
list of all the known contributors.
jmake(1), metaconfig(1), pat(1).