bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] using AC_LIBSOURCES: complementing the `Files:' section


From: Stepan Kasal
Subject: Re: [bug-gnulib] using AC_LIBSOURCES: complementing the `Files:' section
Date: Mon, 6 Dec 2004 15:13:15 +0100
User-agent: Mutt/1.4.1i

Hi,

On Mon, Dec 06, 2004 at 02:52:05PM +0100, Jim Meyering wrote:
> Bruno Haible <address@hidden> wrote:
> > I don't understand the philosophy of registering filenames through
> > autoconf macros.

> Isn't it more in the spirit of autoconf and automake to use their built-in
> capabilities to perform this small task rather than to make gnulib-tool
> do it?

No doubt about this.  I believe Bruno meant that autoconf should deal
with things which has to be determined at the build time.  Automake,
OTOH, does things which are done at the moment when the distribution
tarball is built.

That means that you need AC_LIBOBJ to modify the LIBOBJ list on the
autoconf side.  But the list of the source files which have to be
distributed is maintained in Makefile.am.

Thus the module should add

        lib_SOURCES += mempcpy.h memcpy.c

to lib/Makefile.am and some autoconf code to call AC_LIBOBJ if
necessary.  (I don't understand why this line doesn't contain memcpy.c
at the moment.)

> Then even packages (ahem :-) that don't use gnulib-tool can
> benefit from that dependency information.

The module description contains configure.ac fragments and Makefile.am
fragments.  gnulib-tool collects (should collect) both.

> Besides, if I write an autoconf macro to detect and potentially
> replace a function, I consider the replacement .c file (and of course
> its header file) to be tightly enough coupled to the macro that it is
> only logical to include their names in the definition of that macro.

Well, you have to place the file to the lib subdir (manually or via
gnulib-tool), so it's natural that you have to add it to the source
list in lib/Makefile.am (again, either manually or via gnulib-tool).

I tend to agree with Bruno that we should go this way and we shouldn't
use AC_LIBSOURCE.

Have a nice day,
        Stepan




reply via email to

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