| So far, we've only dealt with single-directory projects. Automake can also handle projects with many directories. The variable `SUBDIRS' is used to list the subdirectories which should be built. Here is an example from Automake itself:
Automake does not need to know the list of subdirectories statically, so there is no `EXTRA_SUBDIRS' variable. You might think that Automake would use `SUBDIRS' to see which `Makefile.am' s to scan, but it actually gets this information from `configure.in' . This means that, if you have a subdirectory which is optionally built, you should still list it unconditionally in your call to Subdirectories are always built in the order they appear, but cleaning rules (e.g., You can put `.' into `SUBDIRS' to control when the objects in the current directory are built, relative to the objects in the subdirectories. In the example above, targets in `.' will be built before subdirectories are built. If `.' does not appear in `SUBDIRS' , it is built following all the subdirectories. |