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