Next: , Up: Conditional Subdirectories   [Contents][Index] DIST_SUBDIRS

DIST_SUBDIRS lists subdirectories that are recursed into by ‘make maintainer-clean’, ‘make distclean’ and ‘make dist’.

All other recursive rules use SUBDIRS, which contains the subdirectories of the current directory that must be built (see Subdirectories). It must be defined manually; Automake will never guess a directory is to be built. As we will see in the next two sections, it is possible to define it conditionally so that some directory will be omitted from the build. SUBDIRS should always be a subset of DIST_SUBDIRS.

In our example, opt must always appear in DIST_SUBDIRS. as we always want to distribute it, However, ‘opt’ may not always appear in SUBDIRS,

There are two ways to give DIST_SUBDIRS a value:

These are shown in the following two sections.