[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding #includes from a yacc .y.

From: Nick Bowler
Subject: Re: Finding #includes from a yacc .y.
Date: Mon, 20 Nov 2017 14:24:47 -0500

Hi Ralph,

On 2017-11-20, Ralph Corderoy <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]