Your problem is this line, as indicated in the error:
noinst_libfoo_la_DATA = test
automake deals with these variable suffixes when deciding how to build. Note that suffixes ending in _DATA
is not one of them. However, it does recognize _DATA
as being installed in a location (e.g. data_DATA
is installed in datadir
). The location that noinst_libfoo_la_DATA
would be installed to would therefore be in the variable noinst_libfoo_ladir
, the definition of which does not exist in Makefile.am, hence the error.
So ladir
is nothing. It's just suffixing noinst_libfoo_la
with dir
, trying to find an undefined variable. The same process applied to data_DATA
would be data
(strip off _DATA
suffix) + dir
= datadir
. In order to not get an error, you would need to define something like:
noinst_libfoo_ladir = $(datadir)/libfoo
in Makefile.am. I'd call it something else since a noinst_
prefix has a special meaning for other things in autotools (don't install).