# 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.

Tag | Description | Default
--- | --- | ---
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 , 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 , but installed files have executable permissions on Unix.

## script-files-ng

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

## data-files-tree

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

## copy-files

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

Tag | Description
--- | ---
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.

Tag | Description
--- | ---
src | Source file.
dst | Destination file.

## mkdir

Creates directory.

Tag | Description
--- | ---
dir | Name of the directory.