Jiri Denemark writes ("Re: [libvirt] Likely build race, "/usr/bin/ld: cannot
> On Tue, Jun 12, 2018 at 07:57:40 -0500, Eric Blake wrote:
> > Can you add that line directly into Makefile.am, or does doing that
> > cause automake to complain and/or omit its normal rules because it
> > thinks you are overriding its defaults?
> Yeah. It doesn't complain, but it omits its normal
> install-modLTLIBRARIES rule which mean nothing will be installed.
> However, the error is still reported so there are other libraries which
> are not in mod_LTLIBRARIES affected too.
I did a web search for "automake add dependency" and ended up at a
stackmumble page which referred to EXTRA_a_DEPENDENCIES.
(automake-1) Program and Library Variables
It is also occasionally useful to have a target (program or
library) depend on some other file that is not actually part of
that target. This can be done using the '_DEPENDENCIES' variable.
Each target depends on the contents of such a variable, but no
further interpretation is done.
Since these dependencies are associated to the link rule used to
create the programs they should normally list files used by the
link command. That is '*.$(OBJEXT)', '*.a', or '*.la' files for
programs; '*.lo' and '*.la' files for Libtool libraries; and
'*.$(OBJEXT)' files for static libraries. In rare cases you may
need to add other kinds of files such as linker scripts, but
_listing a source file in '_DEPENDENCIES' is wrong_. If some
source file needs to be built before all the components of a
program are built, consider using the 'BUILT_SOURCES' variable
If '_DEPENDENCIES' is not supplied, it is computed by Automake.
The automatically-assigned value is the contents of '_LDADD' or
'_LIBADD', with most configure substitutions, '-l', '-L', '-dlopen'
and '-dlpreopen' options removed. The configure substitutions that
are left in are only '$(LIBOBJS)' and '$(ALLOCA)'; these are left
because it is known that they will not cause an invalid value for
'_DEPENDENCIES' to be generated.
'_DEPENDENCIES' is more likely used to perform conditional
compilation using an 'AC_SUBST' variable that contains a list of
objects. *Note Conditional Sources::, and *note Conditional
The 'EXTRA_*_DEPENDENCIES' variable may be useful for cases where
you merely want to augment the 'automake'-generated '_DEPENDENCIES'
variable rather than replacing it.
libvir-list mailing list