Re: running tests under in a tests/ directory

2009-06-09 Thread Peter Johansson
aaragon wrote: I'm actually building the tests inside a test directory: $(top_srcdir)/tests, and the library I'm trying to link to is under $(top_srcdir)/yafeq. So if I remove the $(top_srcdir) then it doesn't work anymore. So the only way I made it work so far is using LDADD = $(top_srcdir)/ya

Re: running tests under in a tests/ directory

2009-06-09 Thread aaragon
I'm actually building the tests inside a test directory: $(top_srcdir)/tests, and the library I'm trying to link to is under $(top_srcdir)/yafeq. So if I remove the $(top_srcdir) then it doesn't work anymore. So the only way I made it work so far is using LDADD = $(top_srcdir)/yafeq/libyafeq.la

Re: running tests under in a tests/ directory

2009-06-09 Thread Peter Johansson
Bob Friesenhahn wrote: It is not necessary to specify top_builddir because that is where the Makefile is written and the directory where the build is performed. As you say, specifying $(top_srcdir) may cause harm since it is likely to break VPATH builds. Sorry, I thought we were dealing with

Re: running tests under in a tests/ directory

2009-06-09 Thread Bob Friesenhahn
On Tue, 9 Jun 2009, Peter Johansson wrote: LDADD = $(top_srcdir)/yafeq/libyafeq.la does work. So I hope this is finally the way to do it. Typically .la files are built and not shipped as source, and thus appearing in buildsrc. If that's the case in your set up, you should probably replace

Re: running tests under in a tests/ directory

2009-06-09 Thread Peter Johansson
aaragon wrote: Got it, but I tried LIBADD = $(top_srcdir)/yafeq/libyafeq.la and it doesn't work. However, LDADD = $(top_srcdir)/yafeq/libyafeq.la does work. So I hope this is finally the way to do it. Typically .la files are built and not shipped as source, and thus appearing in buildsrc

Re: running tests under in a tests/ directory

2009-06-09 Thread Bob Friesenhahn
On Tue, 9 Jun 2009, aaragon wrote: and it doesn't work. However, LDADD = $(top_srcdir)/yafeq/libyafeq.la does work. So I hope this is finally the way to do it. Remove the $(top_srcdir)/ prefix. It is not needed and will likely cause problems. Let Automake do its job. Bob -- Bob Frie

Re: running tests under in a tests/ directory

2009-06-09 Thread aaragon
Got it, but I tried LIBADD = $(top_srcdir)/yafeq/libyafeq.la and it doesn't work. However, LDADD = $(top_srcdir)/yafeq/libyafeq.la does work. So I hope this is finally the way to do it. Alejandro Ralf Wildenhues wrote: > > * Bob Friesenhahn wrote on Tue, Jun 09, 2009 at 09:54:25PM CEST: >>

Re: running tests under in a tests/ directory

2009-06-09 Thread Ralf Wildenhues
* Bob Friesenhahn wrote on Tue, Jun 09, 2009 at 09:54:25PM CEST: > On Tue, 9 Jun 2009, aaragon wrote: >> >> AM_LDFLAGS = -L$(top_srcdir)/yafeq -lyafeq >> >> and this works fine. Is this the right way to do this? > > Any in-tree library dependencies should be specified via LIBADD rather > than LDF

Re: running tests under in a tests/ directory

2009-06-09 Thread Bob Friesenhahn
On Tue, 9 Jun 2009, aaragon wrote: AM_LDFLAGS = -L$(top_srcdir)/yafeq -lyafeq and this works fine. Is this the right way to do this? Any in-tree library dependencies should be specified via LIBADD rather than LDFLAGS. Using LDFLAGS is a common mistake which results in problems, such as the

Re: running tests under in a tests/ directory

2009-06-09 Thread aaragon
Hi Ralf, One more thing, I moved the tests to another library, and then I was having problems with the linking part. The missing symbols were from the library that I was trying to build using the autotools. I added this to the test/Makefile.am. AM_LDFLAGS = -L$(top_srcdir)/yafeq -lyafeq and thi

Re: running tests under in a tests/ directory

2009-06-09 Thread aaragon
Ralf, one more thing. I tried to move the tests to a different library and I am having problems with the linking part. The undefined symbols are from the library that I'm trying to build using the Autotools. In the test/Makefile.am I tried adding AM_LDFLAGS = -L$(top_srcdir)/yafeq LIBS += -lya