diff options
author | nia <nia@pkgsrc.org> | 2020-05-24 05:35:51 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-05-24 05:35:51 +0000 |
commit | 8c218dc01b376e7a560d2b7fcbacca532b75fe4b (patch) | |
tree | 934e95ccea73f17c420a7617a820bc6a2596e583 /devel/bmake/files/unit-tests/include-main.mk | |
parent | 41f4d684ea949e703f7e4cdb02fffeb278231228 (diff) | |
download | pkgsrc-8c218dc01b376e7a560d2b7fcbacca532b75fe4b.tar.gz |
Import bmake-BMAKE
Diffstat (limited to 'devel/bmake/files/unit-tests/include-main.mk')
-rw-r--r-- | devel/bmake/files/unit-tests/include-main.mk | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/devel/bmake/files/unit-tests/include-main.mk b/devel/bmake/files/unit-tests/include-main.mk new file mode 100644 index 00000000000..cb333ef5211 --- /dev/null +++ b/devel/bmake/files/unit-tests/include-main.mk @@ -0,0 +1,30 @@ +# $NetBSD: include-main.mk,v 1.1.1.1 2020/05/24 05:35:53 nia Exp $ +# +# Demonstrates that the .INCLUDEDFROMFILE magic variable does 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 in reality it is the "filename in which the +# latest .include happened". +# + +.if !defined(.INCLUDEDFROMFILE) +LOG+= main-before-ok +.else +. for f in ${.INCLUDEDFROMFILE} +LOG+= main-before-fail\(${f:Q}\) +. endfor +.endif + +.include "include-sub.mk" + +.if !defined(.INCLUDEDFROMFILE) +LOG+= main-after-ok +.else +. for f in ${.INCLUDEDFROMFILE} +LOG+= main-after-fail\(${f:Q}\) +. endfor +.endif + +all: + @printf '%s\n' ${LOG} |