On Sun, Mar 11, 2018 at 1:53 PM, Vincent Delecroix <vincent.delecr...@math.cnrs.fr> wrote: > Dear all, > > I am working on the C project e-antic [1] which also contains a (header > only) C++ interface. Most of the tests are written in C but the ones > testing the C++ interface are of course in C++. I am facing difficulties > to make it work properly. > > The current automake setup is as follows > > - /Makefile.am: for the C code compilation and the C test programs > > - /e-antic/test/Makefile.am: for the C++ test programs > > First of all, I would be happier with only one Makefile.am but I am not > sure it is easily feasible.
you can put everything in the top level Makefile.am, and use relative path to the top level directory of you project, for example. > Secondly, when running "make check" in VPATH > builds the C++ test programs fail to find the header files (it works > fine when the source tree and the build tree is the same). The relevant > instructions in /e-antic/test/Makefile.am are > > AM_CPPFLAGS = -I../.. > LDADD = ../../libeantic.la if ../../ is the top level directory, try : AM_CPPFLAGS = -I$(top_srcdir) LDADD = $(top_builddir)/libeantic.la best regards Vincent Torri > > and I believe that they are wrong. Though I was not able to fix them. > > Best > Vincent > > [1] https://github.com/videlec/e-antic >