[Top][All Lists]

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

Re: AC_LIBOBJ with file in subdirectory does not work

From: Ralf Wildenhues
Subject: Re: AC_LIBOBJ with file in subdirectory does not work
Date: Wed, 26 May 2010 19:20:22 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

* Bruno Haible wrote on Wed, May 26, 2010 at 12:11:45AM CEST:
> > I see a few possible alternative ways out:
> > - Automake requires subdir-objects if you put slashes into $LIBOBJS,
> There are cases where the developer does not want 'subdir-objects'.
> I'm having the problem with AC_LIBOBJ in the 
> gettext/gettext-tools/libgettextpo
> directory, and when I enable 'subdir-objects' in this directory, all hell
> breaks loose. Impossible.

Can you please tell me how to reproduce that hell in libgettextpo?
I tried the patch below, and so far it seems to work reasonably well.
You lose the ability to do 'make clean' in either of
gettext-tools/libgettextpo and gettext-tools/src without also cleaning
the other, and some object files of the former live in the latter and
have long names, but that's about it.  What am I missing?
(The renaming trick is documented in the Automake manual.)


2010-05-26  Ralf Wildenhues  <address@hidden>

        * Makefile.am (AUTOMAKE_OPTIONS): Add subdir-objects.
        (libgettextpo_la_CPPFLAGS): New variable, to force renamed objects.

diff --git a/gettext-tools/libgettextpo/Makefile.am 
index 648f589..2ec49ac 100644
--- a/gettext-tools/libgettextpo/Makefile.am
+++ b/gettext-tools/libgettextpo/Makefile.am
@@ -16,7 +16,7 @@
 ## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
+AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies subdir-objects
 MOSTLYCLEANFILES = core *.stackdump
@@ -40,6 +40,10 @@ AM_CPPFLAGS = \
   -I../src -I$(top_srcdir)/src \
   -I../intl -I$(top_srcdir)/../gettext-runtime/intl
+# Ensure objects in ../src are renamed so they don't conflict with
+# the objects generated from ../src/Makefile.
+libgettextpo_la_CPPFLAGS = $(AM_CPPFLAGS)
 # libgettextpo contains the public API for PO files.
 libgettextpo_la_SOURCES = \
   gettext-po.c \

reply via email to

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