The build system installs a file by copying it to the directory given in the Makfile.am variable where the file was listed. For example, with:
bin_PROGRAMS = hello subdir/goodbye
In this example, the build system will install both ‘hello’ and ‘goodbye’ in ‘$(bindir)’. It uses the base name of the file when installing, so the ‘subdir/’ part of the filename is not used. See Variables based on primaries.
Sometimes it is useful to avoid the basename step at install time. For
instance, you might have a number of header files in subdirectories of
the source tree that are laid out precisely how you want to install
them. In this situation, you can use the
nobase_include_HEADERS = stdio.h sys/types.h
will install stdio.h in ‘$(includedir)’ and types.h in ‘$(includedir)/sys’.
For most file types, Automake will install multiple files at once, while
avoiding command line length issues (see Length Limitations). Since
install programs will not install the same file twice in
one invocation, you may need to ensure that file lists are unique within
one variable such as ‘nobase_include_HEADERS’ above.
You should not rely on the order in which files listed in one variable
are installed. Likewise, to cater for parallel
make, you should not
rely on any particular file installation order even among different
file types (library dependencies are an exception here).