Good morning Bruno,

* Bruno Haible wrote on Thu, May 27, 2010 at 12:29:44AM CEST:
> 
> > +# Ensure objects in ../src are renamed so they don't conflict with
> > +# the objects generated from ../src/Makefile.
> > +libgettextpo_la_CPPFLAGS = $(AM_CPPFLAGS)
> 
> Wow. What a hack! Even with the comments, I could not understand how
> changing CPPFLAGS could have an effect on object files.

A hack, but per-target flags are a well-documented and well-known one.
Frankly, I view the rules to create libgettextpo exported symbols as
just about as hacky (they make assumptions about object file names, and
they prevent some parallelism).  Please don't reject something just
because you haven't used it to your advantage before.

> Thank you for spending time on experiments how to make libgettextpo work
> "reasonably well" with 'subdir-objects'. But, frankly, IMO the effort
> should go in the opposite direction:
>   - How to continue to offer 'subdir-objects' as a choice that remains
>     entirely an unconstrained choice.

That's not the case today, and it won't be the case tomorrow.

>   - How to use Automake conditionals or AC_SUBSTed variables without
>     file names as replacement for AC_LIBOBJ.

That's fine only for projects where the list of libobjs is taken from a
static list of file names.  Thus it may be fine for gnulib, but it is
not something we can generally impose.

> I will work on the latter topic, for gnulib, in the next few days.

I have looked into enabling subdir-objects for libobjs only.  That is
not feasible.

What seems feasible however, is the following:

- If there are potentially slashes in @LIBOBJS@, then Automake requires
  subdir-objects to be used in Makefile.am files that uses @LIBOBJS@,
- Autoconf can have a new macro AC_LIBOBJS_FLATTEN or so, that will let
  AC_LIBOBJ([sub/file]) assume that file.o is made from sub/file.c; in
  this case, all Makefile.am files using @LIBOBJS@ should have
  subdir-objects turned off.

At automake run time, it can be checked that either of the alternatives
are fulfilled.  AFAICS this would help to address gettext in an
alternative way.

Cheers,
Ralf

Reply via email to