Integration with autogen

Most projects will have an autogen.sh script to setup the build infrastructure after a checkout from version control system (such as cvs/svn/git). GTK-Doc comes with a tool called gtkdocize which can be used in such a script. It should be run before autoheader, automake or autoconf.

Example 2-5Running gtkdocize from autogen.sh
gtkdocize || exit 1

When running gtkdocize it copies gtk-doc.make to your project root (or any directory specified by the --docdir option). It also checks you configure script for the GTK_DOC_CHECK invocation. This macro can be used to pass extra parameters to gtkdocize.

Historically GTK-Doc was generating template files where developers entered the docs. This turned out to be not so good (e.g. the need for having generated files under version control). Since GTK-Doc 1.9 the tools can get all the information from source comments and thus the templates can be avoided. We encourage people to keep documentation in the code. gtkdocize supports now a --flavour no-tmpl option that chooses a makefile that skips tmpl usage totally. Besides adding the option directly to the command invocation, they can be added also to an environment variable called GTKDOCIZE_FLAGS or set as a 2nd parameter in GTK_DOC_CHECK macro in the configure script. If you have never changed file in tmpl by hand and migrating from older gtkdoc versions, please remove the directory (e.g. from version control system).