Analyzing Our New Build System

Now let's look at what we put into those two simple Makefile.am files, beginning with the top-level Makefile.am file (shown in Example 5-2).

Example 5-2. Makefile.am: The top-level Makefile.am file contains only a subdirectory reference.

SUBDIRS = src

This single line of text tells Automake several things about our project:

  • One or more subdirectories contain makefiles to be processed in addition to this file.[71]

  • Directories in this space-delimited list should be processed in the order specified.

  • Directories in this list should be recursively processed for all primary targets.

  • Directories in this list should be treated as part of the project distribution, unless otherwise specified.

As with most Automake constructs, SUBDIRS ...

Get Autotools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.