mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Require new Bison version on Windows, fallback to prebuilt files if not present
This commit is contained in:
parent
e327c7e978
commit
1c9ff40236
@ -199,14 +199,10 @@ pop_struct() {
|
||||
|
||||
/* This is a bison-specific declaration to enable recursive calls to
|
||||
yyparse(). It changes the calling sequence to yylex(), passing
|
||||
pointers to the current yylval and yylloc. */
|
||||
%pure_parser
|
||||
|
||||
/* Ideally we'd define this instead of the above, which gives us better
|
||||
tracking of error locations, but we are still using a very old
|
||||
version of Bison on Windows. */
|
||||
//%define api.pure full
|
||||
//%locations
|
||||
pointers to the current yylval and yylloc. It also adds a pointer
|
||||
to the current lloc to yyerror, which gives us better diagnostics. */
|
||||
%define api.pure full
|
||||
%locations
|
||||
|
||||
%token <u.real> REAL
|
||||
%token <u.integer> INTEGER
|
||||
|
@ -419,9 +419,6 @@ if (RUNTIME):
|
||||
# Unused packages for runtime.
|
||||
PkgDisable(pkg)
|
||||
|
||||
if (GetHost() == 'windows'):
|
||||
os.environ["BISON_SIMPLE"] = GetThirdpartyBase()+"/win-util/bison.simple"
|
||||
|
||||
if (INSTALLER and RTDIST):
|
||||
exit("Cannot build an installer for the rtdist build!")
|
||||
|
||||
|
@ -431,9 +431,12 @@ def GetBison():
|
||||
if BISON is not None:
|
||||
return BISON
|
||||
|
||||
win_util = os.path.join(GetThirdpartyBase(), 'win-util')
|
||||
if GetHost() == 'windows' and os.path.isdir(win_util):
|
||||
BISON = os.path.join(win_util, 'bison.exe')
|
||||
# We now require a newer version of Bison than the one we previously
|
||||
# shipped in the win-util dir. The new version has a 'data'
|
||||
# subdirectory, so check for that.
|
||||
win_util_data = os.path.join(GetThirdpartyBase(), 'win-util', 'data')
|
||||
if GetHost() == 'windows' and os.path.isdir(win_util_data):
|
||||
BISON = os.path.join(GetThirdpartyBase(), 'win-util', 'bison.exe')
|
||||
elif LocateBinary('bison'):
|
||||
BISON = 'bison'
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user