DIST_SUBDIRS lists subdirectories that are recursed into by
‘make distclean’ and ‘make dist’.
other recursive rules use
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
In our example, opt must always
as we always want to distribute it,
However, ‘opt’ may not always appear in
There are two ways to give
DIST_SUBDIRS a value:
SUBDIRSis defined conditionally using Automake conditionals, Automake will define
DIST_SUBDIRSautomatically from the possible values of
SUBDIRSin all conditions.
DIST_SUBDIRSwill not be defined correctly because Automake does not know the possible values of these variables. In this case
DIST_SUBDIRSneeds to be defined manually.
These are shown in the following two sections.