[PATCH] fix make after clean

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Mon Apr 4 07:13:00 GMT 2011

On Mon, 2011-04-04 at 00:56 -0500, Yaakov (Cygwin/X) wrote:
> No, I duplicated this on Linux as well (after I tracked down a cocom
> RPM), but that did make me think of other possibilities.  The difference
> seems to be if you pass an absolute or relative path to the top-level
> configure script; only in the latter does it fail as I described.  I
> presume you've been using an absolute path?

This is definitely the problem.  If configure is called with a relative
path (e.g. mkdir build; cd build; ../configure ...), then srcdir is also
defined relative, which is then used in VPATH.  But when Makefile.common
is include()d, it overrides srcdir to an absolute path, the value of
which is used later in the $(srcdir)/devices.cc: rule.  Since the new
value of srcdir isn't identical to the old (although functionally the
same), make doesn't find the dependency automatically.

I see two solutions:

1) move the VPATH definition to after the Makefile.common inclusion, OR
2) change the $(srcdir)/devices.cc: rule to @srcdir@/devices.cc.

Your preference?


More information about the Cygwin-patches mailing list