[gnu.utils.bug] Problem with VPATH in GNU Make 3.44

schorr@WHEATIES.AI.MIT.EDU (Andrew Schorr) (03/28/89)

Roland,

   I am experiencing the following problem with version 3.44 of GNU Make
(note that the problem is NOT present in version 3.25):

Directory test contains Makefile, test.c, and the sub-directory sun3.
Contents of Makefile:

   test: test.o
	   $(CC) -o $@ $^

   test.o: test.c
	   @ echo "$$< = $<"
	   $(CC) -c -o $@ $<

I have the following alias defined:
   alias Gmake     "gmake -C $ARCH -f ../Makefile 'VPATH=..' \!*"
where the environment variable ARCH is set to sun3 (and gmake is GNU Make 3.44).

With nothing in the sub-directory sun3, I enter:
   Gmake test
The output from gmake is:
   $< = test.c
   cc -c -o test.o test.c
   cpp: test.c: No such file or directory
   gmake: *** Error 2

In previous versions of GNU make, $< has the value ../test.c.


Thanks for your help,
Andrew Schorr <beareq!schorr@wheaties.ai.mit.edu>