Name

mk_chain_autotools — Build autotools source component

Synopsis

MODULES="... chain-autotools ..."

mk_chain_autotools options... -- configure_params...

Options

MAKE_BUILD_TARGET=name

The target name to pass to make when building the component. Defaults to nothing (e.g. the default target in the Makefile, usually "all").

MAKE_INSTALL_TARGET=name

The target name to pass to make when installing the component. Defaults to "install".

INSTALL_PRE=func

Specifies a custom function to run before installing the component into the output directory. The function is passed the path to the output directory.

INSTALL_POST=func

Specifies a custom function to run after installing the component into the output directory. The function is passed the path to the output directory.

BUILDDEP_PATTERNS=inc_patterns

An optional list of patterns that will be passed to find to identify files within the source tree that should trigger a rebuild when changed. A reasonable default will be used if not specified that works for most C/C++ autotools projects.

BUILDDEP_EXCLUDE_PATTERNS=exc_patterns

An optional list of patterns that will be passed to find to prune when looking for files in the source tree. A reasonable default that skips all hidden files and directories will be used if not specified.

...

Any option supported by mk_chain_compiler.

configure_params

Additional parameters to pass to the component's configure script.

Description

Builds and installs an autotools (autoconf, automake, libtool) source component using mk_chain_compiler. Default configure and build functions are used that take the component through the usual configure, make, make install procedure.

The trailing positional arguments to this function are passed verbatim to the configure script of the component. In addition, flags such as --prefix are passed automatically according to how the MakeKit project was configured.

Examples

make()
{
    # Build popt in the popt-1.15 directory
    mk_autotools \
        SOURCEDIR="popt-1.15" HEADERS="popt.h" LIBS="popt" -- \
        --disable-nls
}