Hello Rhys, * Rhys Ulerich wrote on Wed, Feb 11, 2009 at 03:59:36AM CET: > > I've got an autotooled project which I can successfully > configure/build using something like ../project/configure && make. Is > there some way to express a non-source dependency so that it gets > "picked up" in a VPATH build? Maybe symlinked?
Yes, you can add prerequisites to the all-local target. You can write rules for these prerequisites the same way you would write rules for them in a Makefile. > Specifically, I've got a log4cxx.properties file used by my 'make > check' tests. If I run 'make check' in a non-VPATH build the > log4cxx.properties file is present and my tests output correctly. > However, when I run 'make check' in a VPATH build my tests cannot find > log4cxx.properties (its in the source tree, not the build tree) and > they don't operate the way I'd like. Well, it depends on your specific setup whether symlinking/copying the file to the build tree is preferable, or using $(srcdir) appropriately elsewhere. If you decide to symlink/copy, you can use $(LN_S) (put AC_PROG_LN_S in configure.ac). In order to have a deterministic rule, input and output file should have different names (e.g., foo.in -> foo) or not be identifiable by VPATH. Hope that helps. Cheers, Ralf