<sect2><title> </title><para> </para></sect2> <sect2> <title>Installation of Gawk</title> <para>Before installing the Gawk package you have to apply a patch, which fixes the following issues:</para> <itemizedlist> <listitem><para>Gawk's default location for libexecdir is <filename class="directory">$prefix/libexecdir/awk</filename>. This location doesn't comply with FHS (which never mentions a directory called libexecdir).</para></listitem> <listitem><para>The patch allows us to pass <emphasis>--libexecdir</emphasis> to the configure script (without gawk tacking on /awk to the end), so that we can use a more appropriate location for gawk's libexecdir (<filename class="directory">/usr/bin</filename> in the book).</para></listitem> <listitem><para>The default data directory for gawk is <filename class="directory">$prefix/share/awk</filename>. A package specific directory should be named using the package and version (like gawk-&gawk-version; instead of awk) because there may be more than one awk interpreter on a system (and more than one version of gawk). The patch changes this to <filename class="directory">$prefix/share/gawk-&gawk-version;</filename> to be more correct.</para></listitem> <listitem><para>The patch ensures that this directory (<filename class="directory">$prefix/share/gawk-&gawk-version;</filename>) is removed along with its contents on a make uninstall.</para></listitem> </itemizedlist> <screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen> <para>Now prepare Gawk for compilation:</para> <screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen> <para>Compile the package:</para> <screen><userinput>make</userinput></screen> <para>This package has a test suite available which can perform a number of checks to ensure it built correctly. Should you choose to run it, the following command will do so:</para> <screen><userinput>make check</userinput></screen> <para>And install the package:</para> <screen><userinput>make install</userinput></screen> </sect2>