Hi all. I know this is slightly off-topic, but while I am trying to make the sources of btparse to use automake and libtool, I ran into the following problem:
btparse includes a test suite, whose programs depend on the
shared library itself. Therefore, when using automake and
libtool, this shared library needs to be added to LDADD:
## Process this file with automake to produce Makefile.in
INCLUDES = @INCLUDES@ -I../src
LDADD = ../src/libbtparse.la
bin_PROGRAMS = simple_test read_test postprocess_test
simple_test_SOURCES = simple_test.c testlib.c
read_test_SOURCES = read_test.c testlib.c
postprocess_test_SOURCES = postprocess_test.c
However, when I run make, I get an error (note that in the
toplevel Makefile, SUBDIRS = tests src):
[EMAIL PROTECTED]:~/devel/debian/btparse-0.33mk % make
Making all in tests
make[1]: Entering directory /usr/local/debian/btparse-0.33mk/tests'
gcc -DHAVE_CONFIG_H -I. -I. -I../src -g -O2 -c simple_test.c
gcc -DHAVE_CONFIG_H -I. -I. -I../src -g -O2 -c testlib.c
make[1]: *** Keine Regel vorhanden, um das Target »../src/libbtparse.la«,
benötigt von »simple_test«, zu erstellen. Schluss.
make[1]: Leaving directory /usr/local/debian/btparse-0.33mk/tests'
make: *** [all-recursive] Fehler 1
(Which means, for the non-German-speaking among you, that make
has no rule to create ../src/libbtparse.la.)
How do I specify that the contents of the src directory (in
which libbtparse.la will eventually be generated) should be
built before trying to build test? Can I only do this by
putting SUBDIRS in the right order (i.e., putting src before
tests)?
Marco
pgpneiR8qSX7Q.pgp
Description: PGP signature

