Hi Ralph,

On 2017-11-20, Ralph Corderoy <ra...@inputplus.co.uk> wrote:
>> It seems wrong for foo.y to have to `#include
>> "path/from/root/to/bar.h" since that means it has to alter if they
>> move around the hierarchy.  Is there another way?
>
> I can be more precise having dug into this project a bit.
> Currently, it has
>
>     sbr_libmh_a_CPPFLAGS = ${AM_CPPFLAGS} -I./sbr

This relative include path refers to the current working directory
of the compiler, which is normally the build directory and is thus
essentially equivalent to -I$(builddir)/sbr ...

> Would it be wrong or a misuse of top_srcdir to change that to
>
>     sbr_libmh_a_CPPFLAGS = ${AM_CPPFLAGS} -I$(top_srcdir)/sbr

... so if your headers are in the source directory, as is typical,
then something like this is perfectly sensible.

Cheers,
  Nick

Reply via email to