So I have this project libfoo, want to install its headers at $(includedir)/libfoo, and use non-recursive make for everything. Following what I read long ago in "An Alternative Approach to Subdirectories", I've been doing the following:
src_headers = $(srcdir)/libfoo nobase_include_HEADERS = $(src_headers)/bar.h $(src_headers)/baz.h
But our project is required to work in automake 1.7, and this nobase usage seems to fire a bug in certain "make install" conditions. Trying to find an alternative approach to the alternative approach, I came up with this:
libfooincludedir = $(includedir)/libfoo libfooinclude_HEADERS = $(src_headers)/bar.h $(src_headers)/baz.h
Then I remembered the pkg* variables, and indeed, there's one for includes:
pkginclude_HEADERS = $(src_headers)/bar.h $(src_headers)/baz.h
It seems to work fine. I find this cleaner than nobase_include_HEADERS, and also allow the header directory in $srcdir ($src_headers) to be named something else than the package name.
I don't know if all that sounded silly or obvious, but if not, may I suggest a cross-reference from the "An Alternative Approach..." node to the "Uniform Naming Scheme" node?
--
Leonardo Boiko
signature.asc
Description: OpenPGP digital signature
