gmake/make dependency problem

Harti Brandt hartmut.brandt at dlr.de
Tue Sep 20 23:52:52 PDT 2005


Harlan,

On Wed, 21 Sep 2005, Harlan Stenn wrote:

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

For the 'foreseeable future' - yes.

HS>If I say:
HS>
HS>srcdir=wherever
HS>VPATH: $(srcdir)
HS>
HS>a: b
HS>
HS>b: c
HS>  cd $(srcdir) && script c > b
HS>
HS>then it is Strange that make will correctly see that for 'a', the
HS>dependency is 'b' and 'b' is found in $(srcdir)/b, yet for the 2nd
HS>rule, 'b' is expected to be in the current directory.

Are you sure that make sees a? Try make -dm and you'll see that it doesn't 
see a, nor b for the seconds rule.

harti


More information about the freebsd-questions mailing list