6.48. Make-3.81

The Make package contains a program for compiling packages.

6.48.1. Installation of Make

The Make package can build with fairly strict compiler warnings. Add compiler warnings to Make with the following command:

find . -type f -name Makefile.in -exec \
    sed 's/^CFLAGS =.*/& -Wall -Wformat-security \\\
    -Werror -Wfatal-errors/' -i.orig {} \;

The -D_FORTIFY_SOURCE=2 GCC option will produce warnings about unused return values. The next command removes that warning by wrapping the function in an if statement which uses the return value of chdir():

sed 's/chdir (directory_before_chdir);/if (chdir (directory_before_chdir) != 0)\
\terror (NILF, "Failed to return to original directory %s", directory_before_chdir);/' \
    -i.orig main.c

Prepare Make for compilation:

./configure --prefix=/usr

Compile the package:

make

To test the results, issue: make check.

Install the package:

make install

6.48.2. Contents of Make

Installed program: make

Short Descriptions

make

Automatically determines which pieces of a package need to be (re)compiled and then issues the relevant commands