Added that you should check in aclocal.m4 after acconfig.h, if you change it.
[mmh] / docs / README.developers
1 #
2 # README.developers
3 #
4 # $Id$
5 #
6
7 This file is intended to provide a few tips for anyone doing development on nmh.
8 Developers who learn things "the hard way" about the nmh codebase (as opposed to
9 local info best encoded in a comment) are encouraged to share their wisdom here.
10
11 The topics are organized alphabetically.
12
13
14 --------------
15 autoconf files
16 --------------
17
18 If you wish to change the `configure' script or its related files, you'll need
19 to first install GNU m4, available from <ftp://ftp.gnu.org/pub/gnu/m4/> and then
20 GNU autoconf (<ftp://ftp.gnu.org/pub/gnu/autoconf/>).
21
22 Most of the configure-related files are automatically generated.  The only files
23 you should need to manually edit are acconfig.h and configure.in.  Don't, for
24 instance, edit config.h.in.  Though it is an input file from the point of view
25 of the users (and the configure script) it is an output file from the point of
26 view of the developers (and the autoconf script).
27
28 If you do change acconfig.h or configure.in and want to `cvs commit' them, be
29 sure to regenerate the output files and commit them as well.  The easiest way to
30 regenerate the files is to simply run `make' -- it'll do the necessary calls of
31 autoconf and autoheader and will do a `./config.status --recheck', which will
32 exercise your new configure script.
33
34 When you commit the configure-related files, it's very important to commit them
35 in the right order.  The timestamps on the files in the CVS archive are based on
36 the current time at the moment they were committed -- the timestamps from the
37 local files you commit are not copied over.  If you commit the files in the
38 wrong order, you'll cause unnecessary calls of `autoconf' to occur when people
39 try to `make' their copies of the latest CVS source.  These people may be
40 end-users who don't have any interest in changing the configure-related files
41 and don't have autoconf installed.  They'll be unable to make without playing
42 around with `touch'.
43
44 The correct order to commit the configure-related files is:
45
46     % cvs commit acconfig.h config.h.in configure.in configure stamp-h.in
47
48 If you haven't changed all of those files, just commit the rest in the
49 stated order (e.g. cvs commit acconfig.h config.h.in stamp-h.in). If
50 you change aclocal.m4, put that after acconfig.h.
51
52
53 -------------------
54 directory structure
55 -------------------
56
57 Following is a list of nmh's directories along with a brief description of the
58 purpose of each one.  Meanings are given for the abbreviations, but note that
59 these meanings are just informed guesses as to what the MH developers were
60 thinking. 
61
62 ./
63     The top-level directory.  Contains files like README and INSTALL.
64
65 config/
66     Contains utility files for the `configure' process.  Ordinarily nothing in
67     here needs to be messed with.
68
69 etc/
70     Contains files, file templates, and scripts to generate files that will be
71     installed in the ${prefix}/etc directory.  Stuff like replcomps.
72
73 h/
74     Most of nmh's header (.h) files are kept not in the individual source
75     directories, but in this central location.
76
77 man/
78     Contains all the input files that are processed to generate nmh's manual
79     pages.
80
81 mts/
82     "mts" stands for "Message Transfer Service".  Source files specific to the
83     different MTSs go in the subdirectories.
84
85 mts/mmdf/
86     "mmdf" stands for "Multichannel Memorandum Distribution Facility".  It is an
87     alternative to sendmail used primarily on SCO UNIX.
88
89 mts/sendmail/
90     When nmh is configured --with-mts=sendmail, the files in this directory are
91     used. 
92
93 mts/smtp/
94     When nmh is configured to just talk to an SMTP server over TCP/IP, the
95     source in this directory is compiled.
96
97 sbr/
98     "sbr" stands for "subroutine(s)".  For the most part, each source file in
99     this directory contains a single function with the same name as the source
100     file.  These functions are of general use and are called from throughout
101     nmh.  
102
103 uip/
104     "uip" stands for "User Interface Programs".  Most nmh commands have a file
105     in this directory named <command>.c containing the code for that command
106     (e.g. repl.c).  In some cases there is also an auxiliary file called
107     <command>sbr.c which contains additional subroutines called from <command>.c
108     (which would contain not much else besides main()).
109
110 zotnet/
111     Files in this hierarchy were either written by or moved here by UCI
112     (University of California, Irvine) after they took over MH from the Rand
113     Corporation.  "Zot!" is the sound effect made by the anteater in the "B.C."
114     comic strip when its tongue lashes out at ants.  The anteater is UCI's
115     official mascot.  Not sure whether UCInet was once called ZotNet...
116
117 zotnet/bboards/
118     UCI added Bulletin Board functionality to MH with the `bbc' command.  This
119     functionality has been removed from nmh but apparently files in this
120     directory are still needed for other purposes.
121
122 zotnet/mf/
123     "mf" stands for "Mail Filter".  The filtering in this case apparently refers
124     to translation between different address and mailbox formats.
125
126 zotnet/mts/
127     MTS code not specific to any single MTS apparently goes here.
128
129 zotnet/tws/
130     No idea what "tws" stands for, other than 't' almost certainly standing for
131     "time".  Date and time manipulation routines go here.
132
133
134 -------------
135 releasing nmh
136 -------------
137
138 To make a public release of nmh (we'll use version 1.0.4 and my mhost.com
139 account, danh, as examples here):
140
141 1. % echo 1.0.4 > VERSION
142
143 2. Put a comment like "Released nmh-1.0.4." in the ChangeLog.
144
145 3. % cvs commit ChangeLog VERSION
146
147 4. % cvs tag nmh-1_0_4
148    (cvs treats dots specially, so underscores are substituted here.)
149
150 5. % make nmhdist
151
152 6. Preferably make an MD5 hash and/or a PGP signature of nmh-1.0.4.tar.gz.
153
154 7. Preferably test out the tarball, making sure you can uncompress and untar it,
155    and configure, make, install, and use nmh from it.
156
157 8. % scp -p nmh-1.0.4.tar.gz* your-uid@mhost.com:/home/ftp/pub/nmh
158
159 9. Send an announcement to exmh-users@redhat.com, exmh-workers@redhat.com,
160    mh-users@ics.uci.edu, and nmh-announce@mhost.com.  If the release fixes
161    significant security holes, also send an announcement to
162    bugtraq@securityfocus.com.  None of these lists require you to be subscribed
163    to post.  Note that you don't need to post separately to comp.mail.mh, as the
164    mh-users mailing list is apparently bidirectionally gatewayed to it.
165
166    Preferably, the announcement should contain the MD5 hash generated above, and
167    should be PGP-signed.  It should include the FTP URL for the tarball as well
168    as the URL of the website.  It should contain a brief summary of visible
169    changes, as well as the URL of the cvsweb diff page that would show a
170    detailed list of changes.  The changes between 1.0.3 and 1.0.4 would be shown
171    by:
172
173        http://www.mhost.com/cgi-bin/cvsweb/nmh/ChangeLog?r1=1.40&r2=1.71