manpagez: man pages & more
info automake
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.2 Header files

Header files that must be installed are specified by the HEADERS family of variables. Headers can be installed in includedir, oldincludedir, pkgincludedir or any other directory you may have defined (see section The Uniform Naming Scheme). For instance,

include_HEADERS = foo.h bar/bar.h

will install the two files as ‘$(includedir)/foo.h’ and ‘$(includedir)/bar.h’.

The nobase_ prefix is also supported,

nobase_include_HEADERS = foo.h bar/bar.h

will install the two files as ‘$(includedir)/foo.h’ and ‘$(includedir)/bar/bar.h’ (see section An Alternative Approach to Subdirectories).

Usually, only header files that accompany installed libraries need to be installed. Headers used by programs or convenience libraries are not installed. The noinst_HEADERS variable can be used for such headers. However when the header actually belongs to a single convenience library or program, we recommend listing it in the program’s or library’s _SOURCES variable (see section Defining program sources) instead of in noinst_HEADERS. This is clearer for the ‘’ reader. noinst_HEADERS would be the right variable to use in a directory containing only headers and no associated library or program.

All header files must be listed somewhere; in a _SOURCES variable or in a _HEADERS variable. Missing ones will not appear in the distribution.

For header files that are built and must not be distributed, use the nodist_ prefix as in nodist_include_HEADERS or nodist_prog_SOURCES. If these generated headers are needed during the build, you must also ensure they exist before they are used (see section Built Sources).

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on January 25, 2014 using texi2html 5.0.

© 2000-2020
Individual documents may contain additional copyright information.