gmake/make dependency problem

Harlan Stenn stenn at ntp.isc.org
Tue Sep 20 21:41:57 PDT 2005


Harti,

It is ugly to add $(srcdir) to the targets (and perhaps dependencies),
but that may have to happen.

If I say:

srcdir=wherever
VPATH: $(srcdir)

a: b

b: c
  cd $(srcdir) && script c > b

then it is Strange that make will correctly see that for 'a', the
dependency is 'b' and 'b' is found in $(srcdir)/b, yet for the 2nd
rule, 'b' is expected to be in the current directory.

H


More information about the freebsd-questions mailing list