diff options
Diffstat (limited to 'contrib/bmake/unit-tests/include-main.mk')
-rw-r--r-- | contrib/bmake/unit-tests/include-main.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/bmake/unit-tests/include-main.mk b/contrib/bmake/unit-tests/include-main.mk index d3f122aef718..373bbdea1721 100644 --- a/contrib/bmake/unit-tests/include-main.mk +++ b/contrib/bmake/unit-tests/include-main.mk @@ -1,16 +1,17 @@ -# $NetBSD: include-main.mk,v 1.6 2021/01/22 00:44:55 rillig Exp $ +# $NetBSD: include-main.mk,v 1.9 2023/06/01 20:56:35 rillig Exp $ # # Until 2020-09-05, the .INCLUDEDFROMFILE magic variable did not behave # as described in the manual page. # # The manual page says that it is the "filename of the file this Makefile # was included from", while before 2020-09-05 it was the "filename in which -# the latest .include happened". See parse.c, function ParseSetIncludeFile. +# the latest .include happened". See parse.c, function SetParseFile. # # Since 2020-09-05, the .INCLUDEDFROMDIR and .INCLUDEDFROMFILE variables # properly handle nested includes and even .for loops. .if !defined(.INCLUDEDFROMFILE) +# expect+1: main-before-ok . info main-before-ok .else . warning main-before-fail(${.INCLUDEDFROMFILE}) @@ -18,15 +19,17 @@ .for i in once . if !defined(.INCLUDEDFROMFILE) +# expect+1: main-before-for-ok . info main-before-for-ok . else . warning main-before-for-fail(${.INCLUDEDFROMFILE}) . endif .endfor -.include "include-sub.mk" +.include "include-sub.inc" .if !defined(.INCLUDEDFROMFILE) +# expect+1: main-after-ok . info main-after-ok .else . warning main-after-fail(${.INCLUDEDFROMFILE}) @@ -34,6 +37,7 @@ .for i in once . if !defined(.INCLUDEDFROMFILE) +# expect+1: main-after-for-ok . info main-after-for-ok . else . warning main-after-for-fail(${.INCLUDEDFROMFILE}) |