Chapter 4. Common make+ targets

Table of Contents

Configuring the package

The make+ command looks to the end user a lot like ordinary make. It is invoked with a list of targets, each target telling make+ to perform a particular task. The common targets, which will be familiar to people who use make are:

make+ configure

Configure the package, ready to compile it.

make+, make+ all

Compile the package. (Because "all" is the default target, it can be omitted if it is the only target).

make+ test

Run any provided tests on the package.

make+ install

Install the package.

make+ dist

Create a source tarball of the package.

make+ bindist

Create a binary tarball of the package.

make+ rpm

Create an RPM (Red Hat Linux Package Manager) package, if this is supported by the architecture.

make+ deb

Create a Debian GNU/Linux package, if this is supported by the architecture.

make+ mp_release

Create all possible package formats, create the website, and upload everything to the web server.

Configuring the package

This step replaces the ./configure command generated by other build systems, notably autoconf. The configuration step is intended to sniff out the capabilities of the system and decide which optional parts of the package should be built.

Typical capabilities include detecting that the required compiler tools are installed, checking for header files, and checking whether libraries are installed.

Your Makefile+ should contain a configure target similar to this one:

Example 4.1. Basic configure target

configure:
	$(MP_CONFIGURE_START)
	$(MP_CHECK_HEADERS) string.h unistd.h
	$(MP_CONFIGURE_END)

In the example above, make+ will generate a C header file called config.h (in the build subdirectory, naturally) containing:

/* Generated automatically by make+. */

#ifndef MP_CONFIG_H
#define MP_CONFIG_H

#define PACKAGE "foo"
#define VERSION "0.0.1"
#define HAVE_STRING_H 1
#define HAVE_UNISTD_H 1

#endif /* MP_CONFIG_H */