Next: , Previous: , Up: Install   [Contents][Index]

6.2.2 The Two Parts of Install

Automake generates separate install-data and install-exec rules, in case the installer is installing on multiple machines that share directory structure—these targets allow the build system to install the machine-independent parts only once. install-exec installs platform-dependent files, and install-data installs platform-independent files. The install target depends on both of these targets.

While Automake tries to automatically segregate objects into the correct category, the Makefile.am author is, in the end, responsible for making sure this is done correctly.

Variables using the standard directory prefixes ‘data’, ‘info’, ‘man’, ‘include’, ‘oldinclude’, ‘pkgdata’, or ‘pkginclude’ are installed by install-data.

Variables using the standard directory prefixes ‘bin’, ‘sbin’, ‘libexec’, ‘sysconf’, ‘localstate’, ‘lib’, or ‘pkglib’ are installed by install-exec.

For instance, data_DATA files are installed by install-data, while bin_PROGRAMS files are installed by install-exec.

Any variable using a user-defined directory prefix with ‘exec’ in the name (e.g., myexecbin_PROGRAMS) is installed by install-exec. All other user-defined prefixes are installed by install-data.