Module Name: src Committed By: rillig Date: Fri Feb 11 23:44:18 UTC 2022
Modified Files: src/usr.bin/make/unit-tests: deptgt-phony.exp deptgt-phony.mk Log Message: tests/make: reproduce filesystem lookup of .PHONY nodes As described in PR toolchain/15164. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-phony.exp cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-phony.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/deptgt-phony.exp diff -u src/usr.bin/make/unit-tests/deptgt-phony.exp:1.1 src/usr.bin/make/unit-tests/deptgt-phony.exp:1.2 --- src/usr.bin/make/unit-tests/deptgt-phony.exp:1.1 Sun Aug 16 12:07:51 2020 +++ src/usr.bin/make/unit-tests/deptgt-phony.exp Fri Feb 11 23:44:18 2022 @@ -1 +1,42 @@ +Expanding "depsrc-phony-pr-15164-*-wildcard"... +Expanding "deptgt-phony-pr-15164-*-wildcard"... +Searching for .depend ... + failed. +Searching for .depend ... + /usr/share/mk ... + failed. +Wildcard expanding "all"... +Searching for all ... + failed. +Found 'all' as '(not found)' +SuffFindDeps "all" + No known suffix on all. Using .NULL suffix +adding suffix rules +Wildcard expanding "depsrc-phony-pr-15164-*-wildcard"... +Expanding "depsrc-phony-pr-15164-*-wildcard"... + +Wildcard expanding "deptgt-phony-pr-15164-*-wildcard"... +Expanding "deptgt-phony-pr-15164-*-wildcard"... + +Searching for all ... + failed. +SuffFindDeps "depsrc-phony-pr-15164" + No valid suffix on depsrc-phony-pr-15164 +SuffFindDeps "deptgt-phony-pr-15164" + No valid suffix on deptgt-phony-pr-15164 +: Making depsrc-phony-pr-15164 +: Making deptgt-phony-pr-15164 +Wildcard expanding "all"... +Searching for all ... + failed. +Found 'all' as '(not found)' +SuffFindDeps ".END" + No known suffix on .END. Using .NULL suffix +adding suffix rules +Searching for .END ... + failed. +Wildcard expanding ".END"... +Searching for .END ... + failed. +Found '.END' as '(not found)' exit status 0 Index: src/usr.bin/make/unit-tests/deptgt-phony.mk diff -u src/usr.bin/make/unit-tests/deptgt-phony.mk:1.2 src/usr.bin/make/unit-tests/deptgt-phony.mk:1.3 --- src/usr.bin/make/unit-tests/deptgt-phony.mk:1.2 Sun Aug 16 14:25:16 2020 +++ src/usr.bin/make/unit-tests/deptgt-phony.mk Fri Feb 11 23:44:18 2022 @@ -1,8 +1,31 @@ -# $NetBSD: deptgt-phony.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: deptgt-phony.mk,v 1.3 2022/02/11 23:44:18 rillig Exp $ # # Tests for the special target .PHONY in dependency declarations. # TODO: Implementation all: - @:; + + +# https://gnats.netbsd.org/15164 describes that .PHONY targets are still +# looked up in directories, even though .PHONY means that these targets do +# _not_ correspond to actual files. +# +# expect: Expanding "depsrc-phony-pr-15164-*-wildcard"... +# expect: Expanding "deptgt-phony-pr-15164-*-wildcard"... +.MAKEFLAGS: -dds +depsrc-phony-pr-15164: .PHONY + : Making ${.TARGET} +depsrc-phony-pr-15164-*-wildcard: .PHONY + : Making ${.TARGET} + +.PHONY: deptgt-phony-pr-15164 +deptgt-phony-pr-15164: + : Making ${.TARGET} + +.PHONY: deptgt-phony-pr-15164-*-wildcard +deptgt-phony-pr-15164-*-wildcard: + : Making ${.TARGET} + +all: depsrc-phony-pr-15164 depsrc-phony-pr-15164-*-wildcard +all: deptgt-phony-pr-15164 deptgt-phony-pr-15164-*-wildcard