I have two projects being built using Automake. Here are simplified versions of the Automake.amS:
AM_CPPFLAGS = -I/some/include_path
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.cpp
libegfconfig_la_LIBADD = -lxml2
and
AM_CPPFLAGS = -I/some/include_path # I want this to happen implicitly
lib_LTLIBRARIES = libbar.la
libbar_la_SOURCES = bar.cpp
libbar_la_LIBADD = $(top_builddir)/some/path/libfoo.la
The second file only has to specify the additional include path because bar.cpp includes foo.hpp which includes something from /some/include_path. I would like the second project to implicitly add the additional include path based on the fact that the first project does so and is a dependency.
Is this possibly?