[Top][All Lists]

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

Re: Finding #includes from a yacc .y.

From: Ralph Corderoy
Subject: Re: Finding #includes from a yacc .y.
Date: Mon, 20 Nov 2017 18:51:22 +0000

Hi again,

> 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

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 bar.h is found whether building locally or in another directory?

It works in this one case, but I know that doesn't necessarily mean it's
right.  :-)

Cheers, Ralph.

reply via email to

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