mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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:
@@ -163,8 +163,8 @@ m4_define([b4_shared_declarations],
|
||||
# include <vector>
|
||||
|
||||
]b4_cxx_portability[
|
||||
]m4_ifdef([b4_location_file],
|
||||
[[# include "]b4_location_file["]])[
|
||||
]m4_ifdef([b4_location_include],
|
||||
[[# include ]b4_location_include])[
|
||||
]b4_variant_if([b4_variant_includes])[
|
||||
|
||||
]b4_attribute_define[
|
||||
|
||||
Reference in New Issue
Block a user