[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Toplevel configure.ac / Makefile.am for optional directories
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Toplevel configure.ac / Makefile.am for optional directories |
Date: |
Wed, 24 Nov 2004 23:43:55 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
>>> "J" == J T Conklin <address@hidden> writes:
[...]
J> if BUILD_TAO
J> SUBDIRS += TAO
J> endif
This means that the contents of TAO is conditionally built, but
the directory itself should be unconditionally configured
(TAO/Makefile is expected to be created) and unconditionally
distributed.
For instance
./configure
make distclean
will fail if TAO/Makefile does not exist.
See the `Conditional Subdirectories' section of the manual for
details.
[...]
J> $ autoreconf --install --force
J> Putting files in AC_CONFIG_AUX_DIR, `aux_config'.
J> Makefile.am:34: required directory ./TAO does not exist
J> autoreconf: failed to run automake: No such file or directory
J> Any suggestions?
I'm augmenting the aforementioned section with the following bits.
2004-11-24 Alexandre Duret-Lutz <address@hidden>
* doc/automake.texi (Conditional Subdirectories): More comments
about non-distributed subdirectories.
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.67
diff -u -r1.67 automake.texi
--- doc/automake.texi 24 Nov 2004 21:03:58 -0000 1.67
+++ doc/automake.texi 24 Nov 2004 22:28:39 -0000
@@ -2412,6 +2412,7 @@
@code{DIST_SUBDIRS}.
@subsection Non-configured Subdirectories
address@hidden Subdirectories, configured conditionally
The semantic of @code{DIST_SUBDIRS} is often misunderstood by some
users that try to @emph{configure and build} subdirectories
@@ -2431,7 +2432,7 @@
Building packages that do not configure every subdirectory is a tricky
business, and we do not recommend it to the novice as it is easy to
produce an incomplete tarball by mistake. We will not discuss this
-topic in depth here, yet for the adventurous there are a few rules to
+topic in depth here, yet for the adventurous here are a few rules to
remember.
@cartouche
@@ -2455,13 +2456,32 @@
@end cartouche
In order to prevent recursion in some non-configured directory you
-must therefore ensure that this directory do not appear in
+must therefore ensure that this directory does not appear in
@code{DIST_SUBDIRS} (and @code{SUBDIRS}). For instance if you define
@code{SUBDIRS} conditionally using @code{AC_SUBST} and do not define
@code{DIST_SUBDIRS} explicitly, it will be default to
@code{$(SUBDIRS)}; another possibility is to force @code{DIST_SUBDIRS
= $(SUBDIRS)}.
+Of course, directories which are omitted from @code{DIST_SUBDIRS} will
+not be distributed unless you make other arrangements for this to
+happen (for instance always running @code{make dist} in a
+configuration where all directories are known to appear in
address@hidden; or writing a @code{dist-hook} target to
+distribute these directories).
+
address@hidden Subdirectories, not distributed
+In few packages, non-configured directories are not even expected to
+be distributed. Although these packages do not require the
+aforementioned extra arrangements, there is another pitfall. If the
+name of a directory appears in @code{SUBDIRS} or @code{DIST_SUBDIRS},
address@hidden will make sure the directory exists. Consequently
address@hidden cannot be run on such a distribution when one
+directory has been omitted. One way to avoid this check is to use the
address@hidden method to declare conditional directories; since
address@hidden does not know the values of @code{AC_SUBST}
+variables it cannot ensure the corresponding directory exist.
+
@node Alternative
@section An Alternative Approach to Subdirectories
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Toplevel configure.ac / Makefile.am for optional directories,
Alexandre Duret-Lutz <=