[lug] Automake question: Checking for subdirs?
Scott A. Herod
herod at interact-tv.com
Mon Mar 4 15:40:48 MST 2002
Tom Tromey wrote:
>
> >>>>> "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.
Good point. Changing automake would be bad.
> Ordinarily if you want to conditionally build a subdirectory, you do
> the checking in configure and define SUBDIRS based on the results.
So, if I understand this, in configure.in I call
AC_CONFIG_SUBDIRS(all possible subdirectories)
I see where those directories appear in the created configure but
don't see that the directories that it actually found is saved.
Do I need to call AC_CHECK_FILES for each directory and save the
results? subdirs contains the entire list of subdirectories.
Scott
More information about the LUG
mailing list