bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 fi


From: Jim Meyering
Subject: Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files
Date: Sat, 29 Jan 2005 21:31:20 +0100

Bruno Haible <address@hidden> wrote:
> You wrote:
>
>> >   - Specifying filenames in autoconf macros makes it hard for two packages
>> >     to have different directory layout. For example, the gnulib stuff
>> >     goes into gettext-tools/lib/ but into libiconv/srclib/ - because lib/
>> >     already holds other stuff.
>>
>> Yes, gettext is very different from the majority of packages, so it's
>> not surprising that it has unusual requirements.
>
> So what is your answer on this? Are you saying that all packages should
> have the same directory layout as coreutils, namely one src/ and one lib/
> directory?

No, of course not.  But I suspect that very few packages split gnulib
sources the way gettext does.

>> 2005-01-29  Jim Meyering  <address@hidden>
>>
>>      * hard-locale.m4:
>
> This breaks gettext.
...
> I had already to go through hoops (write m4 code that is likely to break
> in future autoconf versions) because of AC_LIBOBJ; now the AC_LIBSOURCES
> patch breaks it even more: If I take gettext-0.14-pre2 and apply the appended
> patch, I get
>
>    $ sh autogen.sh
>    lib/Makefile.am:117: required file `lib/hard-locale.h' not found
>    lib/Makefile.am:117: required file `lib/hard-locale.c' not found
...

In the long run, I suppose that AC_LIBOBJ and AC_LIBSOURCES
might be adjusted to search for required files in multiple directories.
Or maybe each could have an optional argument specifying the directory
to search.

In the mean time, you can simply take advantage of an escape
hatch automake provides to suppress this failure.  If there are
rules in Makefile.am for the offending files, then automake doesn't
fail.  Just apply this additional patch:

--- gettext-tools/lib/Makefile.am.~1~   2005-01-29 21:24:00.007408098 +0100
+++ gettext-tools/lib/Makefile.am       2005-01-29 21:24:03.961594270 +0100
@@ -112,6 +112,10 @@ LIBADD_SOURCE = \
 UNUSED_SOURCE = \
   xgetcwd.h xgetcwd.c

+.PHONY: hard-locale.c hard-locale.h
+hard-locale.c:;
+hard-locale.h:;
+
 # How to build libgettextlib.la.

 libgettextlib_la_LIBADD = @LTLIBOBJS@

> Bottom line: The AC_LIBSOURCES approach causes unnecessary hassles.

You should qualify that:  it requires a small work-around
for packages like gettext that split gnulib sources.




reply via email to

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