1 Notes for Developers -*-text-*-
4 Last updated on 08-Jan-2006
6 You will need to install several GNU tools to be able to use the
7 cvs sources. If you do not have these tools available, build from
8 the tar file distribution instead, available from ftp.fvwm.org.
10 To build from the CVS sources, you will need:
13 * autoconf (version >= 2.53)
14 * automake (version >= 1.4)
17 After the *initial* checkout of the sources, (see DEVELOPER-CVS or
18 cvs.html) you will need to execute the following commands from the
19 top of the source tree.
23 automake --add-missing
26 There will be some warnings, which are ignorable as long as you
27 get a working configure script: the configure script will fix all
30 Now, configure and build as per INSTALL.fvwm and INSTALL. If
31 configure fails, please look through `config.log' for clues.
34 Development Rules of the Road
35 -----------------------------
37 1) _Every_ change must be properly ChangeLogged, listing the name
38 of the changed function. If you use Emacs, you can do this
39 oh-so-trivially with the "C-x 4 a" command; it will add a
40 header (if it's a new day), the name of the file, and even the
41 name of the function you're currently in. There is a
42 vim-script utils/changelog.vim that does the same when yoi
45 If you start adding them as you change functions, it'll soon
46 become second-nature and we'll get proper ChangeLogs.
48 If you don't use Emacs, please mimic the format of all the
49 other log entries when adding your own.
51 2) If you make a user-visible change please add a blurb about it
52 to the NEWS file. A couple sentences is fine; don't repeat
53 the documentation but give folks enough of an idea so they can
54 decide if they want to learn more. Bug fixes (unless they're
55 _really_ user visible) shouldn't be noted in the NEWS file.
57 3) If you add a new user-visible feature, don't forget to update
58 the appropriate man pages at the same time!
60 4) Bug fixes may be committed at any time (unless we're in code
61 freeze for a release), usually without much review (unless you
62 want someone else to look at it). All our code freezes,
63 etc. are merely procedural, not enforced, so it's important
64 you read fvwm-workers and keep up-to-date with the current
67 5) New features should be discussed on the list to ensure
68 everyone thinks they're "appropriate" (one of the goals of
69 fvwm is to be relatively efficient, remember, which means we
70 don't necessarily want the kitchen sink).
72 6) If the new feature is large enough, unstable enough, or not
73 targeted at the next release, it should go on a private
74 branch. Otherwise, consensus will probably have it installed
77 7) Before adding a new feature think twice if it could perhaps be
78 implemented as a module (perhaps after some extension of the
79 fvwm<->module communication protocol). Moving features in
80 modules helps to keep fvwm itself clean and efficient.
82 8) See CONVENTIONS for more details.
84 ** Of course, compile and test before committing! **
90 All details about dealing with CVS should be found in cvs.html or
91 DEVELOPER-CVS. Go look there!
97 If you haven't already noticed them, now is the time to visit our
100 http://www.fvwm.org/cgi-bin/fvwm-bug
102 Anybody can submit or view bug reports there.
104 Developers with CVS write access can also update the bug database
105 (whee!). To do so, you have to go to the Jitterbug page, but then
106 tack a ".private" on to the end of the URL:
108 http://www.fvwm.org/cgi-bin/fvwm-bug.private
110 Then you'll be asked to authenticate. The username and password
111 are the same as you use for the CVS repository.
113 You'll probably want to bookmark that page.
119 First of all, NEVER edit anything named Makefile or Makefile.in.
120 These are both derived from the corresponding Makefile.am. The
121 most common reason for editing is to change the list of sources.
123 Steps: 1. edit foo/blah/Makefile.am
124 2. re-run "make" from the top of the build directory
126 Step 2 will take care of rebuilding the Makefile.in and Makefile
127 from your changed Makefile.am.
129 Makefile.am has a simple format, basically:
133 fvwm_SOURCES = blah.c blah.h foo.c foo.h ...
135 Notice that you have to add all files, C-code *and* headers, to
136 the _SOURCES line. This is vital, because this is the list of
137 files that are packed into the distribution. If you leave one
138 out, nobody will be able to build the distributed tar file!
141 Changing configure.ac
142 ---------------------
144 The most common reason to do this is to change the version string.
145 If you're editing it for any other reason, I will assume you know
148 Steps: 1. edit configure.ac, and find the line containing
149 AM_INIT_AUTOMAKE(fvwm, x.y.z) at the top of the file
150 2. change x.y.z to the new version string
151 3. re-run "make" from the top of the build directory
153 Step 3 will take care of rebuilding the configure script, and
154 usually all the other Makefiles.
157 Building an official distribution
158 ---------------------------------
160 By this, I mean the files fvwm-x.y.z.tar.gz and
161 fvwm-x.y.z.tar.bz2. It is important to do all steps in the given
166 - Make sure you have all optional libraries installed.
167 - When building a release, update the CVS sources first. For a
168 stable release it is best to throw away the whole source tree
169 and check it out from scratch to ensure all source files have
171 - Change the dates in configure.ac and fill in the release date
172 in NEWS. Note: For releases prior to 2.5.3, the date has to be
173 updated in docs/fvwm.lsm.in and fvwm/fvwm.1 instead of
175 - Verify that the version variable at the very beginning of
176 configure.ac has the value of the going to be released version
177 and set ISRELEASED to "yes". It should be "yes" in the
179 - Update docs/ANNOUNCE file. For the first version of a major
180 release (e.g. 2.6.0) all user visible changes have to be
181 mentioned. For the following maintenance releases *all* code
182 changes have to be listed. This is usually done by copying
183 all entries from the NEWS file. Don't forget to proof read
184 the file as it will be sent to the fvwm-announce mailing list.
185 - Update the ChangeLog for all the changes above.
186 - Commit these changes.
190 Note that you need to have actually built everything before
191 packing the distribution. Among other things, this generates
192 the proper dependency information for insertion into
193 Makefile.in's generated by "make distcheck2".
196 $ aclocal && autoheader && automake --add-missing && autoconf
197 - If you are building a stable release, remove the config.cache
198 file if there is one (autoconf 2.52 does no longer generate
199 this file by default). Of course doing this for a development
200 release won't hurt either.
202 $ ./configure --enable-htmldoc
203 - Make sure configure detects all optional libraries except the
204 ones that are recommended not to be used. Repeat the previous
205 step until configure finds everything. Building a release
206 without any optional library should be a rare exception.
212 even if you checked out from scratch. It is a useful
214 - Double check that you get no warnings during the build:
215 $ make CFLAGS="-g -O2 -Wall -Wpointer-arith -fno-strict-aliasing -Werror"
216 On some systems, the system include files generate warnings.
217 On such a system you have to omit the -Werror option and check
218 the output of the compilation run for warnings manually. It
219 is important to use the -O2 option because gcc can not
220 generate some warnings without it. If your gcc-version does
221 not know the option "-fno-strict-aliasing", remove it. If you
222 have gcc >= 3.4 you should also use -Wdeclaration-after-statement
223 since it will catch code that won't compile on all C89 compilers.
224 - Fix all warnings and problems, commit the changes and repeat
225 the previous step until no more warnings occur.
227 Build and test the release tarballs:
229 The next step will create the tar file, then unpack it and
230 attempt to build fvwm from it and install to a scratch
231 directory. This makes sure that you really *did* include all
232 the files necessary to build the package into the tar file. It
233 may be hard to appreciate how useful this is, until it has
234 reminded you that you forgot file "foo.h" in some _SOURCES line.
235 But trust me, it will save your bacon in this way some day!
239 - Ensure that you see the messages
240 "fvwm-x.y.z.tar.gz is ready for distribution"
242 "fvwm-x.y.z.tar.bz2 - ready for distribution"
246 * Important note: Before you proceed, please ask yourself if the
247 code is ready to be released:
249 * Have you committed patches only hours or even minutes ago?
250 * Have there been any big changes in the last few days?
251 * Are there any important parts that are not well tested?
252 * Are you tired from work or have you been hacking fvwm for many
255 Should your answer to any of these questions be 'yes', please do
256 take a break now and reconsider, especially if this is going to
259 The steps above are not critical and can not screw up anything
260 bad. This is not true for what follows. If you do something
261 wrong now, you will have a hard time cleaning up the mess.
262 Should something go wrong and you are not sure about the correct
263 fixes, please ask on the fvwm-workers list for help.
265 It's important that the files included in the release tarballs
266 and the tagged files are identical.
268 - Tag the CVS tree (replace x, y and z):
269 $ cvs tag version-x_y_z
273 Hopefully you didn't change any files after the last commit.
274 Otherwise commit your changes and return to the previous sections,
275 i.e. rebuild tarballs using "make distcheck2" and retag the tree.
277 - Upload the files fvwm-x.y.z.tar.gz and fvwm-x.y.z.tar.bz2 to
278 ftp://ftp.fvwm.org/pub/incoming/fvwm
279 - Notify fvwm-owner@fvwm.org of the upload.
281 Increase the version number:
283 - Increase the version number in the very beginning of
284 configure.ac (see above) and set ISRELEASED to "no".
285 - Create a new section for future changes in the NEWS file.
286 - Add a ChangeLog entry indicating that a new version started.
287 - Commit these three changes.
288 - For a stable release, copy the NEWS from the stable branch to
289 the development branch and update the link in the same
294 - Update the release numbers at the bottom of definitions.inc file.
295 - If this is the head development version, then run a shell script
296 in fvwm-web called regenerate_pages to update the web pages for
297 NEWS, FAQ and AUTHORS. It should usually work without parameters
298 for a typical setup (when fvwm and fvwm-web trees are sibling
299 directories), optionally pass a parameter to regenerate_pages -
300 the fvwm location relative to fvwm-web.
303 - Update the html documentation: go to the directory
304 doc and run the script
306 - Generate the man pages: go to the directory
307 documentation/manpages and run the script
309 It needs the program "man2html" installed.
310 - Generate ChangeLog entries for all these changes and commit them.
312 Announce the release:
314 - Once the tarballs are in place, mail the ANNOUNCE file to the
315 usual places, at least to fvwm-announce.