#
# README.developers
#

This file is intended to provide a few tips for anyone doing development
on mmh. Developers who learn things "the hard way" about the mmh codebase
(as opposed to local info best encoded in a comment) are encouraged to
share their wisdom here.

Absolute beginners should start reading docs/README.start-devel.


-------------------
directory structure
-------------------

Following is a list of mmh's directories along with a brief description
of the purpose of each one. Meanings are given for the abbreviations,
but note that these meanings are just informed guesses as to what the
MH developers were thinking.

./
    The top-level directory. Contains files like README and INSTALL.

config/
    Contains utility files for the `configure' process. Ordinarily
    nothing in here needs to be messed with, but config/config.c is
    very interesting to have a look at.

docs/
    Contains more specialized documentation, such as this file and
    the FAQ.

etc/
    Contains files, file templates, and scripts to generate files that
    will be installed in the ${prefix}/etc directory. Stuff like
    replcomps.

h/
    Most of mmh's header files are kept in this central location instead
    of in the individual source directories.

man/
    Contains all the input files that are processed to generate mmh's
    manual pages.

sbr/
    "sbr" stands for "subroutine(s)". For the most part, each source
    file in this directory contains a single function with the same
    name as the source file. These functions are of general use and
    are called from throughout mmh.

uip/
    "uip" stands for "User Interface Programs". Most mmh commands have a
    file in this directory named <command>.c containing the code for that
    command (e.g. repl.c). In some cases there is also an auxiliary file
    called <command>sbr.c which contains additional subroutines called
    from <command>.c.


----------------------
version control system
----------------------

As of December 2010, nmh has switched to using git for revision control
instead of CVS. Mmh has stick to git. While the topic of git is beyond
the scope of this FAQ, to get started with git and mmh, you can run the
following command to checkout the mmh repository:

    % git clone http://git.marmaro.de/mmh

That will create a workspace called mmh. To update that workspace
change to it and run:

    % git pull


--------------
autoconf files
--------------

If you wish to change the `configure' script or its related files,
you'll need to first install GNU m4 and GNU autoconf. Mmh is currently
using a minimum of autoconf 2.61.

Most of the configure-related files are automatically generated. The
only files you should need to manually edit are `acconfig.h' and
`configure.ac'. Don't, for instance, edit `config.h.in'. Though it is
an input file from the point of view of the users (and the configure
script) it is an output file from the point of view of the developers
(and the autoconf script).

Note that the automatically generated autoconf files (such as
`config.h.in', `stamp-h.in', and `configure'), are NOT kept in the
version control system. Thus, when you check out the source tree,
you need to run the `autogen.sh' script before you can build anything:

	% ./autogen.sh

