Placing header files in a subdirectory of /usr/include with automake?
As well as pkginclude_HEADERS
, which you mention, you can also install header files into an arbitrary subdirectory of /usr/include
with any name you like, like this:
otherincludedir = $(includedir)/arbitrary_name
otherinclude_HEADERS = a.h b.h
The advantage of using pkginclude_HEADERS = publicHeader.h is that in a large system, each package stay in its own subdirectory of $prefix/include and avoids the chance of overwriting headers from different package with the same name. Furthermore, this naming convention helps users easily locate the header for a particular package.
Looks like I asked Stack Overflow too quickly ;)
With a little more searching, I found that if I use pkginclude_HEADERS
instead of include_HEADERS
, the headers go in /usr/include/[package name]
.
http://realmike.org/blog/2010/07/18/gnu-automake-by-example/