Chapter 10. Modules

Table of Contents

datafiles
data-files
data-files-ng
script-files
script-files-ng
data-files-tree
copy-files
copy-file-to-file
mkdir
pkgconfig
pkgconfig

datafiles

This module provides rules for installing data files during make install phase. It also defines two rules for copying files during build process (typically from source to build directory).

Implementation Note

This module currently works only with the autoconf format.

The following targets are defined in datafiles module:

data-files

Pseudo target that declares installable data files. Note that all files are installed into target directory, their relative directories are not preserved.

TagDescriptionDefault
srcdir

Directory where source files are.

$(SRCDIR)
files

List of files to copy. Names are relative to source directory. May be used more than once.

at least one use required
install-to

Directory where to install the files.

required

data-files-ng

Same as data-files, except that data-files-ng is real target and not pseudo target. This has two consequences: the target must have id set and it can be conditional.

script-files

Same as data-files, but installed files have executable permissions on Unix.

script-files-ng

Same as data-files-ng, but installed files have executable permissions on Unix.

data-files-tree

Unlike data-files, this rule preserves directory structure of installed files. Available tags are same and have same meaning as data-files tags.

copy-files

Copies file(s) from source directory to destination directory. Creates destionation directory if it doesn't exist.

TagDescription
srcdir

Directory where source files are. This tag is not required (unlike the other two) -- source directory is empty by default.

files

List of files to copy. Names are relative to source directory.

dstdir

Directory where to copy the files.

copy-file-to-file

Copies single file to another file.

TagDescription
srcSource file.
dstDestination file.

mkdir

Creates directory.

TagDescription
dirName of the directory.

pkgconfig

This module provides a simple rule for installing and uninstalling pkg-config template files.

Implementation Note

This module currently works only with the autoconf format because pkg-config files contain values such as prefix that are set by configure.

The following targets are defined in pkgconfig module:

pkgconfig

Installs a .pc template file in the standard location of the pkgconfig files (i.e. LIBDIR/pkgconfig).

TagDescriptionDefault
src

Name of the pkgconfig file to install. Can contain a relative path. E.g. build/myprj.pc

$(id).pc