automake: Headers

1 
1 9.2 Header files
1 ================
1 
1 Header files that must be installed are specified by the ‘HEADERS’
1 family of variables.  Headers can be installed in ‘includedir’,
1 ‘oldincludedir’, ‘pkgincludedir’ or any other directory you may have
1 defined (⇒Uniform).  For instance,
1 
1      include_HEADERS = foo.h bar/bar.h
1 
1 will install the two files as ‘$(includedir)/foo.h’ and
1 ‘$(includedir)/bar.h’.
1 
1    The ‘nobase_’ prefix is also supported,
1 
1      nobase_include_HEADERS = foo.h bar/bar.h
1 
1 will install the two files as ‘$(includedir)/foo.h’ and
1 ‘$(includedir)/bar/bar.h’ (⇒Alternative).
1 
1    Usually, only header files that accompany installed libraries need to
1 be installed.  Headers used by programs or convenience libraries are not
1 installed.  The ‘noinst_HEADERS’ variable can be used for such headers.
1 However when the header actually belongs to a single convenience library
1 or program, we recommend listing it in the program’s or library’s
1 ‘_SOURCES’ variable (⇒Program Sources) instead of in
1 ‘noinst_HEADERS’.  This is clearer for the ‘Makefile.am’ reader.
1 ‘noinst_HEADERS’ would be the right variable to use in a directory
1 containing only headers and no associated library or program.
1 
1    All header files must be listed somewhere; in a ‘_SOURCES’ variable
1 or in a ‘_HEADERS’ variable.  Missing ones will not appear in the
1 distribution.
1 
1    For header files that are built and must not be distributed, use the
1 ‘nodist_’ prefix as in ‘nodist_include_HEADERS’ or
1 ‘nodist_prog_SOURCES’.  If these generated headers are needed during the
11 build, you must also ensure they exist before they are used (⇒
 Sources).
1