[Top][All Lists]

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

Re: non-recursive automake advice?

From: Tom Tromey
Subject: Re: non-recursive automake advice?
Date: 29 Aug 2005 17:04:25 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "tom" == tom fogal <address@hidden> writes:

tom> Basically I'd like each module to build their own libtool convenience
tom> library, and then have /src/ link all of those modules'
tom> convenience libraries into one that is the union of all of them.

Do you really want each separate convenience library, or is that just
inertia?  I ask because if you don't want separate ones, the task
becomes even simpler.

tom> Without recursive make this is a little strange, but I've devised a
tom> scheme to make each module 'feel' like it has its own, local
tom>, by playing with includes.

tom> libAll_la_LIBADD = \
tom>         $(srcdir)/models/ \
tom>         $(srcdir)/share/ \
tom>         $(srcdir)/input/ \
tom>         $(srcdir)/

You don't want $(srcdir) here.  The .la files are in the build tree,
not the source tree.  Just write:

    libAll_la_LIBADD = \
            models/ \
            share/ \
            input/ \

tom> Unfortunately in the '' files I need to remember to qualify every
tom> filename with not just '$(srcdir)', but
tom> '$(srcdir)/modules_directory_name/'.  This is only a minor annoyance
tom> and definitely worth the trouble, but perhaps I am missing something?

Once upon a time I had a plan to introduce a new 'import' statement,
that would work like 'include' but magically rewrite things like this
as needed.  That would make it really simple to do the kind of thing
you're trying to do.  It was fairly complex, though, and in the end I
lost interest...

tom> noinst_LTLIBRARIES += $(srcdir)/models/

(Likewise no srcdir here)


reply via email to

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