bugmake - Bugs: bug #62650, Fix an incorrect user message.

 
 

bug #62650: Fix an incorrect user message.

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sat 18 Jun 2022 10:13:59 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.4 Operating System:  Any
Fixed Release:  4.4 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 09 Jul 2022 04:46:18 PM UTC, comment #1: 

Applied.  Thanks!

Paul D. Smith <psmith>
Group administrator
Sat 18 Jun 2022 10:13:59 PM UTC, original submission:  

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.


Dmitry Goncharov <dgoncharov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53314:  sv62650_fix.diff added by dgoncharov (2KiB - text/x-patch)
file #53315:  sv62650_test.diff added by dgoncharov (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-09 psmith StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
        Triage StatusNone Small Effort
    2022-06-18 dgoncharov Attached File- Added sv62650_fix.diff, #53314
        Attached File- Added sv62650_test.diff, #53315

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code