I'm currently working on a small library. I only want the contents of the 'examples' directory to be build if configure has been run with --enable-examples. Thus, according to the automake introduction (http://sources.redhat.com/automake/automake.html#Directories) my configure.ac contains:

AC_ARG_ENABLE(examples,
[ --enable-examples Builds the examples ],
[ examples=true ])
AM_CONDITIONAL([EXAMPLES], test x$examples = xtrue)
AC_CONFIG_FILES([Makefile vtkmm/Makefile examples/Makefile])

My toplevel Makefile.am contains:

if EXAMPLES
MAYBE_EXAMPLES = examples
endif
SUBDIRS = $(GENERIC_LIBRARY_NAME) $(MAYBE_EXAMPLES)

At the first glance, this seems to work fine. But when i 'make dist', the examples directory
is not included, allthough

'As you can't see, running make dist will recurse into both src/ and opt/ directories because make dist, unlike make all, doesn't use the |SUBDIRS| variable. It uses the |DIST_SUBDIRS| variable.'-(http://sources.redhat.com/automake/automake.html#Directories)

By the way, i'm using automake 1.9.6 and autoconf 2.59.

Maybe anyone here can give me a hint what i'm doing wrong ...

Thanks,
Matthias Langer


Reply via email to