Next: , Previous: Automatic Rule Rewriting, Up: VPATH and Make

12.15.5 Tru64 make Creates Prerequisite Directories Magically

When a prerequisite is a subdirectory of VPATH, Tru64 make creates it in the current directory.

     $ mkdir -p foo/bar build
     $ cd build
     $ cat >Makefile <<END
     VPATH = ..
     all: foo/bar
     $ make
     mkdir foo
     mkdir foo/bar

This can yield unexpected results if a rule uses a manual VPATH search as presented before.

     VPATH = ..
     all : foo/bar
             command `test -d foo/bar || echo ../`foo/bar

The above command is run on the empty foo/bar directory that was created in the current directory.