This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: automake reports .lo file created with and without libtool
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: skip at pobox dot com
- Cc: automake at gnu dot org
- Date: Thu, 11 Apr 2002 12:02:23 +0200
- Subject: Re: automake reports .lo file created with and without libtool
- References: <15540.40195.801233.691874@beluga.mojam.com>
>>> "Skip" == Skip Montanaro <skip@pobox.com> writes:
[...]
Skip> check_PROGRAMS = alftest
Skip> alftest_SOURCES = alftest.c
Skip> alftest_LDADD = ../src/libalf.a
Skip> I want the test program linked with the static library in
Skip> the build tree to avoid inadvertently linking with any
Skip> previously installed shared libraries, so I explicitly
Skip> mentioned the .a file.
Skip> The .a file isn't getting built if I run "make" or "make
Skip> check". The reason I didn't notice it before was that
Skip> "make distclean" doesn't delete the static library
Skip> without the build lines in Makefile.am.
Skip> For now it looks like I will have to add the static
Skip> library build lines back to src/Makefile.am and put up
Skip> with the warning message from automake. Any suggestions
Skip> about alternative approaches would be gladly received.
Either change
alftest_LDADD = ../src/libalf.a
to
alftest_LDADD = ../src/libalf.la
This means alftest will be linked against libalf.so or libalf.a
depending on what have been built (the user can disable static
or shared libraries using --disable-static or --disable-shared),
It seems to me this is what you try to avoid.
Or keep the definition for both libraries, and try the
workaround I mentioned:
libalf_a_CFLAGS = $(AM_CFLAGS)
My limitied testing shows this is enough to suppress the warning.
--
Alexandre Duret-Lutz