NOTE: I routinely build in non-source directories because I can keep separate sets of configure options.
Bob, server/Makefile's VPATH only contains the expansion of @top_srcdir@/server, which in this case is ../../server. This means that make won't be able to find any sources listed that exist in directories other than ../../server. So I think I HAVE to use $(top_srcdir)/common/mySleep.c, don't I, as it's in a different source directory? Note that I'm not using a path on registrar.c - it's found in the server directory. Also note that this is a unit test build, so I'm grabbing files from the common directory to add to my unit test. Perhaps I should be using the common convenience library rather than the common source files directly, but sometimes I need different compiler options for the test objects. Ralf, I should think that using @top_srcdir@ in a SOURCES list would be better than $(top_srcdir) because it will be replaced by hard path info in the final Makefile. On the other hand, since automake converts Makefile.am to Makefile.in before autoconf gets around to replacing the variable with path info... > > registrarTest_SOURCES = registrar.c\ > > @top_srcdir@/common/mySleep.c > You should always use the Makefile form in Makefiles. You should > always use relative paths in the source tree (from the Makefile > location) to refer to source files from your package (i.e. don't use > @top_srcdir@). If your package is built in some other directory, > VPATH will be used to tell make where to look for the source files.