This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Changing library does *not* always cause executable to beremadewith "make"!?!?..
zaufi schrieb:
Executable is only rebuilt if one of name_SOURCES files is changed.
This is a problem because modifying something in the
name_LDADD list does NOT cause executable to be remade?!?!?!
bin_PROGRAMS = name
name_SOURCES = ...
name_DEPENDENCIES = $(top_builddir)/path/libnoinst.a ...
name_LDADD = $(name_DEPENDENCIES)
The main trick is to explain to make how to rebuild noinst library in other
than current directory.To do this I use the following in my
admin/Makefile.deps (which is included in _EVERY_ Makefile.am's):
a very sophisticated trick that is, a simple one might be to
add the rebuild rule on every instance where a library is
linked that exists in the same configured tree:
name_LDADD = ../other/libthing.la
../other/libthing.la : ../other/*.c ../other/*.h
cd ../other && $(MAKE) `basename $@`
that works with every automake version IYAM, if you can
live with it, you could even leave out the righthand deps
which will `make` to make a short step over into the other
build dir quickly returning without doing anything there.
cheers, guido
(p.s. dont feed trolling threads)