automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conditional subdirectory configuration and distclean


From: Matt Fago
Subject: Conditional subdirectory configuration and distclean
Date: Fri, 14 Nov 2003 11:45:12 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

I have a project with a large number of subdirectories, only a few of which need to be built at any one time. Automake successfully builds only the desired directories using AM_CONDITIONAL.

However, ideally I would like to only run configure in the directories to be built. Configuration can take quite a while, and I'm not sure I want to use a cache (if that would even help much). It is possible to set AC_CONFIG_SUBDIRS conditionally such as with:

if test "opt" = true; then
  AC_CONFIG_SUBDIRS[opt]
else
  AC_CONFIG_SUBDIRS[bin]
fi

This does configure as desired, but the distclean target -- which uses DIST_SUBDIRS instead of SUBDIRS -- fails in the directories not configured (obviously -- no Makefile).

In this case, I would want distclean to attempt to run in all DIST_SUBDIRS, but issue a warning and continue if a Makefile is not found. As it is distclean issues an error and exits. I'd live with being able to set distclean to use SUBDIRS, but this could lead to an incomplete distclean in some cases.

Any suggestions?


 - Matt






reply via email to

[Prev in Thread] Current Thread [Next in Thread]