[Top][All Lists]

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

Re: testing with .so and other questions

From: Alexandre Duret-Lutz
Subject: Re: testing with .so and other questions
Date: Mon, 05 Aug 2002 10:20:18 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu)

>>> "Waldemar" == Waldemar Rosenbach <address@hidden> writes:


 Waldemar> test_LDADD = $(top_builddir)/.libs/
 Waldemar> libTestAction_la_LIBADD = 


test_LDADD = ../
libTestAction_la_LIBADD = ../

.libs/ are Libtool's private data you should not have to use
(besides `.libs' is not always called `.libs' and `.so' is not
always `.so'.)

 Waldemar> ./test.fsm: $(top_srcdir)/test.fsm
 Waldemar> -rm -f ./test.fsm
 Waldemar> $(LN_S) $(top_srcdir)/test.fsm ./test.fsm
 Waldemar> test ./test.fsm
 Waldemar> @echo creating
 Waldemar> @-rm -f
 Waldemar> @echo "#!/bin/sh" >
 Waldemar> @echo "export
 Waldemar> LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(top_builddir)/.libs:.libs" >>
 Waldemar> @echo "./test" >>
 Waldemar> @chmod +x

Building this kind of wrapper is actually the job
of Libtool; you should be able to run `./test' directly if you
pass the `.la' file on the test_LDADD line.

(BTW, this syntax for export and the use of LD_LIBRARY_PATH are
not portable.)

 Waldemar> Now the questions:
 Waldemar> 1. if I use lib_LTLIBRARIES, then is created, but
 Waldemar> also installed if I call make install, if I use check_LTLIBRARIES or
 Waldemar> noinst_LTLIBRARIES, then is not created, but only
 Waldemar> How to create without installing it? 

When you use `lib_', Automake knows where the library will be
installed, so it can pass a `-rpath $(libdir)' flag to Libtool.
For `check_', `noinst_', or `EXTRA_' library Automake can't
guess what `-rpath' flag you want (plus it doesn't always make

The libtool manual states that shared libraries are built only
when `-rpath' is given.  So you'll have to setup that yourself.
Probably with something along the lines of

libTestAction_la_LDFLAGS = -rpath /dummy/path/so/libtool/builds/a/shared/lib

 Waldemar> And also to clean at 'make clean'?

Should be automatic.

 Waldemar> 2. ./test.fsm  should be just a copy (or link) of this file from the
 Waldemar> source directory in the actual directory and is read by the test
 Waldemar> programm. But it is not created. If I call 'make ./test.fsm' then I
 Waldemar> get: make: »../../test/test.fsm« is already actual.

Why do you need this link?  How about reading $srcdir/test.fsm directly?

 Waldemar> 3. is a script, that is generated by the
 Waldemar> Makefile. But it is not deleted if I call 'make
 Waldemar> clean'. How to tell the automake to delete it at
 Waldemar> clean?

Alexandre Duret-Lutz

reply via email to

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