From: Akim Demaille Date: Sat, 14 Jul 2012 07:07:52 +0000 (+0200) Subject: tests: fix bison input file X-Git-Tag: v1.12.3~43^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9404f529bc178d75ee8003853e1fa67281cd080d;p=thirdparty%2Fautomake.git tests: fix bison input file Do not provide implementations in the %{...%} section, especially if the header is included elsewhere, since then the linker will complain about multiple definitions. Reported by Stefano Lattarini, . * t/yacc-bison-skeleton.sh (zardoz.y): Define yylex and yyerror in the epilogue. --- diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh index 5bf909239..9e9f514f0 100755 --- a/t/yacc-bison-skeleton.sh +++ b/t/yacc-bison-skeleton.sh @@ -35,11 +35,14 @@ END # Parser. cat > zardoz.y << 'END' %{ -int yylex () { return 0; } -void yyerror (const char *s) { return; } +int yylex (); +void yyerror (const char *s); %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; +%% +int yylex () { return 0; } +void yyerror (const char *s) { return; } END cat > foo.c << 'END'