[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch bison for M4 arguments
From: |
Akim Demaille |
Subject: |
Re: Patch bison for M4 arguments |
Date: |
Tue, 16 Oct 2018 18:35:15 +0200 |
Hi Barry,
Le 16 oct. 2018 A 15:41, Barry Davis <address@hidden> a
A(c)crit :
Bison runs M4. It adds BISON_PKGDATADIR to the search path for M4
and
launches M4 to run on m4sugar/m4sugar.m4. m4sugar
includes m4sugar/foreach.m4 which is found on M4s search path.
Somewhere along the line we include c.m4 which
includes b4_pkgdatadir/[c-like.m4], but M4 doesn't know the
b4_pkgdatadir
variable and so fails to include.
Yes, it does. It is given to m4 via stdin.
$ ln -s data hello-world
$ BISON_PKGDATADIR=hello-world /opt/local/bin/bison aEUR"trace=m4
/tmp/foo.y |& grep b4_pkgdatadir
m4trace:stdin:315: -1- id 3238: m4_define([b4_pkgdatadir],
[[hello-world]]) -> ???
m4trace:hello-world/c-skel.m4:21: -1- id 3879:
b4_glr_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])]) ->
???
m4trace:hello-world/c-skel.m4:21: -1- id 3879: b4_glr_if(...) ->
[b4_flag_if([glr], [m4_define([b4_used_skeleton],
[b4_pkgdatadir/[glr.c]])], [])]
m4trace:hello-world/c-skel.m4:21: -1- id 3880: b4_flag_if([glr],
[m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])], []) -> ???
[1], [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])],
m4trace:hello-world/c-skel.m4:21: -1- id 3881: m4_case([0], [0], [],
[1], [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])],
[m4_fatal([invalid glr value: ]b4_glr_flag)]) -> ???
[_m4_case])]m4_dquote($m4_eval([(6 + 1) &
~1]))[)])_m4_case([0],[0],[],[1],[m4_define([b4_used_skeleton],
[b4_pkgdatadir/[glr.c]])],[m4_fatal([invalid glr value:
]b4_glr_flag)])])]
[_m4_case])]m4_dquote($m4_eval([(6 + 1) &
~1]))[)])_m4_case([0],[0],[],[1],[m4_define([b4_used_skeleton],
[b4_pkgdatadir/[glr.c]])],[m4_fatal([invalid glr value:
]b4_glr_flag)])]) -> ???
[_m4_case])]m4_dquote($m4_eval([(6 + 1) &
~1]))[)])_m4_case([0],[0],[],[1],[m4_define([b4_used_skeleton],
[b4_pkgdatadir/[glr.c]])],[m4_fatal([invalid glr value:
]b4_glr_flag)])]
aEUR|
This is used extensively by the test suite to check a non-installed
bison.
I've seen this building krb5-1.16.1 in a cross environment where
bison-3.1
is installed and ran from a staging area with the environment
variables M4
and BISON_PKGDATADIR set.
Was it set to the appropriate value?
Could you provide us with more details about that?