This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Yelp » Tools »

yelp.m4

The yelp-tools package contains build utilities that help you build and install your help files according to the freedesktop.org help specification. The freedesktop.org help specification was jointly created by GNOME and KDE developers to create a single help system that all desktop environments use. To date, Yelp is the only implementation.

The build utilities are contained in a single file, yelp.m4. To use it, add the following to your configure.ac file:

You can also pass a space-separated list of options as the first argument to YELP_HELP_INIT:

The following options are currently recognized:

By default, the help directory is $PREFIX/help, and each language is installed to $PREFIX/help/$LANG/$HELP_ID/. The build utilities automatically provide a configure option --with-help-dir, allowing users to override the help directory.

The build utilities expect a layout that looks something like this:

There is a single Makefile.am file in the help directory that manages all translations. The help directory can have any name, or be arbitrarily deep. For projects with a single help document, it's common to simply use a top-level help directory.

The source files are expected to be in a directory called C. It's common to put images, videos, and other non-XML files in a subdirectory called media or figures. The actual name of the subdirectory doesn't matter, but examples on this page will use media.

Each translation has its own directory named according to the locale. That directory contains a PO file also named according to the locale. The name of the directory must match the base name of the PO file. For media files (those not translated using the PO files), translators add localized files using the same names and directory layout as the source files. If a media file does not need to be localized, you do not need to copy it. The build utilities take care of this automatically.

The Makefile.am file must start with the following line:

You can set the following variables:

The build utilities automatically handle make, make install, make uninstall, and make dist. Additionally, the following make targets are handled:


2024-10-23 10:58