Code from SVN

Usage

Before you can follow these instructions, you will need to have acquired a copy of the nALFS source code from the SVN repository. You can get that from SVN.

The repository copy of the nALFS source code does not include an executable configure script nor a Makefile. This is by design, as there is a script to create them, which ensures that their contents will always be up to date with the source tree contents and not require manual editing.

nALFS has been configured to use the GNU autotools suite for its build process. The build system was created using autoconf-2.57, automake-1.7.7 and libtool-1.5. If you use older versions than those, you may experience warnings and/or outright failures (automake-1.6 is known to be unable to handle the nALFS Makefile.am) file.

After you checkout the nALFS source tree, you will need to execute :

sh ./bootstrap

in the nALFS root directory itself. This should result output similar to the following:

$ sh ./bootstrap
You should update your 'aclocal.m4' by running aclocal.
Putting files in AC_CONFIG_AUX_DIR, `gnubuild'.
configure.ac: installing 'gnubuild/install-sh'
configure.ac: installing 'gnubuild/mkinstalldirs'
configure.ac: installing 'gnubuild/missing'
Makefile.am: installing 'gnubuild/compile'
Makefile.am: installing 'gnubuild/depcomp'
patching file ltmain.sh
Hunk #1 succeeded at 160 with fuzz 2 (offset -78 lines).
Hunk #2 succeeded at 269 with fuzz 1.
Hunk #3 succeeded at 4483 (offset -1172 lines).

This output comes from the autoreconf tool, which is part of the autoconf package, that automatically runs libtoolize, autoheader, aclocal and other parts of the autotools suite. The warning about "update your 'aclocal.m4'" can be ignored, as aclocal is already executed later by autoreconf. The patch offset and/or fuzz messages about ltmain.sh are caused by the bootstrap script applying a patch created against libtool-1.5; if your libtool version is different, the patch should still work correctly, but you may see messages like this from the patch command. In the worst case, the patch fails to apply, the nALFS build will still be functional, but libtool will generate more output messages than necessary.

Once bootstrap has been run, you can execute ./configure like any other GNU autoconf-based package to configure nALFS for your system.

Editing source files

The nALFS build system, because it uses automake, has full dependency tracking on all files used to build the binaries. This will reduce your rebuilding time as you edit header files and source files, as the make system will know exactly what must be rebuilt.

In addition, if you are going to make changes to bootstrap, you should add the "--enable-maintainer-mode" parameter to your configure command. With this done, each time you edit and re-run bootstrap, the Makefile will automatically re-run configure to make your changes take effect. Be warned though, that if you manually edit Makefile.am or configure.ac, you must modify the bootstrap script to incorporate your changes, because these files are not stored in the CVS repository.

If you add any C source files to the tree, you will need to rerun the bootstrap script to get them included in your build. If you add header files, it is not necessary to rerun the bootstrap script unless you plan on using "make dist" from that same tree, in which case those added headers would not get included into the tarball.

If you add or remove "syntax versions" in any of the handlers, you must re-run bootstrap to get the version lists in Makefile.am and configure.ac to incorporate your changes, or you will experience unusual build behavior.

If you add or remove any program options in src/options.h, you must re-run bootstrap to regenerate src/option-list.h. Without that file being regenerated, you may experience compile errors or find that your newly added option does not work properly.

All other types of files fall into two categories:

those that should be present only in the SVN repository

Nothing needs to be done for these files, other than the relevant "cvs add" commands.

those that should be added to the distribution tarball

The bootstrap.Makefile script will need to be edited, specifically the line that sets EXTRA_DIST near the beginning of the script. Add the path(s) to the new files to this line, or add an additional line starting with "EXTRA_DIST +=" (standard GNU makefile syntax). If the files are not listed on this line, they will not be included in the tarball created by make dist.