automake
[Top][All Lists]
Advanced

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

Re: Issues with subdir-objects and differing versions of automake


From: Stefano Lattarini
Subject: Re: Issues with subdir-objects and differing versions of automake
Date: Tue, 03 Sep 2013 15:39:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8

On 08/26/2013 03:30 PM, Shawn Webb wrote:
Hey All,

Hi Shawn, sorry for the delay.

I'm working on ClamAV and am restructuring our autoconf/automake
scripts to be a bit more organized and modernized. On one machine, I
have automake 1.14 installed.. On another, much older machine, I have
automake 1.11.1 installed.

Quick history of why I'm emailing: ClamAV's codebase has a lot of
different programs to build inside of it (clamd, clamdscan, clamscan,
freshclam, clamconf, among others). Each of these programs have code
shared between them. The shared code was placed inside of the "shared"
directory. We weren't using the subdir-objects automake option, but it
appears that option is now mandatory with automake 1.14. So I added
that option in. Automake didn't like me simply adding that option in,
so after a bit of research, I decided to convert the shared code
folder into building a shared library (called libclamshared.la) that
will get statically compiled into each of these programs.
>
A suggestion: if this is a non-installed convenience library that you
are only using to static-link into your program, you can simply use a
libfoo.a archive library (use the _LIBRARIES primary instead of the
_LTLIBRARIES one), and avoid all the complications, slowdown and extra
dependencies associated with the use of libtool.

I then
removed all references to each of the C files in the shared directory
for each of these projects and instead added the shared object to be
statically linked in.

Even after all this work, automake 1.14 still requires me to use the
subdir-objects option. That's fine.
>
Actually, it doesn't.  It just warns you that if you don't do so, you
might have unexpected breakage in future automake versions.  But for
all the versions in the 1.* series (inclusing 1.14), automake should
keep working fine (and in a backward-compatible way) without the
subdir-objects option being specified; the only difference being the
warning you are seeing.  See also below.

All make targets work in automake
1.14. Everything works as expected with automake 1.14 with
subdir-objects enabled. If I remove subdir-objects, then autoreconf
errors and tells me that using subdir-objects is now required. So
removing the subdir-objects option is not an option for me; the option
is required.

The problem comes when I try to use automake 1.11.1. The distclean
make target is broken with automake 1.11.1 when the subdir-objects
option is included. Compilation succeeds, which is good. Everything
works perfectly if I don't include the option.

So, at this point, you have two ways to proceed:

  1. Don't use the subdir-objects option, and live with the warning
     for the moment.  But keep in mind that you will have to convert
     to the use of that option once you switch to Automake 2.0; so
     be prepared, but until then, no big deal.

  2. Just require that developers working with your project use
     automake >= 1.14 (or even 1.13, in case that doesn't suffer
     of the issue you are seeing in 1.11).  Automake is easy and
     quick to install, and has few dependencies.

I'd suggest you go with option (2), as developing with two versions
of automake that have been release four years apart doesn't make much
sense to me.  But that is only a suggestion: option (1) should be
completely viable.

So I'm stuck in this in-limbo state where automake 1.14 requires
subdir-objects, but the distclean target doesn't work in 1.11.1 when
the option is enabled.

What're my options? I'll admit that I'm a complete newb to autotools
and it's very possible that I'm doing something wrong. I've included
below my Makefile.am for clamd.

Thanks,

Shawn Webb

HTH,
  Stefano



reply via email to

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