1 # $NetBSD: include-main.mk,v 1.1 2020/05/17 12:36:26 rillig Exp $
3 # Demonstrates that the .INCLUDEDFROMFILE magic variable does not behave
4 # as described in the manual page.
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
8 # latest .include happened".
11 .if !defined(.INCLUDEDFROMFILE)
14 . for f in ${.INCLUDEDFROMFILE}
15 LOG+= main-before-fail\(${f:Q}\)
19 .include "include-sub.mk"
21 .if !defined(.INCLUDEDFROMFILE)
24 . for f in ${.INCLUDEDFROMFILE}
25 LOG+= main-after-fail\(${f:Q}\)