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


[Home] [TitleIndex] [WordIndex

Documentation Team

Add or remove help pages or media

A Makefile.am describes which files should be built and installed. The user help pages are normally located inside help/C/ and media inside help/C/media, in which case you can find the help Makefile.am in help/Makefile.am. If you add or remove pages or images, you need to update the Makefile.am so that they are installed correctly.

Most help Makefile.am look like:

@YELP_HELP_RULES@

HELP_ID = <application-name>

HELP_FILES = \
        index.page \
        legal.xml

HELP_MEDIA = \
        media/icon.png

HELP_LINGUAS = es hu

Add a new page or new media

List new pages under HELP_FILES and new media under HELP_MEDIA. Make sure that all items are indented with a tab, and are trailed by a \ except for the last item in the list, which must not be trailed by a \. If you are not sure whether you have updated the Makefile.am correctly, you should build your branch… but you've been building it all along, right?

Pages and media which are not listed in the Makefile.am will not be seen by the users.

For example, if you want to add a screenshot to the sample file above, you will need to add it to the list:

HELP_MEDIA = \
        media/icon.png \
        media/screenshot.png

Delete a page or media

When you delete a page or a media item, you must remove it from the Makefile.am. If you do not remove it from the Makefile.am, you will break the build, someone will become very upset with you and bunnies will die. This is bad.

If you remove the last page or media item in the list, remember to remove the trailing \ from the previous line as well so that the last item in the list never has a \ following it.

For example, if you want to delete index.page from the sample file above, you will need to remove it from the file list:

HELP_FILES = \
        legal.xml

Stubs and Makefiles

.page.stub files are never included in the Makefile.am because you don't want the users to see them.

What happens if I don't update the Makefile?

You will break the build and/or not distribute the pages or media to users.

What about the other bits?

@YELP_HELP_RULES@ is build rule. Do not touch this or things will break.

HELP_ID is the ID of the help. Do not touch this or things will break.

HELP_LINGUAS is the languages into which the help has been translated. Do not touch this or you will make the translators very sad. It is always safer to keep translators happy.


2024-10-23 11:04