diff options
author | Dmitry Goncharov <dgoncharov@users.sf.net> | 2022-06-19 13:44:09 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-07-09 10:44:00 -0400 |
commit | 88d6c22a487cc45b6d615d5c055ced5c9d5cb56d (patch) | |
tree | d20d3975993a0ce26d869b56258b162093b95d88 /tests/scripts/features/mult_rules | |
parent | c3b39d0654c3c5d8b24aaa07d2e6767c0d6e7dd6 (diff) | |
download | make-git-88d6c22a487cc45b6d615d5c055ced5c9d5cb56d.tar.gz |
[SV 62650] Show correct warning when combining targets
* src/file.c (rehash_file): Fix warning message.
(rehash_file): Fix comment to match the behavior.
* tests/scripts/features/se_explicit: Fix test.
* tests/scripts/features/mult_rules: Add a new test.
Diffstat (limited to 'tests/scripts/features/mult_rules')
-rw-r--r-- | tests/scripts/features/mult_rules | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/scripts/features/mult_rules b/tests/scripts/features/mult_rules index e706e17d..bddd501c 100644 --- a/tests/scripts/features/mult_rules +++ b/tests/scripts/features/mult_rules @@ -69,10 +69,20 @@ $answer = "EXTRA EXTRA\n"; unlink("defs.h","test.h","config.h","extra.h"); -1; - - - - - +# sv 62650. +# Test the message that make prints when a file found by directory search +# is preferred over the local one. +run_make_test(q! +vpath hello.c src +all: hello.c; $(info $@ from $^) +hello.c: ; $(info 1 $@) +src/hello.c: ; $(info 2 $@) +!, '', + "#MAKEFILE#:4: Recipe was specified for file 'hello.c' at #MAKEFILE#:4, +#MAKEFILE#:4: but 'hello.c' is now considered the same file as 'src/hello.c'. +#MAKEFILE#:4: 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.\n"); +1; |