[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "No rule to make target" in a BUILT_SOURCES, non-recursive, multi-d

From: Ralf Wildenhues
Subject: Re: "No rule to make target" in a BUILT_SOURCES, non-recursive, multi-directory project
Date: Tue, 10 Aug 2010 21:21:16 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

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
> #*snip*
> libfoo_la_SOURCES =
> #*snip*
> BUILT_SOURCES += foo/bar/wapi.c
> foo/bar/wapi.c: foo/bar/papi.h $(top_srcdir)/build-aux/
>         -rm -f foo/bar/wapi.c && \
>         $(PYTHON) $(top_srcdir)/build-aux/ $< > 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]