bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VPATH and filenames with double-slash `//'


From: Stefano Lattarini
Subject: VPATH and filenames with double-slash `//'
Date: Wed, 21 Jul 2010 14:01:30 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Hello everybody.

I think I've found a bug in GNU make, apparently due to the
interaction of VPATH and filenames with double-slash `//'.

Here is an excerpt showing the most relevant part of the bug:

  $ cat Makefile
  VPATH = ..
  foo_OBJECTS = ./src//foo.o
  foo: $(foo_OBJECTS)
        $(CC) -o $@ $(foo_OBJECTS)
  .c.o:
        $(CC) -c -o $@ $<
  $ ls ../src
  foo.c
  $ make
  make: *** No rule to make target `src//foo.o', needed by `foo'.  Stop.

Changing the definition of `foo_OBJECTS' to `./src/foo.o' solves the
problem.

A complete script that reproduces the bug is attached.  The script fails
with GNU make (versions 3.79, 3.80 and 3.81) on Debian GNU/Linux and
with GNU make 3.81 on Solaris 10.  On the other hand, it passes with
Solaris 10's /usr/ccs/bin/make and with FreeBSD make.

Let me know if you need more details.

Regards, and thanks for all your work on GNU make.
   Stefano

Attachment: gmake-bug.sh
Description: application/shellscript


reply via email to

[Prev in Thread] Current Thread [Next in Thread]