xref: /freebsd/contrib/bmake/unit-tests/gnode-submake.mk (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1# $NetBSD: gnode-submake.mk,v 1.1 2020/11/07 23:25:06 rillig Exp $
2#
3# Test whether OP_SUBMAKE is determined correctly.  If it is, this node's
4# shell commands are connected to the make process via pipes, to coordinate
5# the number of running jobs.
6#
7# Determining whether a node is a sub-make node happens when the node is
8# parsed.  This information is only used in parallel mode, but the result
9# from parsing is available in compat mode as well.
10
11.MAKEFLAGS: -n -dg1
12
13all: makeinfo make-index
14all: braces-dot braces-no-dot
15all: braces-no-dot-modifier
16all: parentheses-dot parentheses-no-dot
17
18makeinfo:
19	# The command contains the substring "make", but not as a whole word.
20	: makeinfo submake
21
22make-index:
23	# The command contains the word "make", therefore it is considered a
24	# possible sub-make.  It isn't really, but that doesn't hurt.
25	: make-index
26
27braces-dot:
28	: ${.MAKE}
29
30braces-no-dot:
31	: ${MAKE}
32
33braces-no-dot-modifier:
34	# The command refers to MAKE, but not in its pure form.  Therefore it
35	# is not considered a sub-make.
36	: ${MAKE:T}
37
38parentheses-dot:
39	: $(.MAKE)
40
41parentheses-no-dot:
42	: $(MAKE)
43