[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62650] Fix an incorrect user message.
From: |
Dmitry Goncharov |
Subject: |
[bug #62650] Fix an incorrect user message. |
Date: |
Sat, 18 Jun 2022 18:14:00 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62650>
Summary: Fix an incorrect user message.
Project: make
Submitter: dgoncharov
Submitted: Sat 18 Jun 2022 10:13:59 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: SCM
Operating System: Any
Fixed Release: None
Triage Status: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sat 18 Jun 2022 10:13:59 PM UTC By: Dmitry Goncharov <dgoncharov>
Make reports an incorrect message when a file found through directory search
is preferred over the explicitly mentioned file.
++++
$ cat -n makefile
1 vpath hello.c src
2 all: hello.c; $(info $@ from $^)
3 hello.c: ; $(info 1 $@)
4 src/hello.c: ; $(info 2 $@)
$ make
makefile:3: Recipe was specified for file 'hello.c' at makefile:4,
makefile:3: but 'hello.c' is now considered the same file as 'src/hello.c'.
makefile:3: Recipe for 'src/hello.c' will be ignored in favor of the one for
'hello.c'.
2 src/hello.c
all from src/hello.c
make: 'all' is up to date.
----
There are two bits of incorrect information in this message.
1. make reports that recipe for 'hello.c' is at makefile:4. Should be
makefile:3.
2. make says that recipe for 'src/hello.c' will be ignored in favor of the one
for 'hello.c'. Actually, make ignores the recipe for 'hello.c' in favor of the
one for 'src/hello.c' and sets $< to 'src/hello.c', rather than 'hello.c' in
the recipe of rule 'all'.
With this patch
++++
makefile:3: Recipe was specified for file 'hello.c' at makefile:3,
makefile:3: but 'hello.c' is now considered the same file as 'src/hello.c'.
makefile:3: Recipe for 'hello.c' will be ignored in favor of the one for
'src/hello.c'.
2 src/hello.c
all from src/hello.c
make: 'all' is up to date.
----
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62650>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62650] Fix an incorrect user message.,
Dmitry Goncharov <=