[lug] Automake question: Checking for subdirs?

Tom Tromey tromey at redhat.com
Mon Mar 4 13:37:21 MST 2002


>>>>> "Scott" == Scott A Herod <herod at interact-tv.com> writes:

Scott> Another automake question if you don't mind.  With automake you
Scott> can add SUBDIRS and the resulting Makefiles will recursively
Scott> enter these directories.  However, the scripts don't check to
Scott> see if the subdirectories actually exist.  I'd like to wrap a
Scott> test around the scripts in the Makefile that verifies the
Scott> subdirectory exist before descending into it.  Will I have to
Scott> change the configuration defined in /usr/share/automake/ to do
Scott> that?

You don't want to do that, since that would mean that your users
wouldn't be able to rebuild their Makefile.in's -- or in other words,
you'd be forking automake.

Ordinarily if you want to conditionally build a subdirectory, you do
the checking in configure and define SUBDIRS based on the results.

Tom



More information about the LUG mailing list