This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Yet another sub-directories question
- From: Alexandre Duret-Lutz <aduret at src dot lip6 dot fr>
- To: Roberto Cavada <cavada at irst dot itc dot it>
- Cc: automake at gnu dot org
- Date: Tue, 22 Jul 2003 00:13:44 +0200
- Subject: Re: Yet another sub-directories question
- References: <1058448197.4097.273.camel@stadio>
>>> "Roberto" == Roberto Cavada <cavada@irst.itc.it> writes:
Roberto> Hi all list's members,
Roberto> I've been trying to solve some problems with Automake these days,
Roberto> since I am new to autotools.
[...]
Roberto> top contains one Makefile.am and all bootstrap generated files.
Roberto> src contains the Makefile.am that builds the library.
Roberto> I know (from previous posts about this issue) that src
Roberto> can refer to packages source directly. The problem is
Roberto> that I want to keep knowledge of the content of a
Roberto> given package as much local as possible. 'src' knows
Roberto> the packages it contains, but does know nothing about
Roberto> what the packages contain. The same for each package.
The usual setup is to have one Makefile.am per subdirectory,
build many nodist_LTLIBRARIES in child-packages, and gather them
in parent packages.
[src/Makefile.am]
SUBDIRS = sub1 sub2 ...
lib_LTLIBRARIES = libtop.la
libtop_la_SOURCES =
libtop_la_LIBADD = \
sub1/libsub1.la \
sub2/libsub2.la \
...
[src/sub1/Makefile.am]
noinst_LTLIBRARIES = libsub1.la
libsub1_la_SOURCES = ...
[src/sub2/Makefile.am] (with nested packages)
SUBDIRS = sub2.1 sub2.2 ...
noinst_LTLIBRARIES = libsub2.la
libsub2_la_SOURCES =
libsub2_la_LIBADD = \
sub2.1/libsub1.2.la \
sub2.2/libsub2.2.la \
...
etc.
--
Alexandre Duret-Lutz