Linux From Scratch: Version 5.0-pre1
Prev | Chapter 6. Installing basic system software | Next

# Installing Gawk-3.1.3

    Estimated build time:           0.2 SBU
    Estimated required disk space:  15 MB

## Contents of Gawk

(Last checked against version 3.1.1.)

Gawk is an awk implementation that is used to manipulate text files.

Gawk installs the following:

### Program Files

awk, gawk, gawk-3.1.1, grcat, igawk, pgawk, pgawk-3.1.1, pwcat

##

## Gawk Installation Dependencies

(No dependencies checked yet.)

##

## Installation of Gawk

Before installing the Gawk package you have to apply a patch, which fixes the following issues:

- Gawk's default location for libexecdir is `$prefix/libexecdir/awk`. This location doesn't comply with FHS (which never mentions a directory called libexecdir).

- The patch allows us to pass --libexecdir 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 (`/usr/bin` in the book).

- The default data directory for gawk is `$prefix/share/awk`. A package specific directory should be named using the package and version (like gawk-3.1.3 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 `$prefix/share/gawk-3.1.3` to be more correct.

- The patch ensures that this directory (`$prefix/share/gawk-3.1.3`) is removed along with its contents on a make uninstall.

    patch -Np1 -i ../gawk-3.1.3.patch

Now prepare Gawk for compilation:

    ./configure --prefix=/usr --libexecdir=/usr/bin

Compile the package:

    make

This package has a testsuite 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:

    make check

And install the package:

    make install

Prev | Home | Next
Installing Findutils-4.1.20 | Up | Installing Ncurses-5.3