Hi Jeff, * Daily, Jeff A wrote on Tue, Aug 10, 2010 at 08:54:53PM CEST: > I am using subdir-objects and I have a single, top-level Makefile.am: > > #*snip* > BUILT_SOURCES = > lib_LTLIBRARIES = libfoo.la > libfoo_la_SOURCES = > #*snip* > If HAVE_PYTHON > BUILT_SOURCES += foo/bar/wapi.c > foo/bar/wapi.c: foo/bar/papi.h $(top_srcdir)/build-aux/wapi.py > -rm -f foo/bar/wapi.c && \ > $(PYTHON) $(top_srcdir)/build-aux/wapi.py $< > foo/bar/wapi.c > libfoo_la_SOURCES += foo/bar/wapi.c > endif > #*snip* > > It turns out that $(PYTHON) is located by configure such that > HAVE_PYTHON is true. When I configure and build from a subdirectory > within my source tree e.g. "mkdir bld; cd bld; ../configure" the build > fails because make is looking for the target "../foo/bar/wapi.c" which > doesn't exist,
Which make version and implementation, which Automake version? Do you somehow ensure foo/bar exists in the build tree beforehand? Does the file foo/bar/papi.h exist in the source or in the build tree? The above works for me; but VPATH target lookup is tricky across make implementations, see 'info Autoconf "VPATH and Make"' and the last node referenced therein. Using $< in non-inference rules is not portable to non-GNU make. Cheers, Ralf
