On 11/02/2012 09:18 AM, Václav Zeman wrote: > On 1 November 2012 17:42, Diego Elio Pettenò wrote: >> On 01/11/2012 09:18, Vincent Torri wrote: >>> lib_eo_libeo_la_LIBADD = $(top_builddir)/src/lib/eina/libeina.la >> >> Don't use $(top_builddir) and it should work just fine. > Is there a rationale behind this? I am not saying it is wrong, I just > want to better understand how things work. > My guess is that, albeit having a rule to build 'lib/eina/libeina.la' -- rule generated by Automake from the
lib_LTLIBRARIES = lib/eina/libeina.la lib/eo/libeo.la assignment -- make is not "smart enough" to recognize that, in this Makefile (where '$(top_builddir)' expands to '..'), '$(top_builddir)/src/lib/eina/libeina.la' points in fact to 'lib/eina/libeina.la'. So, when asked to build '$(top_builddir)/src/lib/eina/libeina.la' as a dependency for 'lib/eo/libeo.la' -- dependency derived from the lib_eo_libeo_la_LIBADD = $(top_builddir)/src/lib/eina/libeina.la assignment -- make doesn't know how to proceed, and bails out. So better to just remove the useless extra '$(top_builddir)/src' indirection. Not only this fixes the error, but is also clearer to human readers IMNSHO. HTH, Stefano