mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
c++: provide a means to control how location.hh is included
Users may want to generate the location file elsewhere, say $top_srcdir/include/ast/location.hh. Yet, we should not generate `#include "$top_srcdir/include/ast/location.hh"` but probably something like `#include <ast/location.hh>`, or `#include "ast/location.hh", or `#include <location.hh>`. It entirely depends on the compiler flags (-I/-isystem) that are used. Bison cannot guess what is expected, so let's give the user a means to tell how the location file should be included. * data/location.cc (b4_location_file): New. * data/glr.cc, data/lalr1.cc: Use it.
This commit is contained in:
@@ -247,7 +247,7 @@ b4_percent_code_get([[requires]])[
|
||||
#include <string>
|
||||
|
||||
]m4_ifdef([b4_location_file],
|
||||
[[# include "]b4_location_file["]])[
|
||||
[[# include ]b4_location_include])[
|
||||
|
||||
]b4_null_define[
|
||||
|
||||
|
||||
Reference in New Issue
Block a user