Mon Jul 27 20:55:59 2020 UTC ()
make(1): document where to fix the .INCLUDEDFROM bug


(rillig)
diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/include-main.mk

cvs diff -r1.1 -r1.2 src/usr.bin/make/unit-tests/include-main.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/include-main.mk 2020/05/17 12:36:26 1.1
+++ src/usr.bin/make/unit-tests/include-main.mk 2020/07/27 20:55:59 1.2
@@ -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)
12LOG+= main-before-ok 12LOG+= main-before-ok
13.else 13.else
14. for f in ${.INCLUDEDFROMFILE} 14. for f in ${.INCLUDEDFROMFILE}
15LOG+= main-before-fail\(${f:Q}\) 15LOG+= 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)