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: Bruno Haible
Subject: Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files
Date: Sat, 29 Jan 2005 21:57:47 +0100
User-agent: KMail/1.5

Jim Meyering wrote:
> 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.

But then, the copy of hard-locale.m4 for coreutils would have to be
different from the copy of hard-locale.m4 for gettext. Then we get even
deeper in the pit, by not only putting filenames but also directory
names into the .m4 files.

> >    $ 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 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:;

Thanks. But this shows that

  1) Your declared goal of eliminating the filenames of the Makefile.am
     is not fulfilled: they come back, in the form of PHONY rules.

  2) It requires an automake wizard to survive in this situation.

> > 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.

It requires hacks in all directions. Whereas the current solution, to
put filenames into Makefile.am _works_ and is _robust_.

*What* is the problem with filenames in Makefile.am that you are fighting
against?

                       Bruno





reply via email to

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