Subdirs

In the normal case you only need to list the sub-directories:

SUBDIRS = foo bar

("." is implicitly last, i.e. the current directory is compiled after its subdirectories).

To compile some subdirs after the current dir, insert "." explicitely, as in

SUBDIRS = mylib . myplugins

To automatically compile all subdirectories, use

SUBDIRS = $(AUTODIRS)

To compile a subdirectory optionally, use the following syntax:

if compile_KOPAINTER
KOPAINTERDIR = kopainter
endif

SUBDIRS = foo bar $(KOPAINTERDIR)

This uses an "automake conditional", which will be either true or false depending on whether something was found. To declare the automake conditional, use the following syntax in your configure.in.in:

AM_CONDITIONAL(compile_KOPAINTER, ...)

The second argument is the test, for instance

test "$foo" = "yes"