[Top][All Lists]

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

Issues with subdir-objects and differing versions of automake

From: Shawn Webb
Subject: Issues with subdir-objects and differing versions of automake
Date: Mon, 26 Aug 2013 10:30:18 -0400

Hey All,

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 that
will get statically compiled into each of these programs. 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. 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 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 for clamd.


Shawn Webb

==== ====

sbin_PROGRAMS = clamd

clamd_SOURCES = \
    clamd.c \
    tcpserver.c \
    tcpserver.h \
    localserver.c \
    localserver.h \
    session.c \
    session.h \
    thrmgr.c \
    thrmgr.h \
    server-th.c \
    server.h \
    scanner.c \
    scanner.h \
    others.c \
    others.h \
    shared.h \
    fan.c \
    fan.h \
    fan-syscalllib.h \
clamd_opts.c \



LIBS = $(top_builddir)/shared/
$(top_builddir)/libclamav/ @CLAMD_LIBS@ @THREAD_LIBS@
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared
-I$(top_srcdir)/libclamav @CLAMD_CPPFLAGS@

# it does support --help and --version but with the default config file
# it outputs an error message which tells us to edit the config files
CLEANFILES=*.gcda *.gcno
==== End of ====

==== make distclean error with automake 1.11.1 ====
Makefile:494: .deps/clamd.Po: No such file or directory
Makefile:495: .deps/clamd_opts.Po: No such file or directory
Makefile:496: .deps/fan.Po: No such file or directory
Makefile:497: .deps/localserver.Po: No such file or directory
Makefile:498: .deps/others.Po: No such file or directory
Makefile:499: .deps/scanner.Po: No such file or directory
Makefile:500: .deps/server-th.Po: No such file or directory
Makefile:501: .deps/session.Po: No such file or directory
Makefile:502: .deps/tcpserver.Po: No such file or directory
Makefile:503: .deps/thrmgr.Po: No such file or directory
==== end of make distclean error with automake 1.11.1 ====

reply via email to

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