automake: Two-Part Install

1 
1 2.2.7 Two-Part Installation
1 ---------------------------
1 
1 In our last example (⇒VPATH Builds), a source tree was shared by
1 two hosts, but compilation and installation were done separately on each
1 host.
1 
1    The GNU Build System also supports networked setups where part of the
1 installed files should be shared amongst multiple hosts.  It does so by
1 distinguishing architecture-dependent files from
1 architecture-independent files, and providing two ‘Makefile’ targets to
1 install each of these classes of files.
1 
1    These targets are ‘install-exec’ for architecture-dependent files and
1 ‘install-data’ for architecture-independent files.  The command we used
1 up to now, ‘make install’, can be thought of as a shorthand for ‘make
1 install-exec install-data’.
1 
1    From the GNU Build System point of view, the distinction between
1 architecture-dependent files and architecture-independent files is based
1 exclusively on the directory variable used to specify their installation
1 destination.  In the list of directory variables we provided earlier
1 (⇒Standard Directory Variables), all the variables based on
1 EXEC-PREFIX designate architecture-dependent directories whose files
1 will be installed by ‘make install-exec’.  The others designate
1 architecture-independent directories and will serve files installed by
1 ‘make install-data’.  ⇒The Two Parts of Install, for more
1 details.
1 
1    Here is how we could revisit our two-host installation example,
1 assuming that (1) we want to install the package directly in ‘/usr’, and
1 (2) the directory ‘/usr/share’ is shared by the two hosts.
1 
1    On the first host we would run
1      [HOST1] ~ % mkdir /tmp/amh && cd /tmp/amh
1      [HOST1] /tmp/amh % /nfs/src/amhello-1.0/configure --prefix /usr
1      ...
1      [HOST1] /tmp/amh % make && sudo make install
1      ...
1 
1    On the second host, however, we need only install the
1 architecture-specific files.
1      [HOST2] ~ % mkdir /tmp/amh && cd /tmp/amh
1      [HOST2] /tmp/amh % /nfs/src/amhello-1.0/configure --prefix /usr
1      ...
1      [HOST2] /tmp/amh % make && sudo make install-exec
1      ...
1 
1    In packages that have installation checks, it would make sense to run
1 ‘make installcheck’ (⇒Basic Installation) to verify that the
1 package works correctly despite the apparent partial installation.
1