LDP/LDP/retired/LFS/chapter6/bison-inst.xml

31 lines
875 B
XML

<sect2>
<title>Installation of Bison</title>
<para>Install Bison by running the following commands:</para>
<para><screen><userinput>./configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;--datadir=/usr/share/bison &amp;&amp;
make &amp;&amp;
make install</userinput></screen></para>
<para>Some programs don't know about bison and try to find the yacc program
(bison is a (better) alternative for yacc). So to please those few
programs out there we'll create a yacc script that calls bison and have
it emulate yacc's output file name conventions.</para>
<para>Create a new file <filename>/usr/bin/yacc</filename> by running the
following:</para>
<para><screen><userinput>cat &gt; /usr/bin/yacc &lt;&lt; "EOF"</userinput>
#!/bin/sh
# Begin /usr/bin/yacc
exec /usr/bin/bison -y "$@"
# End /usr/bin/yacc
<userinput>EOF
chmod 755 /usr/bin/yacc</userinput></screen></para>
</sect2>