Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / HACKING
blobf9a3c05b05afd6f3c903af753df5e0b48272fa64
1 ================================================================
2 = This file
4 * This file attempts to describe the rules to use when hacking
5   automake.
7 * Don't put this file into the distribution.  Don't mention it in the
8   ChangeLog.
11 ================================================================
12 = Administrivia
14 * If you incorporate a change from somebody on the net:
15   First, if it is a large change, you must make sure they have signed the
16   appropriate paperwork.
17   Second, be sure to add their name and email address to THANKS
19 * If a change fixes a test, mention the test in the ChangeLog entry.
21 * If somebody reports a new bug, mention his name in the ChangeLog entry
22   and in the test case you write.  Put him into THANKS.
24 * The correct response to most actual bugs is to write a new test case
25   which demonstrates the bug.  Then fix the bug, re-run the test suite,
26   and check everything in.
28 * Some files in the automake package are not owned by automake.  These
29   files should never be edited here.  These files are
30       COPYING (from FSF),
31       INSTALL (autoconf-patches@gnu.org),
32       config.guess, config.sub (config-patches@gnu.org),
33       texinfo.tex (bug-texinfo@gnu.org),
34   Most of them are updated before release with `make fetch'.
36 * Changes other than bug fixes must be mentioned in NEWS
39 ================================================================
40 = Naming
42 * We've adopted the convention that internal AC_SUBSTs should be
43   named with a leading `am__', and internally generated targets should
44   be named with a leading `am--'.  This convention is very new
45   (as of Feb 7 2001) and so it isn't yet universally used.  But all
46   new code should use it.
48   We used to use `_am_' as the prefix for an internal AC_SUBST.
49   However, it turns out that NEWS-OS 4.2R complains if a Makefile
50   variable begins with `_'.  Yay for them.  I changed the target
51   naming convention just to be safe.
53 ================================================================
54 = Editing `.am' files
56 * Always use $(...) and not ${...}
58 * Use `:', not `true'.  Use `exit 1', not `false'.
60 * Use `##' comments liberally.  Comment anything even remotely
61   unusual.
63 * Never use basename or dirname.  Instead use sed
65 * Do not use `cd' within back-quotes, use `$(am__cd)' instead.
66   Otherwise the directory name may be printed, depending on CDPATH.
67   More generally, do not ever use plain `cd' together with a relative
68   directory that does not start with a dot, or you might end up in one
69   computed with CDPATH.
71 * For install and uninstall rules, if a loop is required, it should be
72   silent.  Then the body of the loop itself should print each
73   "important" command it runs.  The printed commands should be preceded
74   by a single space.
77 ================================================================
78 = Editing automake.in and aclocal.in
80 * Indent using GNU style.  For historical reasons, the perl code
81   contains portions indented using Larry Wall's style (perl-mode's
82   default), and other portions using the GNU style (cperl-mode's
83   default).  Write new code using GNU style.
85 * Don't use & for function calls, unless required.
86   The use of & prevents prototypes from being checked.
87   Just as above, don't change massively all the code to strip the
88   &, just convert the old code as you work on it, and write new
89   code without.
91 * Perl 5 is now OK.
94 ================================================================
95 = Working with git/CVS
97 * To regenerate dependent files created by aclocal and automake,
98   use the `bootstrap' script.  It uses the code from the source
99   tree, so the resulting files (aclocal.m4 and Makefile.in) should
100   be the same as you would get if you install this version of
101   automake and use it to generate those files.
103 * Dependent files aclocal.m4, configure and Makefile.in in all
104   directories should be up to date in the git repository, so that
105   the changes in them can be easily noticed and analyzed.
107 * Avoid merge commits on the master branch of the public git repository.
108   For unpublished changes in your development tree, it's easiest to
109   rebase against the current master before applying them, this preserves
110   a linear history.
112 * For changes to appear in more than one branch, apply them to the
113   master branch and then cherry-pick them to the stable branch from
114   master if possible.  This keeps the master uncluttered and preserves
115   meta-data on the stable branches.
118 ================================================================
119 = Test suite
121 * Use "make check" and "make maintainer-check" liberally
123 * Make sure each test file is executable
125 * Use `keep_testdirs=yes' to keep test directories for successful
126   tests also.
128 ================================================================
129 = Release procedure
131 * Fetch new versions of the files that are maintained by the FSF.
132   Commit.  Unfortunately you need an FSF account to do this.
133   (You can also use `make fetch', but that is still woefully incomplete.)
135 * Update NEWS.  For an alpha release, update README-alpha.
137 * Update the version number in configure.ac.
138   (The idea is that every other alpha number will be a net release.
139   The repository will always have its own "odd" number so we can easily
140   distinguish net and repo versions.)
142 * Update ChangeLog.
144 * Run ./bootstrap, ./configure, make.
146 * Run `make release-stats' if release statistics in doc/automake.texi
147   have not been updated yet.
149 * Run `make git-release'.
150   This will run distcheck to create the tarballs, commit the last
151   NEWS/configure.ac/ChangeLog changes, tag the repository, sign
152   the tarballs, and upload them.
153   Use `make GNUPLOADFLAGS="--user key" git-release' to sign with
154   a non-default key.
156 * Update version number in configure.ac to next alpha number.
157   Re-run ./bootstrap and commit.
159 * Don't forget to `git push' your changes so they appear in the public
160   git tree.
162 * Update the web pages at sources.redhat.com:
163   - bump version in index.rst,
164   - add entry to news.rst,
165   - run `make' to update .html files,
166   - create manuals:
167       cd doc
168       make pdf
169       make html MAKEINFOFLAGS=--no-split
170   - copy automake.html and automake.pdf to web cvs,
171   - add ChangeLog entry and commit.
173 * Update the manuals at www.gnu.org:
174   - Generate manuals:
175     cd doc
176     wget "http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
177     wget "http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
178     sh ./gendocs.sh automake  "GNU Automake"
179   - copy manuals recursively to web cvs,
180   - commit.
181   - Check for link errors, fix them, recheck until convergence:
182     <http://validator.w3.org/checklink>
184 * Send announcement at least to autotools-announce@gnu.org, and
185   automake@gnu.org.  If not an alpha, announcement must also go to
186   info-gnu@gnu.org.  Copy this announcement into the NEWS feed at
187   <https://savannah.gnu.org/projects/automake>.
189 -----
191 Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
193 This program is free software; you can redistribute it and/or modify
194 it under the terms of the GNU General Public License as published by
195 the Free Software Foundation; either version 3, or (at your option)
196 any later version.
198 This program is distributed in the hope that it will be useful,
199 but WITHOUT ANY WARRANTY; without even the implied warranty of
200 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
201 GNU General Public License for more details.
203 You should have received a copy of the GNU General Public License
204 along with this program.  If not, see <http://www.gnu.org/licenses/>.
206 Local Variables:
207 mode: text
208 End: