Project powered by:
Here is a brief overview of how to set up a project tree for use with toc2.

First, unpack the toc2 distribution (or check it out from Subversion). From that distribution you should copy the toc2 directory and following files to your project tree, renaming them as shown here:
  • configure => configure
  • configure.toc2 => configure.PACKAGE_NAME
  • =>
The word PACKAGE_NAME should be replaced by the name of your project, which must be a single token. For this example we will use MyProject.

Now edit configure to look like this:
# ^^^ toc2 needs a genuine Bash shell, not a cheap work-alike.
export PACKAGE_NAME=MyProject
export PACKAGE_VERSION=0.0.1
export TOC2_HOME=${PWD}/toc2
# versions before 20070629:
#. ${TOC2_HOME}/sbin/toconfigure "$@"
# newer versions:
. ${TOC2_HOME}/sbin/ "$@"
Edit the top-level Makefile so that it looks like this:
#!/usr/bin/make -f
include toc2.make
Don't worry that the file toc2.make doesn't yet exist - it will be automatically created.

Now edit to look like the following:
	@echo "Hello, world! $(toc2.emoticons.okay)"
all: hello
That file is really a Makefile, so it must follow makefile requirements when it comes to spacing and tabs.

Now run the configure script:
$ ./configure
and run make:
$ make
Hello, world! :-)
Here's a brief summary of what all of those files are for:
  • configure is just a stub which sets the package name and version, which are important variables for toc2, and calls the toc2 framework.
  • configure.MyProject is the "real" configure script. It gets called by the toc2 framework and contains all of your project-specific configuration tests.
  • is a template makefile file which filtered by the configure script to create toc2.MyProject.make. That file gets automatically imported into all of your Makefiles which include toc2.make.