| @@ -1,21 +1,21 @@ | | | @@ -1,21 +1,21 @@ |
1 | # $NetBSD: include-main.mk,v 1.1 2020/05/17 12:36:26 rillig Exp $ | | 1 | # $NetBSD: include-main.mk,v 1.2 2020/07/27 20:55:59 rillig Exp $ |
2 | # | | 2 | # |
3 | # Demonstrates that the .INCLUDEDFROMFILE magic variable does not behave | | 3 | # Demonstrates that the .INCLUDEDFROMFILE magic variable does not behave |
4 | # as described in the manual page. | | 4 | # as described in the manual page. |
5 | # | | 5 | # |
6 | # The manual page says that it is the "filename of the file this Makefile | | 6 | # The manual page says that it is the "filename of the file this Makefile |
7 | # was included from", while in reality it is the "filename in which the | | 7 | # was included from", while in reality it is the "filename in which the |
8 | # latest .include happened". | | 8 | # latest .include happened". See parse.c, function ParseSetIncludeFile. |
9 | # | | 9 | # |
10 | | | 10 | |
11 | .if !defined(.INCLUDEDFROMFILE) | | 11 | .if !defined(.INCLUDEDFROMFILE) |
12 | LOG+= main-before-ok | | 12 | LOG+= main-before-ok |
13 | .else | | 13 | .else |
14 | . for f in ${.INCLUDEDFROMFILE} | | 14 | . for f in ${.INCLUDEDFROMFILE} |
15 | LOG+= main-before-fail\(${f:Q}\) | | 15 | LOG+= main-before-fail\(${f:Q}\) |
16 | . endfor | | 16 | . endfor |
17 | .endif | | 17 | .endif |
18 | | | 18 | |
19 | .include "include-sub.mk" | | 19 | .include "include-sub.mk" |
20 | | | 20 | |
21 | .if !defined(.INCLUDEDFROMFILE) | | 21 | .if !defined(.INCLUDEDFROMFILE) |