automake: Directories

1 
1 7 Directories
1 *************
1 
1 For simple projects that distribute all files in the same directory it
1 is enough to have a single ‘Makefile.am’ that builds everything in
1 place.
1 
1    In larger projects, it is common to organize files in different
1 directories, in a tree.  For example, there could be a directory for the
1 program’s source, one for the testsuite, and one for the documentation;
1 or, for very large projects, there could be one directory per program,
1 per library or per module.
1 
1    The traditional approach is to build these subdirectories
1 recursively, employing _make recursion_: each directory contains its own
1 ‘Makefile’, and when ‘make’ is run from the top-level directory, it
1 enters each subdirectory in turn, and invokes there a new ‘make’
1 instance to build the directory’s contents.
1 
1    Because this approach is very widespread, Automake offers built-in
1 support for it.  However, it is worth nothing that the use of make
1 recursion has its own serious issues and drawbacks, and that it’s well
1 possible to have packages with a multi directory layout that make little
1 or no use of such recursion (examples of such packages are GNU Bison and
1 GNU Automake itself); see also the ⇒Alternative section below.
1 

Menu