6.40. Less-429

The Less package contains a text file viewer.

6.40.1. Environment Settings

This package requires compiler variables to be set for the target in the environment.

export CC="${CLFS_TARGET}-gcc"
export CXX="${CLFS_TARGET}-g++"
export AR="${CLFS_TARGET}-ar"
export AS="${CLFS_TARGET}-as"
export RANLIB="${CLFS_TARGET}-ranlib"
export LD="${CLFS_TARGET}-ld"
export STRIP="${CLFS_TARGET}-strip"

6.40.2. Installation of Less

Prepare Less for compilation:

./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --prefix=/usr --sysconfdir=/etc

The meaning of the configure option:

--sysconfdir=/etc

This option tells the programs created by the package to look in /etc for the configuration files.

Compile the package:

make

Install the package:

make prefix=${CLFS}/usr install

Move less to /bin:

mv -v ${CLFS}/usr/bin/less ${CLFS}/bin

6.40.3. Contents of Less

Installed programs: less, lessecho, and lesskey

Short Descriptions

less

A file viewer or pager; it displays the contents of the given file, letting the user scroll, find strings, and jump to marks

lessecho

Needed to expand meta-characters, such as * and ?, in filenames on Unix systems

lesskey

Used to specify the key bindings for less