autoconf
[Top][All Lists]
Advanced

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

top_srcdir is incorrect


From: Paulo J. Matos
Subject: top_srcdir is incorrect
Date: Fri, 12 May 2006 14:50:09 +0100

Hi all,

I've been having a discussion on a thread in automake, however I think
I hit a autoconf problem and not a automake one. Still, it is
difficult, at least for me, to draw a line between these tools.

I have a software with contains 2 libraries lib1 and lib2, a
convenience library liblogger and the main program in the following
tree (I'll forget lib2 which is as deep as lib1):
tree
|- lib
|    |- install-libs
|    |          |- lib1
|    |- convenience-libs
|               |- liblogger
|- src

And I have only one Makefile.am in lib logger and the source files.
The Makefile.am in liblogger is:
noinst_LTLIBRARIES = liblogger.la
libesatlogger_la_SOURCES = logger.cc logger.hh

The configure.ac in lib1 specifies:
AC_CONFIG_FILES([Makefile
                                      src/Makefile

../../convenience-libs/liblogger/Makefile])

And in Makefile.am in lib1:
SUBDIRS = ../../convenience-libs/liblogger src

Makefile of liblogger is generated OK, however I get an error:
make[2]: Entering directory `/home/pmatos/soft/lib/convenience-libs/liblogger'
make[2]: *** No rule to make target `../../../../configure.ac', needed
by `Makefile.in'.  Stop.

The problem is that the generated Makefile in liblogger has:
top_srcdir = ../../../..

And the top_srcdir is the one in lib1 which is ../../usable-libs/lib1
and not ../../../..

Probably liblogger would have to be inside the lib1 tree but what
happens in lib2 also needs liblogger as a convinience library? Do I
have to duplicate liblogger inside lib2 tree? Don't think this is the
way to go.

Is this a bug or a problem of my configuration?
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group




reply via email to

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