]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/directive-include.mk
Merge bmake-20201117
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / directive-include.mk
1 # $NetBSD: directive-include.mk,v 1.4 2020/11/03 17:17:31 rillig Exp $
2 #
3 # Tests for the .include directive, which includes another file.
4
5 # TODO: Implementation
6
7 .MAKEFLAGS: -dc
8
9 # All included files are recorded in the variable .MAKE.MAKEFILES.
10 # In this test, only the basenames of the files are compared since
11 # the directories can differ.
12 .include "/dev/null"
13 .if ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null"
14 .  error
15 .endif
16
17 # Each file is recorded only once in the variable .MAKE.MAKEFILES.
18 # Between 2015-11-26 and 2020-10-31, the very last file could be repeated,
19 # due to an off-by-one bug in ParseTrackInput.
20 .include "/dev/null"
21 .if ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null"
22 .  error
23 .endif
24
25 .include "nonexistent.mk"
26 .include "/dev/null"            # size 0
27 # including a directory technically succeeds, but shouldn't.
28 #.include "."                   # directory
29
30 all:
31         @:;